mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-27 09:24:06 +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
|
|
@ -173,6 +173,7 @@ export const initAbout = () => {
|
|||
</div>`,
|
||||
width: "92vw",
|
||||
});
|
||||
passwordDialog.element.setAttribute("data-key", Constants.DIALOG_PASSWORD);
|
||||
const textAreaElement = passwordDialog.element.querySelector("textarea");
|
||||
textAreaElement.focus();
|
||||
const btnsElement = passwordDialog.element.querySelectorAll(".b3-button");
|
||||
|
|
@ -272,6 +273,7 @@ export const initAbout = () => {
|
|||
</div>`,
|
||||
width: "92vw",
|
||||
});
|
||||
openWorkspaceDialog.element.setAttribute("data-key", Constants.SIYUAN_OPEN_WORKSPACE);
|
||||
const btnsElement = openWorkspaceDialog.element.querySelectorAll(".b3-button");
|
||||
btnsElement[0].addEventListener("click", () => {
|
||||
openWorkspaceDialog.destroy();
|
||||
|
|
@ -306,6 +308,7 @@ export const initAbout = () => {
|
|||
</div>`,
|
||||
width: "92vw",
|
||||
});
|
||||
createWorkspaceDialog.element.setAttribute("data-key", Constants.DIALOG_CREATEWORKSPACE);
|
||||
const inputElement = createWorkspaceDialog.element.querySelector("input");
|
||||
inputElement.focus();
|
||||
const btnsElement = createWorkspaceDialog.element.querySelectorAll(".b3-button");
|
||||
|
|
|
|||
|
|
@ -98,6 +98,7 @@ ${renewHTML}`;
|
|||
content: getLoginHTML(true),
|
||||
});
|
||||
bindLoginEvent(dialog.element.querySelector(".b3-dialog__body"), true);
|
||||
dialog.element.setAttribute("data-key", Constants.DIALOG_DEACTIVATEUSER);
|
||||
});
|
||||
const refreshElement = modelMainElement.querySelector("#refresh");
|
||||
refreshElement.addEventListener("click", () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue