diff --git a/app/src/config/about.ts b/app/src/config/about.ts index 16a8f9f1a..359e07014 100644 --- a/app/src/config/about.ts +++ b/app/src/config/about.ts @@ -317,8 +317,7 @@ export const about = { }); about.element.querySelector("#purgeRepo").addEventListener("click", () => { confirmDialog("♻️ " + window.siyuan.languages.dataRepoPurge, window.siyuan.languages.dataRepoPurgeConfirm, () => { - fetchPost("/api/repo/purgeRepo", {}, () => { - }); + fetchPost("/api/repo/purgeRepo"); }); }); const networkServeElement = about.element.querySelector("#networkServe") as HTMLInputElement; diff --git a/app/src/history/history.ts b/app/src/history/history.ts index 0b25289d0..0269ee23e 100644 --- a/app/src/history/history.ts +++ b/app/src/history/history.ts @@ -168,7 +168,7 @@ const renderRepoItem = (response: IWebSocketData, element: Element, type: string if (item.typesCount) { item.typesCount.forEach(subItem => { statHTML += `${subItem.type} ${subItem.count}`; - }) + }); } statHTML+=""; @@ -183,7 +183,7 @@ const renderRepoItem = (response: IWebSocketData, element: Element, type: string ${window.siyuan.languages.fileSize} ${item.hSize} -${statHTML}` +${statHTML}`; /// #if MOBILE repoHTML += `
  • @@ -204,7 +204,7 @@ ${actionHTML} }; const renderRepo = (element: Element, currentPage: number) => { - const selectValue = (element.querySelector(".b3-select") as HTMLSelectElement).value + const selectValue = (element.querySelector(".b3-select") as HTMLSelectElement).value; element.lastElementChild.innerHTML = '
  • '; const previousElement = element.querySelector('[data-type="previous"]'); const nextElement = element.querySelector('[data-type="next"]'); diff --git a/app/src/layout/dock/Inbox.ts b/app/src/layout/dock/Inbox.ts index f876890eb..63bbd7e85 100644 --- a/app/src/layout/dock/Inbox.ts +++ b/app/src/layout/dock/Inbox.ts @@ -12,7 +12,6 @@ import {replaceFileName} from "../../editor/rename"; import {escapeHtml} from "../../util/escape"; import {unicode2Emoji} from "../../emoji"; import {Constants} from "../../constants"; -import {isMobile} from "../../util/functions"; export class Inbox extends Model { private element: Element; diff --git a/app/src/mobile/menu/search.ts b/app/src/mobile/menu/search.ts index 4214bf2dd..5716fb1e1 100644 --- a/app/src/mobile/menu/search.ts +++ b/app/src/mobile/menu/search.ts @@ -217,7 +217,7 @@ const updateSearchResult = (config: ISearchOption, element: Element) => { }); } else { if (!config.page) { - config.page = 1 + config.page = 1; } if (config.page > 1) { previousElement.removeAttribute("disabled"); diff --git a/app/src/mobile/settings/about.ts b/app/src/mobile/settings/about.ts index 536d69aef..812e343ae 100644 --- a/app/src/mobile/settings/about.ts +++ b/app/src/mobile/settings/about.ts @@ -253,8 +253,7 @@ export const initAbout = () => { break; } else if (target.id === "purgeRepo") { confirmDialog("♻️ " + window.siyuan.languages.dataRepoPurge, window.siyuan.languages.dataRepoPurgeConfirm, () => { - fetchPost("/api/repo/purgeRepo", {}, () => { - }); + fetchPost("/api/repo/purgeRepo"); }); event.preventDefault(); event.stopPropagation(); diff --git a/app/src/mobile/util/touch.ts b/app/src/mobile/util/touch.ts index ad5a31f27..86c009720 100644 --- a/app/src/mobile/util/touch.ts +++ b/app/src/mobile/util/touch.ts @@ -24,7 +24,7 @@ const popSide = (render = true) => { }; export const handleTouchEnd = (event: TouchEvent) => { - const editor = getCurrentEditor() + const editor = getCurrentEditor(); if (editor) { document.querySelectorAll(".protyle-breadcrumb__bar--hide").forEach(item => { item.classList.remove("protyle-breadcrumb__bar--hide"); @@ -36,7 +36,7 @@ export const handleTouchEnd = (event: TouchEvent) => { target.tagName === "SPAN" && window.webkit?.messageHandlers && !hasClosestByAttribute(target, "data-type", "NodeBlockQueryEmbed")) { // ios 长按行内元素弹出菜单 - const types = (target.getAttribute("data-type") || "").split(" ") + const types = (target.getAttribute("data-type") || "").split(" "); if (types.includes("inline-memo")) { editor.protyle.toolbar.showRender(editor.protyle, target); } diff --git a/app/src/protyle/hint/index.ts b/app/src/protyle/hint/index.ts index aa8a72187..0a7635676 100644 --- a/app/src/protyle/hint/index.ts +++ b/app/src/protyle/hint/index.ts @@ -488,7 +488,7 @@ ${unicode2Emoji(emoji.unicode, true)}`; tempElement.innerHTML = value.replace(//g, "").replace(/<\/mark>/g, ""); tempElement = tempElement.firstElementChild as HTMLDivElement; if (refIsS) { - const staticText = range.toString().replace(this.splitChar, "") + const staticText = range.toString().replace(this.splitChar, ""); if (staticText) { tempElement.setAttribute("data-subtype", "s"); tempElement.innerText = staticText; diff --git a/app/src/protyle/wysiwyg/keydown.ts b/app/src/protyle/wysiwyg/keydown.ts index 4e92741e2..df88e2b25 100644 --- a/app/src/protyle/wysiwyg/keydown.ts +++ b/app/src/protyle/wysiwyg/keydown.ts @@ -63,7 +63,6 @@ import {BlockPanel} from "../../block/Panel"; import * as dayjs from "dayjs"; import {highlightRender} from "../markdown/highlightRender"; import {countBlockWord} from "../../layout/status"; -import {openMobileFileById} from "../../mobile/editor"; import {moveToDown, moveToUp} from "./move"; import {pasteAsPlainText} from "../util/paste"; import {preventScroll} from "../scroll/preventScroll"; diff --git a/app/src/search/util.ts b/app/src/search/util.ts index d8e9b2842..b1f1d3dca 100644 --- a/app/src/search/util.ts +++ b/app/src/search/util.ts @@ -286,7 +286,7 @@ export const genSearch = (config: ISearchOption, element: Element, closeCB?: () let target = event.target as HTMLElement; const searchPathInputElement = element.querySelector("#searchPathInput"); while (target && !target.isSameNode(element)) { - const type = target.getAttribute("data-type") + const type = target.getAttribute("data-type"); if (type === "next") { if (!target.getAttribute("disabled")) { config.page++; @@ -1074,7 +1074,7 @@ const inputEvent = (element: Element, config: ISearchOption, inputTimeout: numbe page: config.page || 1, }, (response) => { if (!config.page) { - config.page = 1 + config.page = 1; } if (config.page < response.data.pageCount) { nextElement.removeAttribute("disabled");