Browse Source

:rotating_light:

Vanessa 2 years ago
parent
commit
cddb7a7a25

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

@@ -8,7 +8,6 @@ import {updateHotkeyTip} from "../../protyle/util/compatibility";
 import {openFileById} from "../../editor/util";
 import {Constants} from "../../constants";
 import {Dialog} from "../../dialog";
-import {isMobile} from "../../util/functions";
 import {confirmDialog} from "../../dialog/confirmDialog";
 import {escapeHtml} from "../../util/escape";
 

+ 0 - 1
app/src/layout/dock/Tag.ts

@@ -7,7 +7,6 @@ import {updateHotkeyTip} from "../../protyle/util/compatibility";
 import {openGlobalSearch} from "../../search/util";
 import {MenuItem} from "../../menus/Menu";
 import {Dialog} from "../../dialog";
-import {isMobile} from "../../util/functions";
 import {confirmDialog} from "../../dialog/confirmDialog";
 import {escapeHtml} from "../../util/escape";
 

+ 2 - 3
app/src/mobile/util/MobileBookmarks.ts

@@ -6,7 +6,6 @@ import {openMobileFileById} from "../editor";
 import {confirmDialog} from "../../dialog/confirmDialog";
 import {escapeHtml} from "../../util/escape";
 import {Dialog} from "../../dialog";
-import {isMobile} from "../../util/functions";
 
 export class MobileBookmarks {
     public element: HTMLElement;
@@ -111,7 +110,7 @@ export class MobileBookmarks {
     }
 
     public update() {
-        this.element.lastElementChild.classList.remove("fn__none")
+        this.element.lastElementChild.classList.remove("fn__none");
         fetchPost("/api/bookmark/getBookmark", {}, response => {
             if (this.openNodes) {
                 this.openNodes = this.tree.getExpandIds();
@@ -122,7 +121,7 @@ export class MobileBookmarks {
             } else {
                 this.openNodes = this.tree.getExpandIds();
             }
-            this.element.lastElementChild.classList.add("fn__none")
+            this.element.lastElementChild.classList.add("fn__none");
         });
     }
 }

+ 2 - 2
app/src/mobile/util/MobileTags.ts

@@ -154,7 +154,7 @@ export class MobileTags {
     }
 
     public update() {
-        this.element.lastElementChild.classList.remove("fn__none")
+        this.element.lastElementChild.classList.remove("fn__none");
         fetchPost("/api/tag/getTag", {
             sort: window.siyuan.config.tag.sort
         }, response => {
@@ -167,7 +167,7 @@ export class MobileTags {
             } else {
                 this.openNodes = this.tree.getExpandIds();
             }
-            this.element.lastElementChild.classList.add("fn__none")
+            this.element.lastElementChild.classList.add("fn__none");
         });
     }
 }

+ 2 - 2
app/src/mobile/util/initFramework.ts

@@ -23,8 +23,8 @@ export const initFramework = () => {
     const sidebarElement = document.getElementById("sidebar");
     let outline: MobileOutline;
     let backlink: MobileBacklinks;
-    let bookmark: MobileBookmarks
-    let tag: MobileTags
+    let bookmark: MobileBookmarks;
+    let tag: MobileTags;
     sidebarElement.querySelector(".toolbar--border").addEventListener(getEventName(), (event: Event & { target: Element }) => {
         const svgElement = hasTopClosestByTag(event.target, "svg");
         if (!svgElement || svgElement.classList.contains("toolbar__icon--active")) {

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

@@ -190,7 +190,7 @@ data-def-path="${item.defPath}">
                 }
                 if (target.classList.contains("b3-list-item__action") && this.click) {
                     // 移动端书签父节点删除按钮
-                    const liElement = hasClosestByMatchTag(target, "LI")
+                    const liElement = hasClosestByMatchTag(target, "LI");
                     if (liElement) {
                         this.click(liElement, event);
                     }