diff --git a/app/src/boot/globalShortcut.ts b/app/src/boot/globalShortcut.ts
index a7a703cb4..e5f88acfc 100644
--- a/app/src/boot/globalShortcut.ts
+++ b/app/src/boot/globalShortcut.ts
@@ -365,7 +365,7 @@ export const globalShortcut = () => {
const currentType = currentLiElement.getAttribute("data-type");
if (currentType) {
if (currentType === "riffCard") {
- openCard()
+ openCard();
} else {
getDockByType(currentType as TDockType).toggleModel(currentType as TDockType, true);
}
@@ -931,7 +931,7 @@ const dialogArrow = (element: HTMLElement, event: KeyboardEvent) => {
const currentType = currentLiElement.getAttribute("data-type");
if (currentType) {
if (currentType === "riffCard") {
- openCard()
+ openCard();
} else {
getDockByType(currentType as TDockType).toggleModel(currentType as TDockType, true);
}
diff --git a/app/src/boot/openChangelog.ts b/app/src/boot/openChangelog.ts
index 94303753d..6f8c03913 100644
--- a/app/src/boot/openChangelog.ts
+++ b/app/src/boot/openChangelog.ts
@@ -12,8 +12,8 @@ export const openChangelog = () => {
const dialog = new Dialog({
title: `v${Constants.SIYUAN_VERSION} ${window.siyuan.languages.update}`,
width: isMobile() ? "80vw" : "520px",
- content: `
${response.data.html}
`
+ content: `${response.data.html}
`
});
highlightRender(dialog.element);
});
-}
+};
diff --git a/app/src/mobile/util/keyboardToolbar.ts b/app/src/mobile/util/keyboardToolbar.ts
index b033dc7e0..ecdfb5925 100644
--- a/app/src/mobile/util/keyboardToolbar.ts
+++ b/app/src/mobile/util/keyboardToolbar.ts
@@ -162,7 +162,7 @@ const showKeyboardToolbarUtil = (oldScrollTop: number) => {
};
const hideKeyboardToolbarUtil = () => {
- const toolbarElement = document.getElementById("keyboardToolbar")
+ const toolbarElement = document.getElementById("keyboardToolbar");
toolbarElement.style.height = "";
window.siyuan.mobile.editor.protyle.element.style.marginBottom = "42px";
toolbarElement.querySelector('.keyboard__action[data-type="add"]').classList.remove("protyle-toolbar__item--current");
diff --git a/app/src/mobile/util/touch.ts b/app/src/mobile/util/touch.ts
index f8e5ccdfd..f9b54e046 100644
--- a/app/src/mobile/util/touch.ts
+++ b/app/src/mobile/util/touch.ts
@@ -50,9 +50,9 @@ export const handleTouchEnd = (event: TouchEvent) => {
hasClosestByAttribute(target, "data-type", "NodeTable");
if (scrollElement) {
if (scrollElement.classList.contains("table")) {
- scrollElement = scrollElement.firstElementChild as HTMLElement
+ scrollElement = scrollElement.firstElementChild as HTMLElement;
} else if (scrollElement.classList.contains("code-block")) {
- scrollElement = scrollElement.firstElementChild.nextElementSibling as HTMLElement
+ scrollElement = scrollElement.firstElementChild.nextElementSibling as HTMLElement;
}
if ((xDiff <= 0 && scrollElement.scrollLeft > 0) ||
(xDiff >= 0 && scrollElement.clientWidth + scrollElement.scrollLeft < scrollElement.scrollWidth)) {
@@ -196,9 +196,9 @@ export const handleTouchMove = (event: TouchEvent) => {
hasClosestByAttribute(target, "data-type", "NodeTable");
if (scrollElement) {
if (scrollElement.classList.contains("table")) {
- scrollElement = scrollElement.firstElementChild as HTMLElement
+ scrollElement = scrollElement.firstElementChild as HTMLElement;
} else if (scrollElement.classList.contains("code-block")) {
- scrollElement = scrollElement.firstElementChild.nextElementSibling as HTMLElement
+ scrollElement = scrollElement.firstElementChild.nextElementSibling as HTMLElement;
}
if ((xDiff < 0 && scrollElement.scrollLeft > 0) ||
(xDiff > 0 && scrollElement.clientWidth + scrollElement.scrollLeft < scrollElement.scrollWidth)) {
diff --git a/app/src/protyle/util/setEditMode.ts b/app/src/protyle/util/setEditMode.ts
index 42760637c..bd0e9c4a1 100644
--- a/app/src/protyle/util/setEditMode.ts
+++ b/app/src/protyle/util/setEditMode.ts
@@ -12,7 +12,7 @@ export const setEditMode = (protyle: IProtyle, type: TEditorMode) => {
if (protyle.options.render.breadcrumb) {
protyle.breadcrumb?.element.classList.add("fn__none");
if (protyle.block.showAll) {
- const exitFocusElement = protyle.breadcrumb.element.parentElement.querySelector('[data-type="exit-focus"]')
+ const exitFocusElement = protyle.breadcrumb.element.parentElement.querySelector('[data-type="exit-focus"]');
exitFocusElement.classList.add("fn__none");
exitFocusElement.nextElementSibling.classList.add("fn__none");
}
@@ -32,7 +32,7 @@ export const setEditMode = (protyle: IProtyle, type: TEditorMode) => {
if (protyle.options.render.breadcrumb) {
protyle.breadcrumb?.element.classList.remove("fn__none");
if (protyle.block.showAll) {
- const exitFocusElement = protyle.breadcrumb.element.parentElement.querySelector('[data-type="exit-focus"]')
+ const exitFocusElement = protyle.breadcrumb.element.parentElement.querySelector('[data-type="exit-focus"]');
exitFocusElement.classList.remove("fn__none");
exitFocusElement.nextElementSibling.classList.remove("fn__none");
}
diff --git a/app/src/search/util.ts b/app/src/search/util.ts
index 14fe2bc3f..1fda62a1b 100644
--- a/app/src/search/util.ts
+++ b/app/src/search/util.ts
@@ -98,7 +98,7 @@ export const openGlobalSearch = (text: string, replace: boolean) => {
};
const newEmptyFileByInput = (value: string) => {
- const newData = getNewFilePath(true)
+ const newData = getNewFilePath(true);
fetchPost("/api/filetree/getHPathByPath", {
notebook: newData.notebookId,
path: newData.currentPath,
@@ -552,7 +552,7 @@ export const genSearch = (config: ISearchOption, element: Element, closeCB?: ()
replaceInputElement.value = target.textContent;
replaceHistoryElement.classList.add("fn__none");
} else if (target.getAttribute("data-type") === "search-new") {
- newEmptyFileByInput(searchInputElement.value)
+ newEmptyFileByInput(searchInputElement.value);
} else if (target.getAttribute("data-type") === "search-item") {
if (event.detail === 1) {
clickTimeout = window.setTimeout(() => {
@@ -635,7 +635,7 @@ export const genSearch = (config: ISearchOption, element: Element, closeCB?: ()
if (!currentList || event.isComposing) {
return;
}
- const focusIsNew = currentList.getAttribute("data-type") === "search-new"
+ const focusIsNew = currentList.getAttribute("data-type") === "search-new";
if (focusIsNew && matchHotKey(window.siyuan.config.keymap.general.newFile.custom, event)) {
newEmptyFileByInput(searchInputElement.value);
event.preventDefault();
@@ -644,7 +644,7 @@ export const genSearch = (config: ISearchOption, element: Element, closeCB?: ()
}
if (event.key === "Enter") {
if (focusIsNew) {
- newEmptyFileByInput(searchInputElement.value)
+ newEmptyFileByInput(searchInputElement.value);
} else {
const id = currentList.getAttribute("data-node-id");
fetchPost("/api/block/checkBlockFold", {id}, (foldResponse) => {
@@ -1334,7 +1334,7 @@ const replace = (element: Element, config: ISearchOption, edit: Protyle, isAll:
if (currentList.nextElementSibling || currentList.previousElementSibling) {
currentList.remove();
} else {
- const nextDocElement = currentList.parentElement.nextElementSibling || currentList.parentElement.previousElementSibling.previousElementSibling?.previousElementSibling
+ const nextDocElement = currentList.parentElement.nextElementSibling || currentList.parentElement.previousElementSibling.previousElementSibling?.previousElementSibling;
if (nextDocElement) {
nextDocElement.nextElementSibling.firstElementChild.classList.add("b3-list-item--focus");
nextDocElement.nextElementSibling.classList.remove("fn__none");
diff --git a/app/src/util/newFile.ts b/app/src/util/newFile.ts
index b487f6177..2aa15c67a 100644
--- a/app/src/util/newFile.ts
+++ b/app/src/util/newFile.ts
@@ -12,8 +12,8 @@ import {Constants} from "../constants";
import {validateName} from "../editor/rename";
export const getNewFilePath = (useSavePath: boolean) => {
- let notebookId = ""
- let currentPath = ""
+ let notebookId = "";
+ let currentPath = "";
/// #if !MOBILE
getAllModels().editor.find((item) => {
const currentElement = item.parent.headElement;
@@ -57,8 +57,8 @@ export const getNewFilePath = (useSavePath: boolean) => {
}
});
}
- return {notebookId, currentPath}
-}
+ return {notebookId, currentPath};
+};
export const newFile = (notebookId?: string, currentPath?: string, paths?: string[], useSavePath = false) => {
if (getOpenNotebookCount() === 0) {
@@ -66,7 +66,7 @@ export const newFile = (notebookId?: string, currentPath?: string, paths?: strin
return;
}
if (!notebookId) {
- const resultData = getNewFilePath(useSavePath)
+ const resultData = getNewFilePath(useSavePath);
notebookId = resultData.notebookId;
currentPath = resultData.currentPath;
}