diff --git a/app/src/config/exportConfig.ts b/app/src/config/exportConfig.ts index db0ccffec..383281f7b 100644 --- a/app/src/config/exportConfig.ts +++ b/app/src/config/exportConfig.ts @@ -158,10 +158,10 @@ export const exportConfig = { window.location.href = response.data.zip; }); /// #else - let filePaths = dialog.showOpenDialogSync({ + const filePaths = dialog.showOpenDialogSync({ title: window.siyuan.languages.export + " " + "Data", properties: ["createDirectory", "openDirectory"], - }) + }); if (filePaths && 0 < filePaths.length) { const savePath = filePaths[0]; const msgId = showMessage(window.siyuan.languages.exporting, -1); diff --git a/app/src/protyle/toolbar/index.ts b/app/src/protyle/toolbar/index.ts index 0fd5744d3..2f90247bb 100644 --- a/app/src/protyle/toolbar/index.ts +++ b/app/src/protyle/toolbar/index.ts @@ -562,7 +562,7 @@ export class Toolbar { this.range.insertNode(currentNewNode); // https://github.com/siyuan-note/siyuan/issues/6155 if (currentNewNode.nodeType !== 3 && ["code", "tag", "kbd"].includes(type)) { - const previousSibling = hasPreviousSibling(currentNewNode) + const previousSibling = hasPreviousSibling(currentNewNode); if (!previousSibling || previousSibling.textContent.endsWith("\n")) { currentNewNode.before(document.createTextNode(Constants.ZWSP)); } @@ -923,7 +923,7 @@ export class Toolbar { }); }); }, Constants.TIMEOUT_TRANSITION); - } + }; headerElement.addEventListener("mousedown", (event: MouseEvent) => { if (hasClosestByClassName(event.target as HTMLElement, "block__icon")) { return; diff --git a/app/src/util/globalShortcut.ts b/app/src/util/globalShortcut.ts index 732d9f30d..8036d70ff 100644 --- a/app/src/util/globalShortcut.ts +++ b/app/src/util/globalShortcut.ts @@ -1145,7 +1145,7 @@ const panelTreeKeydown = (event: KeyboardEvent) => { }); } if (!activePanelElement) { - return false + return false; } if (activePanelElement.className.indexOf("sy__") === -1) { return false; @@ -1175,25 +1175,25 @@ const panelTreeKeydown = (event: KeyboardEvent) => { if (!model) { return false; } - let activeItemElement = activePanelElement.querySelector(".b3-list-item--focus") + let activeItemElement = activePanelElement.querySelector(".b3-list-item--focus"); if (!activeItemElement) { activeItemElement = activePanelElement.querySelector(".b3-list .b3-list-item"); if (activeItemElement) { - activeItemElement.classList.add("b3-list-item--focus") + activeItemElement.classList.add("b3-list-item--focus"); } return false; } - let tree = (model as Backlink).tree + let tree = (model as Backlink).tree; if (activeItemElement.parentElement.parentElement.classList.contains("backlinkMList")) { - tree = (model as Backlink).mTree + tree = (model as Backlink).mTree; } if (event.key === "Enter") { tree.click(activeItemElement); event.preventDefault(); return true; } - const arrowElement = activeItemElement.querySelector(".b3-list-item__arrow") + const arrowElement = activeItemElement.querySelector(".b3-list-item__arrow"); if ((event.key === "ArrowRight" && !arrowElement.classList.contains("b3-list-item__arrow--open") && !arrowElement.parentElement.classList.contains("fn__hidden")) || (event.key === "ArrowLeft" && arrowElement.classList.contains("b3-list-item__arrow--open") && !arrowElement.parentElement.classList.contains("fn__hidden"))) { tree.toggleBlocks(activeItemElement); @@ -1290,6 +1290,6 @@ const panelTreeKeydown = (event: KeyboardEvent) => { event.preventDefault(); return true; } - return false -} + return false; +};