Browse Source

:rotating_light:

Vanessa 1 year ago
parent
commit
621babd29d

+ 2 - 2
app/src/boot/onGetConfig.ts

@@ -178,12 +178,12 @@ const saveUI = () => {
         onlyData: false,
         errorExit: false
     });
-}
+};
 
 export const unbindSaveUI = () => {
     window.removeEventListener("beforeunload", saveUI);
     window.removeEventListener("pagehide", saveUI);
-}
+};
 
 export const initWindow = async (app: App) => {
     /// #if !BROWSER

+ 1 - 1
app/src/card/openCard.ts

@@ -209,7 +209,7 @@ export const bindCardEvent = (options: {
                 fullscreen(options.element.querySelector(".card__main"),
                     options.element.querySelector('[data-type="fullscreen"]'));
                 resize(editor.protyle);
-                window.siyuan.storage[Constants.LOCAL_FLASHCARD].fullscreen = !window.siyuan.storage[Constants.LOCAL_FLASHCARD].fullscreen
+                window.siyuan.storage[Constants.LOCAL_FLASHCARD].fullscreen = !window.siyuan.storage[Constants.LOCAL_FLASHCARD].fullscreen;
                 setStorageVal(Constants.LOCAL_FLASHCARD,  window.siyuan.storage[Constants.LOCAL_FLASHCARD]);
                 event.stopPropagation();
                 event.preventDefault();

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

@@ -932,7 +932,7 @@ export const bazaar = {
                     event.preventDefault();
                     return;
                 }
-            })
+            });
         });
 
         bazaar.element.querySelectorAll(".b3-select").forEach((selectElement: HTMLSelectElement) => {

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

@@ -380,7 +380,7 @@ export const keymap = {
                     if (keys[1] === "heading") {
                         keys[1] = "headings";
                     }
-                    let hasConflict = false
+                    let hasConflict = false;
                     if (["⌘", "⇧", "⌥", "⌃"].includes(keymapStr.substr(keymapStr.length - 1, 1)) ||
                         ["⌘A", "⌘X", "⌘C", "⌘V", "⌘-", "⌘=", "⌘0", "⇧⌘V", "⌘/", "⇧↑", "⇧↓", "⇧→", "⇧←", "⇧⇥", "⇧⌘⇥", "⌃⇥", "⌘⇥", "⌃⌘⇥", "⇧⌘→", "⇧⌘←", "⌘Home", "⌘End", "⇧↩", "↩", "PageUp", "PageDown", "⌫", "⌦"].includes(keymapStr)) {
                         showMessage(`${window.siyuan.languages.invalid} [${adoptKeymapStr}]`);

+ 1 - 1
app/src/plugin/loader.ts

@@ -29,7 +29,7 @@ export const loadPlugins = async (app: App) => {
         loadPluginJS(app, item);
         css += item.css || "" + "\n";
     });
-    const pluginsStyle = document.getElementById("pluginsStyle")
+    const pluginsStyle = document.getElementById("pluginsStyle");
     if (pluginsStyle) {
         pluginsStyle.innerHTML = css;
     } else {

+ 2 - 2
app/src/protyle/gutter/index.ts

@@ -55,7 +55,7 @@ export class Gutter {
         this.element.setAttribute("data-position", "right");
         this.element.addEventListener("dragstart", (event: DragEvent & { target: HTMLElement }) => {
             hideTooltip();
-            const buttonElement = event.target.parentElement
+            const buttonElement = event.target.parentElement;
             let selectIds: string[] = [buttonElement.getAttribute("data-node-id")];
             const selectElements = protyle.wysiwyg.element.querySelectorAll(".protyle-wysiwyg--select");
             if (selectElements.length > 0) {
@@ -1846,7 +1846,7 @@ export class Gutter {
                 const buttonHTML = `<button data-type="${type}" data-subtype="${nodeElement.getAttribute("data-subtype")}" data-node-id="${nodeElement.getAttribute("data-node-id")}">
     <svg><use xlink:href="#${getIconByType(type, nodeElement.getAttribute("data-subtype"))}"></use></svg>
     <span ${protyle.disabled ? "" : 'draggable="true"'}></span>
-</button>`
+</button>`;
                 if (isShow) {
                     html = buttonHTML + html;
                 }

+ 0 - 1
app/src/protyle/wysiwyg/keydown.ts

@@ -68,7 +68,6 @@ import {getSavePath} from "../../util/newFile";
 import {escapeHtml} from "../../util/escape";
 import {insertHTML} from "../util/insertHTML";
 import {removeSearchMark} from "../toolbar/util";
-import {copyPNG} from "../../menus/util";
 import {avKeydown} from "../render/av/keydown";
 import {resizeAV} from "../util/resize";
 

+ 2 - 2
app/src/search/util.ts

@@ -3,7 +3,7 @@ import {getAllModels} from "../layout/getAll";
 import * as path from "path";
 /// #endif
 import {Constants} from "../constants";
-import {escapeAriaLabel, escapeAttr, escapeGreat, escapeHtml} from "../util/escape";
+import {escapeAriaLabel, escapeGreat, escapeHtml} from "../util/escape";
 import {fetchPost} from "../util/fetch";
 import {openFile, openFileById} from "../editor/util";
 import {showMessage} from "../dialog/message";
@@ -1353,7 +1353,7 @@ const getAttr =(block:IBlock) => {
         attrHTML += `<span class="b3-list-item__meta fn__flex" style="max-width: 30%"><svg class="b3-list-item__hinticon"><use xlink:href="#iconM"></use></svg><span class="b3-list-item__hinttext">${block.memo}</span></span>`;
     }
     return attrHTML;
-}
+};
 
 const onSearch = (data: IBlock[], edit: Protyle, element: Element, config: ISearchOption) => {
     let resultHTML = "";

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

@@ -225,7 +225,7 @@ export const setInlineStyle = (set = true) => {
         style += "\n.b3-menu .b3-menu__action {opacity: 0.68;}";
     }
     if (set) {
-        const siyuanStyle = document.getElementById("siyuanStyle")
+        const siyuanStyle = document.getElementById("siyuanStyle");
         if (siyuanStyle) {
             siyuanStyle.innerHTML = style;
         } else {