diff --git a/app/src/config/editor.ts b/app/src/config/editor.ts index bbc702d49..330639e5d 100644 --- a/app/src/config/editor.ts +++ b/app/src/config/editor.ts @@ -16,11 +16,11 @@ export const editor = { } window.siyuan.config.editor.readOnly = readOnly; if (readOnly) { - target.classList.add("toolbar__item--active") + target.classList.add("toolbar__item--active"); target.setAttribute("aria-label", `${window.siyuan.languages.use} ${window.siyuan.languages.editMode} ${updateHotkeyTip(window.siyuan.config.keymap.general.editMode.custom)}`); target.querySelector("use").setAttribute("xlink:href", "#iconPreview"); } else { - target.classList.remove("toolbar__item--active") + target.classList.remove("toolbar__item--active"); target.setAttribute("aria-label", `${window.siyuan.languages.use} ${window.siyuan.languages.editReadonly} ${updateHotkeyTip(window.siyuan.config.keymap.general.editMode.custom)}`); target.querySelector("use").setAttribute("xlink:href", "#iconEdit"); } diff --git a/app/src/dialog/processSystem.ts b/app/src/dialog/processSystem.ts index a0715fc1d..5e50ee6b2 100644 --- a/app/src/dialog/processSystem.ts +++ b/app/src/dialog/processSystem.ts @@ -272,7 +272,7 @@ export const bootSync = () => { }); }; -export const setTitle = (title: string, protyle?: IProtyle) => { +export const setTitle = (title: string) => { const dragElement = document.getElementById("drag"); const workspaceName = getWorkspaceName(); if (title === window.siyuan.languages.siyuanNote) { diff --git a/app/src/layout/dock/util.ts b/app/src/layout/dock/util.ts index b948d3bda..5e2e2e937 100644 --- a/app/src/layout/dock/util.ts +++ b/app/src/layout/dock/util.ts @@ -4,8 +4,6 @@ import {Graph} from "./Graph"; import {Outline} from "./Outline"; import {switchWnd} from "../util"; import {Backlink} from "./Backlink"; -import {Dialog} from "../../dialog"; -import {fetchPost} from "../../util/fetch"; export const openBacklink = (protyle: IProtyle) => { const backlink = getAllModels().backlink.find(item => { diff --git a/app/src/layout/status.ts b/app/src/layout/status.ts index 25423a827..071d5a2b6 100644 --- a/app/src/layout/status.ts +++ b/app/src/layout/status.ts @@ -9,7 +9,6 @@ import {mountHelp} from "../util/mount"; import {getCurrentWindow} from "@electron/remote"; /// #endif /// #endif -import {isBrowser} from "../util/functions"; import {MenuItem} from "../menus/Menu"; export const initStatus = () => { @@ -117,7 +116,7 @@ export const initStatus = () => { window.open("https://github.com/siyuan-note/siyuan"); } }).element); - const rect = target.getBoundingClientRect() + const rect = target.getBoundingClientRect(); window.siyuan.menus.menu.popup({x: rect.right, y: rect.bottom, h: rect.height}, true); event.stopPropagation(); break; diff --git a/app/src/layout/util.ts b/app/src/layout/util.ts index aafed449d..65ba82f14 100644 --- a/app/src/layout/util.ts +++ b/app/src/layout/util.ts @@ -299,7 +299,7 @@ export const JSONToLayout = (isStart: boolean) => { }); } // https://github.com/siyuan-note/siyuan/pull/7086 - const openId = getSearch("id", window.location.href) + const openId = getSearch("id", window.location.href); if (openId) { openFileById({ id: getSearch("id", window.location.href), diff --git a/app/src/menus/protyle.ts b/app/src/menus/protyle.ts index d9ffe5e7c..93429d418 100644 --- a/app/src/menus/protyle.ts +++ b/app/src/menus/protyle.ts @@ -466,13 +466,13 @@ export const zoomOut = (protyle: IProtyle, id: string, focusId?: string, isPushB pushBack(); } } else { - const exitFocusElement = protyle.breadcrumb.element.parentElement.querySelector('[data-type="exit-focus"]') + const exitFocusElement = protyle.breadcrumb.element.parentElement.querySelector('[data-type="exit-focus"]'); if (id === protyle.block.rootID) { - exitFocusElement.classList.add("fn__none") - exitFocusElement.nextElementSibling.classList.add("fn__none") + exitFocusElement.classList.add("fn__none"); + exitFocusElement.nextElementSibling.classList.add("fn__none"); } else { - exitFocusElement.classList.remove("fn__none") - exitFocusElement.nextElementSibling.classList.remove("fn__none") + exitFocusElement.classList.remove("fn__none"); + exitFocusElement.nextElementSibling.classList.remove("fn__none"); } } fetchPost("/api/filetree/getDoc", { diff --git a/app/src/mobile/util/initFramework.ts b/app/src/mobile/util/initFramework.ts index 930a049bb..927d43aa4 100644 --- a/app/src/mobile/util/initFramework.ts +++ b/app/src/mobile/util/initFramework.ts @@ -19,7 +19,6 @@ import {MobileBookmarks} from "./MobileBookmarks"; import {MobileTags} from "./MobileTags"; import {hideKeyboardToolbar, initKeyboardToolbar} from "./showKeyboardToolbar"; import {getSearch} from "../../util/functions"; -import {openFileById} from "../../editor/util"; export const initFramework = () => { setInlineStyle(); diff --git a/app/src/protyle/breadcrumb/index.ts b/app/src/protyle/breadcrumb/index.ts index 34c92cef8..e503fa42b 100644 --- a/app/src/protyle/breadcrumb/index.ts +++ b/app/src/protyle/breadcrumb/index.ts @@ -35,7 +35,7 @@ export class Breadcrumb { constructor(protyle: IProtyle) { const element = document.createElement("div"); element.className = "protyle-breadcrumb"; - const isFocus = protyle.options.action.includes(Constants.CB_GET_ALL) + const isFocus = protyle.options.action.includes(Constants.CB_GET_ALL); let html = `
@@ -71,7 +71,7 @@ export class Breadcrumb { } else if (target.getAttribute("data-type") === "exit-focus") { zoomOut(protyle, protyle.block.rootID); event.preventDefault(); - break + break; } else if (target.getAttribute("data-type") === "context") { if (target.classList.contains("block__icon--active")) { fetchPost("/api/filetree/getDoc", { diff --git a/app/src/util/onGetConfig.ts b/app/src/util/onGetConfig.ts index caaef1b19..1b96048d3 100644 --- a/app/src/util/onGetConfig.ts +++ b/app/src/util/onGetConfig.ts @@ -1,5 +1,5 @@ import {openSearch} from "../search/spread"; -import {exportLayout, getInstanceById, JSONToLayout, resetLayout, resizeDrag, resizeTabs} from "../layout/util"; +import {exportLayout, JSONToLayout, resetLayout, resizeDrag, resizeTabs} from "../layout/util"; import {hotKey2Electron, setStorageVal, updateHotkeyTip} from "../protyle/util/compatibility"; /// #if !BROWSER import {dialog, getCurrentWindow} from "@electron/remote"; @@ -28,9 +28,6 @@ import {editor} from "../config/editor"; import {goBack, goForward} from "./backForward"; import {replaceLocalPath} from "../editor/rename"; import {workspaceMenu} from "../menus/workspace"; -import {Tab} from "../layout/Tab"; -import {Editor} from "../editor"; -import {zoomOut} from "../menus/protyle"; import { getWorkspaceName } from "./noRelyPCFunction"; const matchKeymap = (keymap: Record