Skip to content

Commit eff04e3

Browse files
committed
主要 可忽略更新版本
1 parent 172070e commit eff04e3

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

Diff for: src/ShareTypes.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ export interface setting {
248248
检查更新: boolean;
249249
频率: "manual" | "start";
250250
模式: "大版本" | "小版本" | "dev";
251+
忽略版本: string;
251252
};
252253
录屏: {
253254
模式: "normal" | "super";

Diff for: src/main/main.ts

+10-8
Original file line numberDiff line numberDiff line change
@@ -2706,6 +2706,7 @@ const defaultSetting: setting = {
27062706
检查更新: true,
27072707
频率: "start",
27082708
模式: "小版本",
2709+
忽略版本: "",
27092710
},
27102711
录屏: {
27112712
模式: "normal",
@@ -2861,14 +2862,15 @@ function checkUpdate(s手动检查?: boolean) {
28612862
if (firstName.split(".").at(0) !== version.split(".").at(0))
28622863
update = true;
28632864
}
2864-
if (update) {
2865-
showVersion({
2866-
v: first.name,
2867-
url: first.html_url,
2868-
});
2869-
} else if (s手动检查) {
2870-
showVersion();
2871-
}
2865+
if (store.get("更新.忽略版本") !== firstName)
2866+
if (update) {
2867+
showVersion({
2868+
v: first.name,
2869+
url: first.html_url,
2870+
});
2871+
} else if (s手动检查) {
2872+
showVersion();
2873+
}
28722874
})
28732875
.catch(() => {
28742876
if (s手动检查) showVersion("err");

Diff for: src/renderer/setting.html

+4
Original file line numberDiff line numberDiff line change
@@ -1189,6 +1189,10 @@ <h2>检查更新</h2>
11891189
</label>
11901190
</div>
11911191

1192+
<h3>忽略版本</h3>
1193+
<comment>忽略版本号以跳过更新</comment>
1194+
<input type="text" spellcheck="false" data-path="更新.忽略版本">
1195+
11921196
<h2 id="path_info">位置信息</h2>
11931197
<t>配置目录:</t><input type="text" spellcheck="false" id="user_data_path">
11941198
<div id="user_data_divs">

0 commit comments

Comments
 (0)