From 2be531a0cca967775f7f3ffdb2d2ad0545ef4a8a Mon Sep 17 00:00:00 2001 From: Vanessa Date: Fri, 9 Sep 2022 09:45:18 +0800 Subject: [PATCH] :rotating_light: --- app/src/config/about.ts | 2 +- app/src/dialog/processSystem.ts | 2 +- app/src/protyle/export/index.ts | 20 ++++++++++---------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/app/src/config/about.ts b/app/src/config/about.ts index de626d1b9..3f61a9fde 100644 --- a/app/src/config/about.ts +++ b/app/src/config/about.ts @@ -350,7 +350,7 @@ 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 + window.siyuan.config.system.downloadInstallPkg = downloadInstallPkgElement.checked; }); }); about.element.querySelector("#aboutConfim").addEventListener("click", () => { diff --git a/app/src/dialog/processSystem.ts b/app/src/dialog/processSystem.ts index 5c6d0467d..718c03266 100644 --- a/app/src/dialog/processSystem.ts +++ b/app/src/dialog/processSystem.ts @@ -122,7 +122,7 @@ export const exitSiYuan = () => { ipcRenderer.send(Constants.SIYUAN_QUIT); /// #endif }); - }) + }); } else { // 正常退出 /// #if !BROWSER ipcRenderer.send(Constants.SIYUAN_CONFIG_CLOSETRAY); diff --git a/app/src/protyle/export/index.ts b/app/src/protyle/export/index.ts index 8d9f78b02..9a9046edd 100644 --- a/app/src/protyle/export/index.ts +++ b/app/src/protyle/export/index.ts @@ -82,8 +82,8 @@ const renderPDF = (id: string) => { show: true, width: 1032, resizable: false, - frame: 'darwin' === window.siyuan.config.system.os, - titleBarStyle: 'hidden', + frame: "darwin" === window.siyuan.config.system.os, + titleBarStyle: "hidden", webPreferences: { contextIsolation: false, nodeIntegration: true, @@ -142,20 +142,20 @@ const renderPDF = (id: string) => { } }); }); - destroyWin(win) + destroyWin(win); }).catch((error: string) => { showMessage("Export PDF error:" + error, 0, "error", msgId); - destroyWin(win) + destroyWin(win); }); } catch (e) { showMessage("Export PDF error:" + e + ". Export HTML and use Chrome's printing function to convert to PDF", 0, "error", msgId); - destroyWin(win) + destroyWin(win); } } else { - destroyWin(win) + destroyWin(win); } - }) - }) + }); + }); fetchPost("/api/export/exportPreviewHTML", { id, }, response => { @@ -386,8 +386,8 @@ const renderPDF = (id: string) => { }); `; win.loadURL("data:text/html;charset=UTF-8," + encodeURIComponent(html)); - }) -} + }); +}; const getExportPath = (option: { type: string, id: string }, removeAssets?: boolean) => { fetchPost("/api/block/getBlockInfo", {