diff --git a/app/electron/main.js b/app/electron/main.js
index 31f8049a0..8c16bae74 100644
--- a/app/electron/main.js
+++ b/app/electron/main.js
@@ -20,7 +20,7 @@ const {
const path = require("path");
const fs = require("fs");
const gNet = require("net");
-const remote = require('@electron/remote/main');
+const remote = require("@electron/remote/main");
process.noAsar = true;
const appDir = path.dirname(app.getAppPath());
@@ -657,7 +657,7 @@ app.whenReady().then(() => {
resetTrayMenu(tray, lang, mainWindow);
};
const getWindowByContentId = (id) => {
- return BrowserWindow.fromId(BrowserWindow.getAllWindows().find((win) => win.webContents.id === id).id)
+ return BrowserWindow.fromId(BrowserWindow.getAllWindows().find((win) => win.webContents.id === id).id);
};
ipcMain.on("siyuan-open-folder", (event, filePath) => {
@@ -702,7 +702,7 @@ app.whenReady().then(() => {
return true;
}
});
- return hasMatch
+ return hasMatch;
}
});
ipcMain.once("siyuan-event", (event) => {
@@ -727,14 +727,14 @@ app.whenReady().then(() => {
currentWindow.on("leave-full-screen", () => {
event.sender.send("siyuan-event", "leave-full-screen");
});
- })
+ });
ipcMain.on("siyuan-cmd", (event, data) => {
let cmd = data;
- let webContentsId = event.sender.id
+ let webContentsId = event.sender.id;
if (typeof data !== "string") {
cmd = data.cmd;
if (data.webContentsId) {
- webContentsId = data.webContentsId
+ webContentsId = data.webContentsId;
}
}
const currentWindow = getWindowByContentId(webContentsId);
@@ -941,7 +941,7 @@ app.whenReady().then(() => {
// 系统托盘
tray = new Tray(path.join(appDir, "stage", "icon-large.png"));
tray.setToolTip(`${path.basename(data.workspaceDir)} - SiYuan v${appVer}`);
- const mainWindow = getWindowByContentId(event.sender.id)
+ const mainWindow = getWindowByContentId(event.sender.id);
resetTrayMenu(tray, data.languages, mainWindow);
tray.on("click", () => {
showHideWindow(tray, data.languages, mainWindow);
diff --git a/app/src/boot/globalEvent/click.ts b/app/src/boot/globalEvent/click.ts
index f8f0a6594..e670c5a2f 100644
--- a/app/src/boot/globalEvent/click.ts
+++ b/app/src/boot/globalEvent/click.ts
@@ -41,7 +41,7 @@ export const globalClick = (event: MouseEvent & { target: HTMLElement }) => {
const copyElement = hasTopClosestByClassName(event.target, "protyle-action__copy");
if (copyElement) {
- let text = copyElement.parentElement.nextElementSibling.textContent.trimEnd()
+ let text = copyElement.parentElement.nextElementSibling.textContent.trimEnd();
text = text.replace(/\u00A0/g, " "); // Replace non-breaking spaces with normal spaces when copying https://github.com/siyuan-note/siyuan/issues/9382
writeText(text);
showMessage(window.siyuan.languages.copied, 2000);
diff --git a/app/src/boot/onGetConfig.ts b/app/src/boot/onGetConfig.ts
index 334ba9122..1c8795d90 100644
--- a/app/src/boot/onGetConfig.ts
+++ b/app/src/boot/onGetConfig.ts
@@ -196,7 +196,7 @@ export const initWindow = async (app: App) => {
});
};
- ipcRenderer.send(Constants.SIYUAN_EVENT, "onEvent")
+ ipcRenderer.send(Constants.SIYUAN_EVENT, "onEvent");
ipcRenderer.on(Constants.SIYUAN_EVENT, (event, cmd) => {
if (cmd === "focus") {
if (getSelection().rangeCount > 0) {
@@ -227,7 +227,7 @@ export const initWindow = async (app: App) => {
document.getElementById("toolbar").style.paddingLeft = "0";
}
} else {
- winOnMaxRestore()
+ winOnMaxRestore();
}
} else if (cmd === "leave-full-screen") {
if ("darwin" === window.siyuan.config.system.os) {
diff --git a/app/src/editor/util.ts b/app/src/editor/util.ts
index 6f1ed73af..3b046729f 100644
--- a/app/src/editor/util.ts
+++ b/app/src/editor/util.ts
@@ -178,7 +178,7 @@ export const openFile = async (options: IOpenFileOptions) => {
hasMatch = await ipcRenderer.invoke(Constants.SIYUAN_GET, {
cmd: Constants.SIYUAN_OPEN_FILE,
options: optionsClone,
- })
+ });
if (hasMatch) {
if (options.afterOpen) {
options.afterOpen();
diff --git a/app/src/emoji/index.ts b/app/src/emoji/index.ts
index 8d94bb06b..607ad237f 100644
--- a/app/src/emoji/index.ts
+++ b/app/src/emoji/index.ts
@@ -232,7 +232,7 @@ export const openEmojiPanel = (id: string, type: "doc" | "notebook" | "av", posi
`
});
dialog.element.querySelector(".b3-dialog__container").setAttribute("data-menu", "true");
- const dialogElement = dialog.element.querySelector(".b3-dialog") as HTMLElement
+ const dialogElement = dialog.element.querySelector(".b3-dialog") as HTMLElement;
dialogElement.style.justifyContent = "inherit";
dialogElement.style.alignItems = "inherit";
setPosition(dialog.element.querySelector(".b3-dialog__container"), position.x, position.y, position.h, position.w);
@@ -405,7 +405,7 @@ ${unicode2Emoji(emoji.unicode)}`;
if (emojiElement) {
unicode = emojiElement.getAttribute("data-unicode");
if (type !== "av") {
- dialog.destroy()
+ dialog.destroy();
}
} else {
// 随机
diff --git a/app/src/mobile/index.ts b/app/src/mobile/index.ts
index 259b70321..3aff5636a 100644
--- a/app/src/mobile/index.ts
+++ b/app/src/mobile/index.ts
@@ -64,7 +64,7 @@ class App {
}
const copyElement = hasTopClosestByClassName(event.target, "protyle-action__copy");
if (copyElement) {
- let text = copyElement.parentElement.nextElementSibling.textContent.trimEnd()
+ let text = copyElement.parentElement.nextElementSibling.textContent.trimEnd();
text = text.replace(/\u00A0/g, " "); // Replace non-breaking spaces with normal spaces when copying https://github.com/siyuan-note/siyuan/issues/9382
writeText(text);
showMessage(window.siyuan.languages.copied, 2000);
diff --git a/app/src/protyle/breadcrumb/index.ts b/app/src/protyle/breadcrumb/index.ts
index 0530a8bce..f69deaa45 100644
--- a/app/src/protyle/breadcrumb/index.ts
+++ b/app/src/protyle/breadcrumb/index.ts
@@ -271,12 +271,12 @@ export class Breadcrumb {
click: async () => {
/// #if !BROWSER
if (window.siyuan.config.system.os === "darwin") {
- const status = await ipcRenderer.invoke(Constants.SIYUAN_GET, {cmd: "getMicrophone"})
+ const status = await ipcRenderer.invoke(Constants.SIYUAN_GET, {cmd: "getMicrophone"});
if (["denied", "restricted", "unknown"].includes(status)) {
showMessage(window.siyuan.languages.microphoneDenied);
return;
} else if (status === "not-determined") {
- const isAccess = await ipcRenderer.invoke(Constants.SIYUAN_GET, {cmd: "askMicrophone"})
+ const isAccess = await ipcRenderer.invoke(Constants.SIYUAN_GET, {cmd: "askMicrophone"});
if (!isAccess) {
showMessage(window.siyuan.languages.microphoneNotAccess);
return;
diff --git a/app/src/protyle/render/av/action.ts b/app/src/protyle/render/av/action.ts
index 334e54488..eb2a41538 100644
--- a/app/src/protyle/render/av/action.ts
+++ b/app/src/protyle/render/av/action.ts
@@ -278,15 +278,15 @@ export const avContextmenu = (protyle: IProtyle, event: MouseEvent & { detail: a
menu.addSeparator();
const editAttrSubmenu: IMenu[] = [];
rowElement.parentElement.querySelectorAll(".av__row--header .av__cell").forEach((cellElement: HTMLElement) => {
- let hideBlock = false
- const selectElements: HTMLElement[] = Array.from(blockElement.querySelectorAll(`.av__row--select:not(.av__row--header) .av__cell[data-col-id="${cellElement.dataset.colId}"]`))
+ let hideBlock = false;
+ const selectElements: HTMLElement[] = Array.from(blockElement.querySelectorAll(`.av__row--select:not(.av__row--header) .av__cell[data-col-id="${cellElement.dataset.colId}"]`));
if (cellElement.dataset.dtype === "block") {
selectElements.find(item => {
if (!item.dataset.detached) {
hideBlock = true;
return true;
}
- })
+ });
}
if (!hideBlock) {
editAttrSubmenu.push({
diff --git a/app/src/protyle/render/av/blockAttr.ts b/app/src/protyle/render/av/blockAttr.ts
index 8138658d8..2acf88905 100644
--- a/app/src/protyle/render/av/blockAttr.ts
+++ b/app/src/protyle/render/av/blockAttr.ts
@@ -9,7 +9,7 @@ export const genAVValueHTML = (value: IAVCellValue) => {
let html = "";
switch (value.type) {
case "text":
- html = ``;
+ html = ``;
break;
case "number":
html = ``;
diff --git a/app/src/protyle/render/av/col.ts b/app/src/protyle/render/av/col.ts
index d63ed6eab..fcea23b6f 100644
--- a/app/src/protyle/render/av/col.ts
+++ b/app/src/protyle/render/av/col.ts
@@ -424,7 +424,7 @@ export const showColMenu = (protyle: IProtyle, blockElement: Element, cellElemen
data: cellElement.dataset.icon,
}]);
iconElement.setAttribute("data-icon", unicode);
- iconElement.innerHTML = unicode ? unicode2Emoji(unicode) : ``
+ iconElement.innerHTML = unicode ? unicode2Emoji(unicode) : ``;
updateAttrViewCellAnimation(cellElement);
});
event.preventDefault();
diff --git a/app/src/protyle/render/av/openMenuPanel.ts b/app/src/protyle/render/av/openMenuPanel.ts
index c6828fa73..0406a6fcf 100644
--- a/app/src/protyle/render/av/openMenuPanel.ts
+++ b/app/src/protyle/render/av/openMenuPanel.ts
@@ -522,8 +522,8 @@ export const openMenuPanel = (options: {
avID,
data: target.dataset.icon,
}]);
- target.innerHTML = unicode ? unicode2Emoji(unicode) : ``
- updateAttrViewCellAnimation(options.blockElement.querySelector(`.av__row--header .av__cell[data-col-id="${colId}"]`))
+ target.innerHTML = unicode ? unicode2Emoji(unicode) : ``;
+ updateAttrViewCellAnimation(options.blockElement.querySelector(`.av__row--header .av__cell[data-col-id="${colId}"]`));
});
event.preventDefault();
event.stopPropagation();
diff --git a/app/src/protyle/util/selection.ts b/app/src/protyle/util/selection.ts
index ae83923c4..4b1d09b7d 100644
--- a/app/src/protyle/util/selection.ts
+++ b/app/src/protyle/util/selection.ts
@@ -534,7 +534,7 @@ export const focusBlock = (element: Element, parentElement?: HTMLElement, toStar
return false;
}
} else if (element.classList.contains("av")) {
- const avTitleElement = element.querySelector(".av__title")
+ const avTitleElement = element.querySelector(".av__title");
if (avTitleElement) {
const range = document.createRange();
range.selectNodeContents(avTitleElement);
diff --git a/app/src/protyle/wysiwyg/keydown.ts b/app/src/protyle/wysiwyg/keydown.ts
index d8d3b7742..34b3d1a18 100644
--- a/app/src/protyle/wysiwyg/keydown.ts
+++ b/app/src/protyle/wysiwyg/keydown.ts
@@ -53,7 +53,6 @@ import {
upSelect
} from "./commonHotkey";
import {enterBack, fileAnnotationRefMenu, linkMenu, refMenu, setFold, tagMenu, zoomOut} from "../../menus/protyle";
-import {removeEmbed} from "./removeEmbed";
import {openAttr} from "../../menus/commonMenuItem";
import {Constants} from "../../constants";
import {fetchPost} from "../../util/fetch";
diff --git a/app/src/window/index.ts b/app/src/window/index.ts
index 3c30c6c0b..492a5de21 100644
--- a/app/src/window/index.ts
+++ b/app/src/window/index.ts
@@ -7,7 +7,7 @@ import {addScript, addScriptSync} from "../protyle/util/addScript";
import {genUUID} from "../util/genID";
import {fetchGet, fetchPost} from "../util/fetch";
import {addBaseURL, setNoteBook} from "../util/pathName";
-import {openFile, openFileById} from "../editor/util";
+import {openFileById} from "../editor/util";
import {
processSync, progressBackgroundTask,
progressLoading,