From 17a619a55b4a22ca34bd5eb929a4d12bae581a4b Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sat, 4 May 2024 16:43:35 +0800 Subject: [PATCH] :rotating_light: --- app/src/block/util.ts | 2 +- app/src/boot/globalEvent/commandPanel.ts | 2 +- app/src/menus/util.ts | 4 ++-- app/src/protyle/render/av/addToDatabase.ts | 4 ++-- app/src/protyle/render/highlightRender.ts | 1 - app/src/protyle/wysiwyg/remove.ts | 2 +- 6 files changed, 7 insertions(+), 8 deletions(-) diff --git a/app/src/block/util.ts b/app/src/block/util.ts index 3f0a6ff0e..ec34570a6 100644 --- a/app/src/block/util.ts +++ b/app/src/block/util.ts @@ -86,7 +86,7 @@ export const jumpToParent = (protyle: IProtyle, nodeElement: Element, type: "par app: protyle.app, id: targetId, action: [Constants.CB_GET_FOCUS, targetId !== protyle.block.rootID && protyle.block.showAll ? Constants.CB_GET_ALL : ""] - }) + }); /// #else openMobileFileById(protyle.app, targetId, [Constants.CB_GET_FOCUS, targetId !== protyle.block.rootID && protyle.block.showAll ? Constants.CB_GET_ALL : ""]); /// #endif diff --git a/app/src/boot/globalEvent/commandPanel.ts b/app/src/boot/globalEvent/commandPanel.ts index 354f1a5ca..aa8d283ad 100644 --- a/app/src/boot/globalEvent/commandPanel.ts +++ b/app/src/boot/globalEvent/commandPanel.ts @@ -37,7 +37,7 @@ export const commandPanel = (app: App) => { dialog.element.setAttribute("data-key", Constants.DIALOG_COMMANDPANEL); const listElement = dialog.element.querySelector("#commands"); /// #if !MOBILE - let html = "" + let html = ""; Object.keys(window.siyuan.config.keymap.general).forEach((key) => { if (["addToDatabase"].includes(key)) { html += `
  • diff --git a/app/src/menus/util.ts b/app/src/menus/util.ts index d50bc7928..aaad5ec20 100644 --- a/app/src/menus/util.ts +++ b/app/src/menus/util.ts @@ -57,7 +57,7 @@ export const openEditorTab = (app: App, ids: string[], notebookId?: string, path zoomIn }); }); - }) + }); } } }, { @@ -83,7 +83,7 @@ export const openEditorTab = (app: App, ids: string[], notebookId?: string, path zoomIn }); }); - }) + }); } } }]; diff --git a/app/src/protyle/render/av/addToDatabase.ts b/app/src/protyle/render/av/addToDatabase.ts index 9bbbde54e..aa03a838e 100644 --- a/app/src/protyle/render/av/addToDatabase.ts +++ b/app/src/protyle/render/av/addToDatabase.ts @@ -31,7 +31,7 @@ export const addFilesToDatabase = (fileLiElements: Element[]) => { }]); }); } -} +}; export const addEditorToDatabase = (protyle: IProtyle, range: Range, type?: string) => { if (protyle.title?.editElement.contains(range.startContainer) || type === "title") { @@ -100,4 +100,4 @@ export const addEditorToDatabase = (protyle: IProtyle, range: Range, type?: stri focusByRange(range); }); } -} +}; diff --git a/app/src/protyle/render/highlightRender.ts b/app/src/protyle/render/highlightRender.ts index 10db9448f..7105d9ec3 100644 --- a/app/src/protyle/render/highlightRender.ts +++ b/app/src/protyle/render/highlightRender.ts @@ -2,7 +2,6 @@ import {addScript} from "../util/addScript"; import {Constants} from "../../constants"; import {focusByOffset} from "../util/selection"; import {setCodeTheme} from "../../util/assets"; -import {hasClosestByClassName} from "../util/hasClosest"; export const highlightRender = (element: Element, cdn = Constants.PROTYLE_CDN) => { let codeElements: NodeListOf; diff --git a/app/src/protyle/wysiwyg/remove.ts b/app/src/protyle/wysiwyg/remove.ts index 26e530185..5f1df1c27 100644 --- a/app/src/protyle/wysiwyg/remove.ts +++ b/app/src/protyle/wysiwyg/remove.ts @@ -171,7 +171,7 @@ export const removeBlock = (protyle: IProtyle, blockElement: Element, range: Ran hideElements(["util"], protyle); return; } - const blockType = blockElement.getAttribute("data-type") + const blockType = blockElement.getAttribute("data-type"); // 空代码块直接删除 if (blockType === "NodeCodeBlock" && getContenteditableElement(blockElement).textContent.trim() === "") { blockElement.classList.add("protyle-wysiwyg--select");