mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-24 16:04:06 +01:00
This commit is contained in:
parent
c80ceb67b8
commit
487e2f980b
2 changed files with 9 additions and 9 deletions
|
|
@ -46,12 +46,12 @@ const editLayout = (layoutName?: string) => {
|
|||
inputElement.select();
|
||||
inputElement.focus();
|
||||
dialog.bindInput(inputElement, () => {
|
||||
btnsElement[1].dispatchEvent(new CustomEvent("click"));
|
||||
});
|
||||
btnsElement[0].addEventListener("click", () => {
|
||||
dialog.destroy();
|
||||
btnsElement[2].dispatchEvent(new CustomEvent("click"));
|
||||
});
|
||||
btnsElement[1].addEventListener("click", () => {
|
||||
dialog.destroy();
|
||||
});
|
||||
btnsElement[2].addEventListener("click", () => {
|
||||
const value = inputElement.value;
|
||||
if (!value) {
|
||||
showMessage(window.siyuan.languages["_kernel"]["142"]);
|
||||
|
|
@ -88,7 +88,7 @@ const editLayout = (layoutName?: string) => {
|
|||
});
|
||||
setStorageVal(Constants.LOCAL_LAYOUTS, window.siyuan.storage[Constants.LOCAL_LAYOUTS]);
|
||||
});
|
||||
btnsElement[2].addEventListener("click", () => {
|
||||
btnsElement[0].addEventListener("click", () => {
|
||||
window.siyuan.storage[Constants.LOCAL_LAYOUTS].find((layoutItem: ISaveLayout, index: number) => {
|
||||
if (layoutItem.name === layoutName) {
|
||||
window.siyuan.storage[Constants.LOCAL_LAYOUTS].splice(index, 1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue