mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-29 04:48:48 +01:00
Add attribute "data-key" for Dialog (#10138)
This commit is contained in:
parent
b669d1a19c
commit
291211bd00
29 changed files with 103 additions and 0 deletions
|
|
@ -168,6 +168,7 @@ export const kernelError = () => {
|
|||
</div>`
|
||||
});
|
||||
dialog.element.id = "errorLog";
|
||||
dialog.element.setAttribute("data-key", Constants.DIALOG_ERRORKERNELFAULT);
|
||||
const restartElement = dialog.element.querySelector(".b3-button");
|
||||
if (restartElement) {
|
||||
restartElement.addEventListener("click", () => {
|
||||
|
|
@ -257,6 +258,7 @@ export const transactionError = () => {
|
|||
</div>`,
|
||||
width: isMobile() ? "92vw" : "520px",
|
||||
});
|
||||
dialog.element.setAttribute("data-key", Constants.DIALOG_ERRORSTATEEXCEPTED);
|
||||
const btnsElement = dialog.element.querySelectorAll(".b3-button");
|
||||
btnsElement[0].addEventListener("click", () => {
|
||||
/// #if MOBILE
|
||||
|
|
@ -355,6 +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);
|
||||
const btnsElement = dialog.element.querySelectorAll(".b3-button");
|
||||
btnsElement[0].addEventListener("click", () => {
|
||||
dialog.destroy();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue