Browse Source

:rotating_light:

Vanessa 1 year ago
parent
commit
13332781c9

+ 1 - 1
app/electron/main.js

@@ -1041,7 +1041,7 @@ app.whenReady().then(() => {
                 return;
             }
             if (globalShortcut.isRegistered(shortcut)) {
-                globalShortcut.unregister(shortcut)
+                globalShortcut.unregister(shortcut);
             }
             if (index === 0) {
                 globalShortcut.register(shortcut, () => {

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

@@ -186,7 +186,7 @@ export const keymap = {
     },
     _setkeymap(app: App) {
         const data: Config.IKeymap = JSON.parse(JSON.stringify(Constants.SIYUAN_KEYMAP));
-        const oldToggleWin = window.siyuan.config.keymap.general.toggleWin.custom
+        const oldToggleWin = window.siyuan.config.keymap.general.toggleWin.custom;
         keymap.element.querySelectorAll("label.b3-list-item input").forEach((item) => {
             const keys = item.getAttribute("data-key").split(Constants.ZWSP);
             const newHotkey = item.getAttribute("data-value");

+ 2 - 2
app/src/config/util/snippets.ts

@@ -171,7 +171,7 @@ export const openSnippets = () => {
                     }, (searchResponse) => {
                         dialog.element.querySelectorAll(`.fn__flex-1 > div > [data-type="${inputItem.dataset.type}"]`).forEach((snipeetPanel: Element) => {
                             snipeetPanel.classList.add("fn__none");
-                        })
+                        });
                         searchResponse.data.snippets.forEach((snippetItem: ISnippet) => {
                             if (snippetItem.type === inputItem.dataset.type) {
                                 dialog.element.querySelector(`[data-id="${snippetItem.id}"]`).classList.remove("fn__none");
@@ -180,7 +180,7 @@ export const openSnippets = () => {
                     });
                 }
             });
-        })
+        });
     });
 };
 

+ 1 - 1
app/src/menus/workspace.ts

@@ -98,7 +98,7 @@ const editLayout = (layoutName?: string) => {
         });
         dialog.destroy();
     });
-}
+};
 
 const togglePinDock = (dock: Dock, icon: string) => {
     return {

+ 1 - 1
app/src/protyle/render/av/action.ts

@@ -331,7 +331,7 @@ ${window.siyuan.languages.insertRowBefore.replace("${x}", '<span class="fn__spac
                         }
                         insertRows(blockElement, protyle, parseInt(inputElement.value), rowElements[0].previousElementSibling.getAttribute("data-id"));
                         menu.close();
-                    })
+                    });
                     inputElement.addEventListener("keydown", (event: KeyboardEvent) => {
                         if (!event.isComposing && event.key === "Enter") {
                             insertRows(blockElement, protyle, parseInt(inputElement.value), rowElements[0].previousElementSibling.getAttribute("data-id"));

+ 6 - 6
app/src/protyle/render/av/cell.ts

@@ -15,11 +15,11 @@ import {hintRef} from "../../hint/extend";
 
 const renderCellURL = (urlContent: string) => {
     let host = urlContent;
-    let suffix = ""
+    let suffix = "";
     try {
         const urlObj = new URL(urlContent);
         host = urlObj.host;
-        suffix = urlObj.href.replace(urlObj.origin, "")
+        suffix = urlObj.href.replace(urlObj.origin, "");
         if (suffix.length > 12) {
             suffix = suffix.substring(0, 4) + "..." + suffix.substring(suffix.length - 6);
         }
@@ -404,9 +404,9 @@ export const popTextCell = (protyle: IProtyle, cellElements: HTMLElement[], type
                     addDragFill(cellElements[0]);
                     let textPlain = inputElement.value;
                     if (isDynamicRef(textPlain)) {
-                        textPlain = textPlain.substring(2, 22 + 2)
+                        textPlain = textPlain.substring(2, 22 + 2);
                     } else {
-                        textPlain = textPlain.substring(2)
+                        textPlain = textPlain.substring(2);
                     }
                     hintRef(textPlain, protyle, "av");
                     avMaskElement?.remove();
@@ -630,7 +630,7 @@ export const renderCell = (cellValue: IAVCellValue) => {
     } else if (["email", "phone"].includes(cellValue.type)) {
         text = `<span class="av__celltext av__celltext--url" data-type="${cellValue.type}">${cellValue ? cellValue[cellValue.type as "email"].content : ""}</span>`;
     } else if ("url" === cellValue.type) {
-        text = renderCellURL(cellValue?.url?.content || "")
+        text = renderCellURL(cellValue?.url?.content || "");
     } else if (cellValue.type === "block") {
         if (cellValue?.isDetached) {
             text = `<span class="av__celltext">${cellValue.block.content || ""}</span>
@@ -709,7 +709,7 @@ const renderRollup = (cellValue: IAVCellValue) => {
             text = `<span class="av__celltext av__celltext--url" data-type="${cellValue.type}">${emailContent}</span>`;
         }
     } else if ("url" === cellValue.type) {
-        const urlContent = cellValue?.url?.content || ""
+        const urlContent = cellValue?.url?.content || "";
         if (urlContent) {
             text = renderCellURL(urlContent);
         }

+ 1 - 1
app/src/protyle/util/insertHTML.ts

@@ -137,7 +137,7 @@ const processAV = (range: Range, html: string, protyle: IProtyle, blockElement:
     }
     const contenteditableElement = getContenteditableElement(tempElement.content.firstElementChild);
     if (contenteditableElement && contenteditableElement.childNodes.length === 1 && contenteditableElement.firstElementChild?.getAttribute("data-type") === "block-ref") {
-        const selectCellElement = blockElement.querySelector(".av__cell--select") as HTMLElement
+        const selectCellElement = blockElement.querySelector(".av__cell--select") as HTMLElement;
         if (selectCellElement) {
             const avID = blockElement.dataset.avId;
             const sourceId = contenteditableElement.firstElementChild.getAttribute("data-id");