From 9691c4218c3d2538cdf23fef212b97b9fa7b7522 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Wed, 10 Jan 2024 23:27:44 +0800 Subject: [PATCH] :recycle: https://github.com/siyuan-note/siyuan/pull/10138 --- app/src/constants.ts | 3 +++ app/src/dialog/processSystem.ts | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/src/constants.ts b/app/src/constants.ts index 59562759b00..330a7461620 100644 --- a/app/src/constants.ts +++ b/app/src/constants.ts @@ -150,6 +150,9 @@ export abstract class Constants { public static readonly DIALOG_WECHATREMINDER = "dialog-wechatreminder"; // 微信提醒 public static readonly DIALOG_PASSWORD = "dialog-password"; // 导入同步密钥 public static readonly DIALOG_SETPASSWORD = "dialog-setpassword"; // 设置同步密钥 + public static readonly DIALOG_BOOTSYNCFAILED = "dialog-bootsyncfailed"; // 启动时同步数据失败 + public static readonly DIALOG_KERNELFAULT = "dialog-kernelfault"; // 内核退出 + public static readonly DIALOG_STATEEXCEPTED = "dialog-stateexcepted"; // 状态异常 public static readonly DIALOG_ATTR = "dialog-attr"; // 设置块属性 public static readonly DIALOG_SETCUSTOMATTR = "dialog-setcustomattr"; // 设置自定义属性 public static readonly DIALOG_CREATENOTEBOOK = "dialog-createnotebook"; // 创建笔记本 diff --git a/app/src/dialog/processSystem.ts b/app/src/dialog/processSystem.ts index 70705b4defa..b0958dd26c6 100644 --- a/app/src/dialog/processSystem.ts +++ b/app/src/dialog/processSystem.ts @@ -168,7 +168,7 @@ export const kernelError = () => { ` }); dialog.element.id = "errorLog"; - dialog.element.setAttribute("data-key", Constants.DIALOG_ERRORKERNELFAULT); + dialog.element.setAttribute("data-key", Constants.DIALOG_KERNELFAULT); const restartElement = dialog.element.querySelector(".b3-button"); if (restartElement) { restartElement.addEventListener("click", () => { @@ -258,7 +258,7 @@ export const transactionError = () => { `, width: isMobile() ? "92vw" : "520px", }); - dialog.element.setAttribute("data-key", Constants.DIALOG_ERRORSTATEEXCEPTED); + dialog.element.setAttribute("data-key", Constants.DIALOG_STATEEXCEPTED); const btnsElement = dialog.element.querySelectorAll(".b3-button"); btnsElement[0].addEventListener("click", () => { /// #if MOBILE @@ -357,7 +357,7 @@ export const bootSync = () => { ` }); - dialog.element.setAttribute("data-key", Constants.DIALOG_ERRORBOOTSYNCFAILED); + dialog.element.setAttribute("data-key", Constants.DIALOG_BOOTSYNCFAILED); const btnsElement = dialog.element.querySelectorAll(".b3-button"); btnsElement[0].addEventListener("click", () => { dialog.destroy();