mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-23 08:46:09 +01:00
🎨 桌面端自动下载更新安装包 https://github.com/siyuan-note/siyuan/issues/5837
This commit is contained in:
parent
9531bdd01c
commit
e2a6780cec
14 changed files with 155 additions and 16 deletions
|
|
@ -125,6 +125,14 @@ export const about = {
|
|||
<svg><use xlink:href="#iconRefresh"></use></svg>${window.siyuan.languages.checkUpdate}
|
||||
</button>
|
||||
</div>
|
||||
<div class="fn__flex b3-label${isBrowser() ? " fn__none" : ""}">
|
||||
<div class="fn__flex-1">
|
||||
${window.siyuan.languages.autoDownloadUpdatePkg}
|
||||
<div class="b3-label__text">${window.siyuan.languages.autoDownloadUpdatePkgTip}</div>
|
||||
</div>
|
||||
<div class="fn__space"></div>
|
||||
<input class="b3-switch fn__flex-center" id="downloadInstallPkg" type="checkbox"${window.siyuan.config.system.downloadInstallPkg ? " checked" : ""}>
|
||||
</div>
|
||||
<div class="fn__flex b3-label">
|
||||
<div class="fn__flex-1">
|
||||
${window.siyuan.languages.systemLog}
|
||||
|
|
@ -339,6 +347,12 @@ export const about = {
|
|||
});
|
||||
});
|
||||
});
|
||||
const downloadInstallPkgElement = about.element.querySelector("#downloadInstallPkg") as HTMLInputElement;
|
||||
downloadInstallPkgElement.addEventListener("change", () => {
|
||||
fetchPost("/api/system/setDownloadInstallPkg", {downloadInstallPkg: downloadInstallPkgElement.checked}, () => {
|
||||
window.siyuan.config.system.downloadInstallPkg = downloadInstallPkgElement.checked
|
||||
});
|
||||
});
|
||||
about.element.querySelector("#aboutConfim").addEventListener("click", () => {
|
||||
fetchPost("/api/system/setNetworkProxy", {
|
||||
scheme: (about.element.querySelector("#aboutScheme") as HTMLInputElement).value,
|
||||
|
|
|
|||
1
app/src/types/index.d.ts
vendored
1
app/src/types/index.d.ts
vendored
|
|
@ -304,6 +304,7 @@ declare interface IConfig {
|
|||
xanadu: boolean
|
||||
udanax: boolean
|
||||
uploadErrLog: boolean
|
||||
downloadInstallPkg: boolean
|
||||
networkServe: boolean
|
||||
useExistingDB: boolean
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue