Pārlūkot izejas kodu

:rotating_light:

Vanessa 2 gadi atpakaļ
vecāks
revīzija
6e9a953bf2

+ 1 - 1
app/src/config/repos.ts

@@ -42,7 +42,7 @@ const renderProvider = (provider: number) => {
     ${window.siyuan.languages.featureBetaStage}
     <div class="fn__hr"></div>
     ${window.siyuan.languages.syncThirdPartyProviderTip}
-</div>`
+</div>`;
         if (isMobile()) {
             return `${tip}
 <div class="b3-label b3-label--noborder">

+ 6 - 6
app/src/index.ts

@@ -50,9 +50,9 @@ class App {
                             case "rename":
                                 getAllTabs().forEach((tab) => {
                                     if (tab.headElement) {
-                                        const initTab = tab.headElement.getAttribute("data-initdata")
+                                        const initTab = tab.headElement.getAttribute("data-initdata");
                                         if (initTab) {
-                                            const initTabData = JSON.parse(initTab)
+                                            const initTabData = JSON.parse(initTab);
                                             if (initTabData.rootId === data.data.id) {
                                                 tab.updateTitle(data.data.title);
                                             }
@@ -63,9 +63,9 @@ class App {
                             case "unmount":
                                 getAllTabs().forEach((tab) => {
                                     if (tab.headElement) {
-                                        const initTab = tab.headElement.getAttribute("data-initdata")
+                                        const initTab = tab.headElement.getAttribute("data-initdata");
                                         if (initTab) {
-                                            const initTabData = JSON.parse(initTab)
+                                            const initTabData = JSON.parse(initTab);
                                             if (data.data.box === initTabData.notebookId) {
                                                 tab.parent.removeTab(tab.id);
                                             }
@@ -76,9 +76,9 @@ class App {
                             case "removeDoc":
                                 getAllTabs().forEach((tab) => {
                                     if (tab.headElement) {
-                                        const initTab = tab.headElement.getAttribute("data-initdata")
+                                        const initTab = tab.headElement.getAttribute("data-initdata");
                                         if (initTab) {
-                                            const initTabData = JSON.parse(initTab)
+                                            const initTabData = JSON.parse(initTab);
                                             if (data.data.ids.includes(initTabData.rootId)) {
                                                 tab.parent.removeTab(tab.id);
                                             }

+ 0 - 1
app/src/mobile/util/menu.ts

@@ -6,7 +6,6 @@ import {closePanel} from "./closePanel";
 import {Constants} from "../../constants";
 import {setAccessAuthCode} from "../../config/util/setAccessAuthCode";
 import {mountHelp, newDailyNote, newNotebook} from "../../util/mount";
-import {needSubscribe} from "../../util/needSubscribe";
 import {repos} from "../../config/repos";
 import * as md5 from "blueimp-md5";
 import {showMessage} from "../../dialog/message";

+ 6 - 7
app/src/protyle/export/util.ts

@@ -46,7 +46,7 @@ export const exportImage = (id: string) => {
         id,
         keepFold: false,
     }, (response) => {
-        const previewElement = exportDialog.element.querySelector("#preview")
+        const previewElement = exportDialog.element.querySelector("#preview");
         previewElement.innerHTML = response.data.content;
         processRender(previewElement);
         highlightRender(previewElement);
@@ -70,14 +70,13 @@ export const exportImage = (id: string) => {
                             const formData = new FormData();
                             formData.append("file", blob, response.data.name + ".png");
                             formData.append("type", "image/png");
-                            fetchPost("/api/export/exportAsFile", formData, () => {
-                                hideMessage(msgId);
-                                exportDialog.destroy();
-                            });
+                            fetchPost("/api/export/exportAsFile", formData);
+                            hideMessage(msgId);
+                            exportDialog.destroy();
                         });
                     });
                 });
-            }, Constants.TIMEOUT_TRANSITION)
+            }, Constants.TIMEOUT_TRANSITION);
         });
     });
-}
+};

+ 4 - 4
app/src/protyle/scroll/index.ts

@@ -23,7 +23,7 @@ export class Scroll {
 </div>
 <div class="b3-tooltips b3-tooltips__sw protyle-scroll__down" aria-label="${updateHotkeyTip("⌘End")}">
     <svg><use xlink:href="#iconDown"></use></svg>
-</div>`
+</div>`;
 
         this.element = this.parentElement.querySelector(".protyle-scroll__bar");
         this.keepLazyLoad = false;
@@ -44,11 +44,11 @@ export class Scroll {
         });
         /// #endif
         this.parentElement.addEventListener("click", (event) => {
-            const target = event.target as HTMLElement
+            const target = event.target as HTMLElement;
             if (hasClosestByClassName(target, "protyle-scroll__up")) {
-                goHome(protyle)
+                goHome(protyle);
             } else if (hasClosestByClassName(target, "protyle-scroll__down")) {
-                goEnd(protyle)
+                goEnd(protyle);
             } else if (target.classList.contains("b3-slider")) {
                 this.setIndex(protyle);
             }

+ 1 - 1
app/src/protyle/toolbar/index.ts

@@ -544,7 +544,7 @@ export class Toolbar {
                 currentNewNode.style.fontSize === nextNewNode.style.fontSize &&
                 currentNewNode.style.backgroundColor === nextNewNode.style.backgroundColor) {
                 // 合并相同的 node
-                const currentType = currentNewNode.getAttribute("data-type")
+                const currentType = currentNewNode.getAttribute("data-type");
                 if (currentType.indexOf("inline-math") > -1) {
                     // 数学公式合并 data-content https://github.com/siyuan-note/siyuan/issues/6028
                     nextNewNode.setAttribute("data-content", currentNewNode.getAttribute("data-content") + nextNewNode.getAttribute("data-content"));

+ 1 - 1
app/src/protyle/ui/initUI.ts

@@ -94,7 +94,7 @@ export const setPadding = (protyle: IProtyle) => {
         if (!window.siyuan.config.editor.fullWidth && padding > 96) {
             if (padding > Constants.SIZE_EDITOR_WIDTH) {
                 // 超宽屏调整 https://ld246.com/article/1668266637363
-                padding = protyle.element.clientWidth / 3
+                padding = protyle.element.clientWidth / 3;
             }
             min16 = padding;
             min24 = padding;

+ 2 - 2
app/src/protyle/wysiwyg/commonHotkey.ts

@@ -234,7 +234,7 @@ export const goHome = (protyle:IProtyle) => {
             onGet(getResponse, protyle, [Constants.CB_GET_FOCUS]);
         });
     }
-}
+};
 
 export const goEnd = (protyle:IProtyle) => {
     if (!protyle.scroll.element.classList.contains("fn__none") &&
@@ -251,4 +251,4 @@ export const goEnd = (protyle:IProtyle) => {
         protyle.scroll.lastScrollTop = protyle.contentElement.scrollTop;
         focusBlock(protyle.wysiwyg.element.lastElementChild, undefined, false);
     }
-}
+};