Explorar el Código

:rotating_light:

Vanessa hace 2 años
padre
commit
2494412f77

+ 3 - 3
app/src/history/history.ts

@@ -230,11 +230,11 @@ const renderRepo = (element: Element, currentPage: number) => {
         });
         previousElement.classList.add("fn__none");
         nextElement.classList.add("fn__none");
-        pageElement.classList.add("fn__none")
+        pageElement.classList.add("fn__none");
     } else {
         previousElement.classList.remove("fn__none");
         nextElement.classList.remove("fn__none");
-        pageElement.classList.remove("fn__none")
+        pageElement.classList.remove("fn__none");
         element.setAttribute("data-page", currentPage.toString());
         if (currentPage > 1) {
             previousElement.removeAttribute("disabled");
@@ -514,7 +514,7 @@ const bindEvent = (element: Element, dialog?: Dialog) => {
             } else if (type === "more") {
                 target.parentElement.parentElement.querySelectorAll(".b3-list-item__meta").forEach(item => {
                     item.classList.toggle("fn__none");
-                })
+                });
                 event.stopPropagation();
                 event.preventDefault();
                 break;

+ 1 - 1
app/src/layout/dock/Bookmark.ts

@@ -89,7 +89,7 @@ export class Bookmark extends Model {
                 }
             },
             rightClick: (element: HTMLElement, event: MouseEvent) => {
-                openBookmarkMenu(element, event, this)
+                openBookmarkMenu(element, event, this);
             },
             ctrlClick(element: HTMLElement) {
                 openFileById({

+ 2 - 2
app/src/menus/bookmark.ts

@@ -63,7 +63,7 @@ export const openBookmarkMenu = (element: HTMLElement, event: MouseEvent, bookma
                 confirmDialog(window.siyuan.languages.deleteOpConfirm, `${window.siyuan.languages.confirmDelete} <b>${escapeHtml(bookmarkText)}</b>?`, () => {
                     if (id) {
                         fetchPost("/api/attr/setBlockAttrs", {id, attrs: {bookmark: ""}}, () => {
-                            bookmarkObj.update()
+                            bookmarkObj.update();
                         });
                         document.querySelectorAll(`.protyle-wysiwyg [data-node-id="${id}"]`).forEach((item) => {
                             item.setAttribute("bookmark", "");
@@ -81,4 +81,4 @@ export const openBookmarkMenu = (element: HTMLElement, event: MouseEvent, bookma
     }
     window.siyuan.menus.menu.element.style.zIndex = "221";  // 移动端被右侧栏遮挡
     window.siyuan.menus.menu.popup({x: event.clientX, y: event.clientY});
-}
+};

+ 2 - 2
app/src/menus/navigation.ts

@@ -402,7 +402,7 @@ export const initFileMenu = (notebookId: string, pathString: string, liElement:
             icon: "iconSearch",
             accelerator: window.siyuan.config.keymap.general.search.custom,
             async click() {
-                const searchPath = getDisplayName(pathString, false, true)
+                const searchPath = getDisplayName(pathString, false, true);
                 /// #if MOBILE
                 const response = await fetchSyncPost("/api/filetree/getHPathByPath", {
                     notebook: notebookId,
@@ -432,7 +432,7 @@ export const initFileMenu = (notebookId: string, pathString: string, liElement:
             accelerator: window.siyuan.config.keymap.general.replace.custom,
             icon: "iconReplace",
             async click() {
-                const searchPath = getDisplayName(pathString, false, true)
+                const searchPath = getDisplayName(pathString, false, true);
                 /// #if MOBILE
                 const response = await fetchSyncPost("/api/filetree/getHPathByPath", {
                     notebook: notebookId,

+ 1 - 1
app/src/mobile/dock/MobileBookmarks.ts

@@ -32,7 +32,7 @@ export class MobileBookmarks {
                 const id = element.getAttribute("data-node-id");
                 const actionElement = hasClosestByClassName(event.target as HTMLElement, "b3-list-item__action");
                 if (actionElement) {
-                    openBookmarkMenu(actionElement.parentElement, event, this)
+                    openBookmarkMenu(actionElement.parentElement, event, this);
                 } else {
                     fetchPost("/api/block/checkBlockFold", {id}, (foldResponse) => {
                         openMobileFileById(id, foldResponse.data ? [Constants.CB_GET_FOCUS, Constants.CB_GET_ALL, Constants.CB_GET_HTML] : [Constants.CB_GET_FOCUS, Constants.CB_GET_SETID, Constants.CB_GET_CONTEXT, Constants.CB_GET_HTML]);

+ 1 - 1
app/src/util/serviceWorker.ts

@@ -1,5 +1,5 @@
 // https://github.com/siyuan-note/siyuan/pull/8012
-export const registerServiceWorker = (scriptURL: string, scope: string = "/", workerType: WorkerType = "module") => {
+export const registerServiceWorker = (scriptURL: string, scope = "/", workerType: WorkerType = "module") => {
     if (!("serviceWorker" in navigator) || typeof (navigator.serviceWorker) === "undefined" ||
         !("caches" in window) || !("fetch" in window)) {
         return;