Skip to content

Commit

Permalink
♻️ #10138
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 committed Jan 10, 2024
1 parent 926f1a1 commit 9691c42
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions app/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"; // 创建笔记本
Expand Down
6 changes: 3 additions & 3 deletions app/src/dialog/processSystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export const kernelError = () => {
</div>`
});
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", () => {
Expand Down Expand Up @@ -258,7 +258,7 @@ export const transactionError = () => {
</div>`,
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
Expand Down Expand Up @@ -357,7 +357,7 @@ export const bootSync = () => {
<button class="b3-button b3-button--text">${window.siyuan.languages.syncNow}</button>
</div>`
});
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();
Expand Down

0 comments on commit 9691c42

Please sign in to comment.