Skip to content

Commit

Permalink
Merge pull request #140 from AShujiao/dev_2.5.4
Browse files Browse the repository at this point in the history
Dev 2.5.4
  • Loading branch information
AShujiao authored Aug 22, 2024
2 parents 8f54389 + c77dc9d commit e6e44f1
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 10 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,8 @@

#### ver 2.5.3 (2024/06/30)

1.修复mac下本地图片不显示问题
1.修复mac下本地图片不显示问题

#### ver 2.5.4 (2024/08/22)

1.修复Linux系统本地图片无法使用的问题
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ Add a picture you like to cover the entire vscode..
## 最近更新日志
[完整日志](https://github.com/vscode-extension/vscode-background-cover/blob/master/CHANGELOG.md)

#### ver 2.5.3 (2024/06/30)
#### ver 2.5.4 (2024/08/22)

1.修复mac下本地图片不显示问题
1.修复Linux系统本地图片无法使用的问题

---
### Thanks 感谢
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "background-cover",
"displayName": "background-cover",
"description": "Add a picture you like to cover the entire vscode..",
"version": "2.5.3",
"version": "2.5.4",
"publisher": "manasxx",
"engines": {
"vscode": "^1.38.0"
Expand Down
8 changes: 5 additions & 3 deletions src/FileDom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class FileDom {
if(osType == 'Darwin'){
this.imageToBase64();
}else{
this.localImgToVsc();
this.localImgToVsc(osType);
}

}
Expand Down Expand Up @@ -155,8 +155,10 @@ export class FileDom {
}


private localImgToVsc() {
var url = "vscode-file://vscode-app/" + this.imagePath
private localImgToVsc(ostype: string) {
var separator = ostype == "Linux" ? "" : "/";

var url = "vscode-file://vscode-app" + separator + this.imagePath
this.imagePath = Uri.parse(url).toString();
}

Expand Down
2 changes: 1 addition & 1 deletion src/PickLIst.ts
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ export class PickList {
let tmpPath = "file:///" + extPath + tmpUri
let tmpurl = Uri.parse( tmpPath )

commands.executeCommand( 'openFolder', tmpurl );
commands.executeCommand( 'vscode.openFolder', tmpurl );
}


Expand Down
2 changes: 1 addition & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export function activate(context: ExtensionContext) {
let title:string = ex ? ex.packageJSON['one_title'] : '';
if(openVersion != version && title != ""){
context.globalState.update('ext_version',version);
vsHelp.showWebview('🐷已更新到2.5.3:修复mac下本地图片不显示问题--- 🐷\r🐶🐷🐔🦊立即体验!!🐯🐮🐹🐽❓');
vsHelp.showInfoSupport('🐷已更新到2.5.4:修复Linux系统本地图片无法使用的问题\r🐶是否愿意帮助在线图库社区运营🐶❓');
}
setContext(context);
}
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default '2.5.3';
export default '2.5.4';
15 changes: 15 additions & 0 deletions src/vsHelp.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import {
window,
commands,
Uri,
env,
} from 'vscode';
import { PickList } from './PickLIst';

Expand Down Expand Up @@ -37,6 +39,19 @@ const vsHelp = {
});
},

showInfoSupport(content: any): Thenable<void> {
return window.showInformationMessage(content, { title: "详情" }, { title: "赞助" })
.then(function (item) {
if (!item) { return; }
if (item.title === '详情') {
env.openExternal( Uri.parse( "https://vs.20988.xyz/d/66-ai-xin-juan-zeng/3" ) )
}else{
PickList.gotoFilePath('//resources//support.jpg');
}

});
},

showWebview(content: any): Thenable<void> {
return window.showInformationMessage(content, { title: "OK" })
.then(function (item) {
Expand Down

0 comments on commit e6e44f1

Please sign in to comment.