From 78ebd3119e79cf99650adadcfe993650b16833fa Mon Sep 17 00:00:00 2001 From: Vanessa Date: Mon, 21 Oct 2024 22:41:07 +0800 Subject: [PATCH] :rotating_light: --- app/src/history/doc.ts | 6 +++--- app/src/history/history.ts | 2 +- app/src/plugin/loader.ts | 2 +- app/src/protyle/util/editorCommonEvent.ts | 2 +- app/src/protyle/wysiwyg/renderBacklink.ts | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/src/history/doc.ts b/app/src/history/doc.ts index 4c3be571d..3226a0f43 100644 --- a/app/src/history/doc.ts +++ b/app/src/history/doc.ts @@ -131,9 +131,9 @@ export const openDocHistory = (options: { dialog.destroy(); } else if (type === "rollback" && !isLoading) { getHistoryPath(target.parentElement, opElement.value, options.id, (item) => { - let dataPath = item.path; + const dataPath = item.path; isLoading = false; - let confirmTip = window.siyuan.languages.rollbackConfirm.replace("${name}", item.title) + const confirmTip = window.siyuan.languages.rollbackConfirm.replace("${name}", item.title) .replace("${time}", target.previousElementSibling.previousElementSibling.textContent.trim()); confirmDialog("⚠️ " + window.siyuan.languages.rollback, confirmTip, () => { fetchPost("/api/history/rollbackDocHistory", { @@ -147,7 +147,7 @@ export const openDocHistory = (options: { break; } else if (target.classList.contains("b3-list-item") && !isLoading) { getHistoryPath(target, opElement.value, options.id, (item) => { - let dataPath = item.path; + const dataPath = item.path; fetchPost("/api/history/getDocHistoryContent", { historyPath: dataPath, }, (response) => { diff --git a/app/src/history/history.ts b/app/src/history/history.ts index 25c25f7b2..787195af3 100644 --- a/app/src/history/history.ts +++ b/app/src/history/history.ts @@ -539,7 +539,7 @@ const bindEvent = (app: App, element: Element, dialog?: Dialog) => { name = window.siyuan.languages.workspaceData; time = target.parentElement.querySelector("span[data-type='hCreated']").textContent.trim(); } - let confirmTip = window.siyuan.languages.rollbackConfirm.replace("${name}", name) + const confirmTip = window.siyuan.languages.rollbackConfirm.replace("${name}", name) .replace("${time}", time); confirmDialog("⚠️ " + window.siyuan.languages.rollback, confirmTip, () => { if (dataType === "assets") { diff --git a/app/src/plugin/loader.ts b/app/src/plugin/loader.ts index 81a87ca7a..5d7904742 100644 --- a/app/src/plugin/loader.ts +++ b/app/src/plugin/loader.ts @@ -104,7 +104,7 @@ const updateDock = (dockItem: Config.IUILayoutDockTab[], index: number, plugin: plugin.docks[tabItem.type].config.show = tabItem.show; plugin.docks[tabItem.type].config.size = tabItem.size; if (!window.siyuan.storage[Constants.LOCAL_PLUGIN_DOCKS][plugin.name]) { - window.siyuan.storage[Constants.LOCAL_PLUGIN_DOCKS][plugin.name] = {} + window.siyuan.storage[Constants.LOCAL_PLUGIN_DOCKS][plugin.name] = {}; } window.siyuan.storage[Constants.LOCAL_PLUGIN_DOCKS][plugin.name][tabItem.type] = plugin.docks[tabItem.type].config; setStorageVal(Constants.LOCAL_PLUGIN_DOCKS, window.siyuan.storage[Constants.LOCAL_PLUGIN_DOCKS]); diff --git a/app/src/protyle/util/editorCommonEvent.ts b/app/src/protyle/util/editorCommonEvent.ts index 9dbf18c29..6605877f2 100644 --- a/app/src/protyle/util/editorCommonEvent.ts +++ b/app/src/protyle/util/editorCommonEvent.ts @@ -781,7 +781,7 @@ const dragSame = async (protyle: IProtyle, sourceElements: Element[], targetElem hasFoldHeading = true; return true; } - }) + }); if (!isCopy && (sourceElements.length > 1 || hasFoldHeading) && sourceElements[0].parentElement.classList.contains("sb") && sourceElements[0].parentElement.getAttribute("data-sb-layout") === "col") { diff --git a/app/src/protyle/wysiwyg/renderBacklink.ts b/app/src/protyle/wysiwyg/renderBacklink.ts index 30221e3d1..143b0bdba 100644 --- a/app/src/protyle/wysiwyg/renderBacklink.ts +++ b/app/src/protyle/wysiwyg/renderBacklink.ts @@ -101,7 +101,7 @@ export const getBacklinkHeadingMore = (moreElement: HTMLElement) => { export const genBreadcrumb = (blockPaths: IBreadcrumb[], renderFirst = false) => { if (1 > blockPaths.length) { - return `
`; + return '
'; } let html = "";