mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-21 06:24:06 +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
|
|
@ -1,4 +1,6 @@
|
|||
{
|
||||
"autoDownloadUpdatePkg": "Automatically download update installation package",
|
||||
"autoDownloadUpdatePkgTip": "After enabling, it will automatically check the version update every two hours. If there is an updated version, it will automatically download the installation package and prompt for installation",
|
||||
"downloaded": "Downloaded",
|
||||
"allOp": "All operations",
|
||||
"htmlBlockError": "The execution of the following script will affect the interface display, and the script has stopped running",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
{
|
||||
"autoDownloadUpdatePkg": "Descargar automáticamente el paquete de instalación de actualizaciones",
|
||||
"autoDownloadUpdatePkgTip": "Después de abrir, verificará automáticamente la actualización de la versión cada dos horas. Si hay una versión actualizada, descargará automáticamente el paquete de instalación y solicitará la instalación",
|
||||
"downloaded": "Descargado",
|
||||
"allOp": "Todas las operaciones",
|
||||
"htmlBlockError": "La ejecución del siguiente script afectará la visualización de la interfaz y el script ha dejado de ejecutarse",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
{
|
||||
"autoDownloadUpdatePkg": "Télécharger automatiquement le package d'installation de la mise à jour",
|
||||
"autoDownloadUpdatePkgTip": "Après l'ouverture, il vérifiera automatiquement la mise à jour de la version toutes les deux heures. S'il existe une version mise à jour, il téléchargera automatiquement le package d'installation et demandera l'installation",
|
||||
"downloaded": "Téléchargé",
|
||||
"allOp": "Toutes les opérations",
|
||||
"htmlBlockError": "L'exécution du script suivant affectera l'affichage de l'interface et le script a cessé de s'exécuter",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
{
|
||||
"autoDownloadUpdatePkg": "自動下載更新安裝包",
|
||||
"autoDownloadUpdatePkgTip": "開啟後會每隔兩小時自動檢查版本更新,如果有更新版本則自動下載安裝包並提示安裝",
|
||||
"downloaded": "已下載",
|
||||
"allOp": "所有操作",
|
||||
"htmlBlockError": "以下 script 執行會影響界面顯示,已經停止運行該腳本",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
{
|
||||
"autoDownloadUpdatePkg": "自动下载更新安装包",
|
||||
"autoDownloadUpdatePkgTip": "开启后会每隔两小时自动检查版本更新,如果有更新版本则自动下载安装包并提示安装",
|
||||
"downloaded": "已下载",
|
||||
"allOp": "所有操作",
|
||||
"htmlBlockError": "以下 script 执行会影响界面显示,已经停止运行该脚本",
|
||||
|
|
|
|||
|
|
@ -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