Skip to content

Commit cf699a9

Browse files
committed
🐛 处理beta版本打开的更新日志
1 parent 2fb9ba8 commit cf699a9

File tree

6 files changed

+17
-7
lines changed

6 files changed

+17
-7
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "scriptcat",
3-
"version": "1.0.0-beta",
3+
"version": "1.0.0-beta.1",
44
"description": "脚本猫,一个可以执行用户脚本的浏览器扩展,万物皆可脚本化,让你的浏览器可以做更多的事情!",
55
"author": "CodFrm",
66
"license": "GPLv3",

src/app/service/service_worker/index.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ import { SubscribeService } from "./subscribe";
1414
import { ScriptDAO } from "@App/app/repo/scripts";
1515
import { SystemService } from "./system";
1616
import { type Logger, LoggerDAO } from "@App/app/repo/logger";
17-
import { localePath } from "@App/locales/locales";
17+
import { localePath, t } from "@App/locales/locales";
18+
import { InfoNotification } from "@App/pkg/utils/utils";
1819

1920
// service worker的管理器
2021
export default class ServiceWorkerManager {
@@ -167,9 +168,12 @@ export default class ServiceWorkerManager {
167168
// 如果当前窗口正在播放 audio, 则在后台打开
168169
const active = tabs.length === 0 ? false : tabs[0].audible === true ? false : true;
169170
chrome.tabs.create({
170-
url: `https://docs.scriptcat.org/docs/change/#${ExtVersion}`,
171+
url: `https://docs.scriptcat.org/docs/change/${
172+
ExtVersion.includes("-") ? "beta-changelog/" : ""
173+
}#${ExtVersion}`,
171174
active: active,
172175
});
176+
InfoNotification(t("ext_update_notification"), t("ext_update_notification_desc", { version: ExtVersion }));
173177
});
174178
}
175179
});

src/locales/en-US/translation.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,5 +415,7 @@
415415
"build_failed": "Failed to Build",
416416
"drag_script_here_to_upload": "Drag script here to upload it",
417417
"sync_status": "Sync Status",
418-
"search_scripts": "Search script"
418+
"search_scripts": "Search script",
419+
"ext_update_notification": "Scriptcat extension updated",
420+
"ext_update_notification_desc": "Current version: {{version}}, please see the update log for details"
419421
}

src/locales/zh-CN/translation.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,5 +415,7 @@
415415
"build_failed": "构建失败",
416416
"drag_script_here_to_upload": "拖拽脚本到此处上传",
417417
"sync_status": "同步状态",
418-
"search_scripts": "搜索脚本"
418+
"search_scripts": "搜索脚本",
419+
"ext_update_notification": "脚本猫扩展已更新",
420+
"ext_update_notification_desc": "当前版本:{{version}},详情请查看更新日志"
419421
}

src/locales/zh-TW/translation.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,5 +415,7 @@
415415
"build_failed": "建置失敗",
416416
"drag_script_here_to_upload": "拖曳腳本到此處上傳",
417417
"sync_status": "同步狀態",
418-
"search_scripts": "搜索腳本"
418+
"search_scripts": "搜索腳本",
419+
"ext_update_notification": "脚本猫扩展已更新",
420+
"ext_update_notification_desc": "当前版本:{{version}},详情请查看更新日志"
419421
}

src/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"manifest_version": 3,
33
"name": "__MSG_scriptcat__",
4-
"version": "1.0.0.1100",
4+
"version": "1.0.0.1200",
55
"author": "CodFrm",
66
"description": "__MSG_scriptcat_description__",
77
"options_ui": {

0 commit comments

Comments
 (0)