diff --git a/app/src/layout/dock/util.ts b/app/src/layout/dock/util.ts index e809b273c..c7d6dce93 100644 --- a/app/src/layout/dock/util.ts +++ b/app/src/layout/dock/util.ts @@ -35,12 +35,12 @@ export const openBacklink = async (options: { const newWnd = wnd.split("lr"); if (!options.rootId) { const response = await fetchSyncPost("api/block/getDocInfo", {id: options.blockId}); - options.rootId = response.data.rootID - options.useBlockId = response.data.rootID !== response.data.id - options.title = response.data.name || "Untitled" + options.rootId = response.data.rootID; + options.useBlockId = response.data.rootID !== response.data.id; + options.title = response.data.name || "Untitled"; } else if (!options.title) { const response = await fetchSyncPost("api/block/getDocInfo", {id: options.blockId}); - options.title = response.data.name || "Untitled" + options.title = response.data.name || "Untitled"; } newWnd.addTab(new Tab({ icon: "iconLink", @@ -85,12 +85,12 @@ export const openGraph = async (options: { const newWnd = wnd.split("lr"); if (!options.rootId) { const response = await fetchSyncPost("api/block/getDocInfo", {id: options.blockId}); - options.rootId = response.data.rootID - options.useBlockId = response.data.rootID !== response.data.id - options.title = response.data.name || "Untitled" + options.rootId = response.data.rootID; + options.useBlockId = response.data.rootID !== response.data.id; + options.title = response.data.name || "Untitled"; } else if (!options.title) { const response = await fetchSyncPost("api/block/getDocInfo", {id: options.blockId}); - options.title = response.data.name || "Untitled" + options.title = response.data.name || "Untitled"; } newWnd.addTab(new Tab({ icon: "iconGraph", @@ -126,12 +126,12 @@ export const openOutline = async (protyle: IProtyle) => { wnd = getWndByLayout(window.siyuan.layout.centerLayout); } const newWnd = wnd.split("lr"); - let title = "" + let title = ""; if (!protyle.title) { const response = await fetchSyncPost("api/block/getDocInfo", {id: protyle.block.rootID}); - title = response.data.name || "Untitled" + title = response.data.name || "Untitled"; } else { - title = protyle.title.editElement.textContent || "Untitled" + title = protyle.title.editElement.textContent || "Untitled"; } newWnd.addTab(new Tab({ icon: "iconAlignCenter", diff --git a/app/src/menus/commonMenuItem.ts b/app/src/menus/commonMenuItem.ts index d597d257f..7c1f88bb9 100644 --- a/app/src/menus/commonMenuItem.ts +++ b/app/src/menus/commonMenuItem.ts @@ -246,7 +246,7 @@ export const openFileAttr = (attrs: IObject, focusName = "bookmark", protyle?: I dialog.element.addEventListener("click", (event) => { let target = event.target as HTMLElement; if (typeof event.detail === "string") { - target = dialog.element.querySelector('.item--full[data-type="NodeAttributeView"]') + target = dialog.element.querySelector('.item--full[data-type="NodeAttributeView"]'); } while (!target.isSameNode(dialog.element)) { const type = target.dataset.action; diff --git a/app/src/protyle/toolbar/index.ts b/app/src/protyle/toolbar/index.ts index a498e65d9..30a41e087 100644 --- a/app/src/protyle/toolbar/index.ts +++ b/app/src/protyle/toolbar/index.ts @@ -1160,7 +1160,7 @@ export class Toolbar {
${html}
`; - const listElement = this.subElement.lastElementChild.lastElementChild as HTMLElement + const listElement = this.subElement.lastElementChild.lastElementChild as HTMLElement; const inputElement = this.subElement.querySelector("input"); inputElement.addEventListener("keydown", (event: KeyboardEvent) => { event.stopPropagation(); @@ -1463,7 +1463,7 @@ export class Toolbar {
`; - const listElement = this.subElement.lastElementChild.lastElementChild as HTMLElement + const listElement = this.subElement.lastElementChild.lastElementChild as HTMLElement; const inputElement = this.subElement.querySelector("input"); inputElement.addEventListener("keydown", (event: KeyboardEvent) => { event.stopPropagation(); diff --git a/app/src/protyle/wysiwyg/transaction.ts b/app/src/protyle/wysiwyg/transaction.ts index 7438f6307..10a4dbec5 100644 --- a/app/src/protyle/wysiwyg/transaction.ts +++ b/app/src/protyle/wysiwyg/transaction.ts @@ -483,7 +483,7 @@ export const onTransaction = (protyle: IProtyle, operation: IOperation, isUndo: } else if (key === "memo") { memoHTML = `
`; } else if (key === "custom-avs") { - memoHTML = `
`; + memoHTML = "
"; } }); let nodeAttrHTML = bookmarkHTML + nameHTML + aliasHTML + memoHTML; diff --git a/app/src/util/upDownHint.ts b/app/src/util/upDownHint.ts index da4f3df29..72d1d7601 100644 --- a/app/src/util/upDownHint.ts +++ b/app/src/util/upDownHint.ts @@ -35,7 +35,7 @@ export const upDownHint = (listElement: Element, event: KeyboardEvent, classActi } } currentHintElement = listElement.querySelector("." + classActiveName); - const overTop = listElement.scrollTop > currentHintElement.offsetTop - (currentHintElement.previousElementSibling?.clientHeight || 0) + const overTop = listElement.scrollTop > currentHintElement.offsetTop - (currentHintElement.previousElementSibling?.clientHeight || 0); if (listElement.scrollTop < currentHintElement.offsetTop - listElement.clientHeight + currentHintElement.clientHeight || overTop) { currentHintElement.scrollIntoView(overTop); }