Browse Source

:rotating_light:

Vanessa 1 year ago
parent
commit
19079acfc3

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

@@ -164,12 +164,12 @@ export const openSnippets = () => {
         dialog.element.querySelectorAll('[data-action="search"]').forEach((inputItem: HTMLInputElement) => {
             inputItem.addEventListener("input", (event: KeyboardEvent) => {
                 if (event.isComposing) {
-                    return
+                    return;
                 }
-                filterSnippet(dialog, inputItem)
+                filterSnippet(dialog, inputItem);
             });
             inputItem.addEventListener("compositionend", () => {
-                filterSnippet(dialog, inputItem)
+                filterSnippet(dialog, inputItem);
             });
         });
     });
@@ -188,7 +188,7 @@ const filterSnippet = (dialog: Dialog, inputItem: HTMLInputElement) => {
             snippetPanel.classList.add("fn__none");
         }
     });
-}
+};
 
 const genSnippet = (options: ISnippet) => {
     return `<div data-id="${options.id || ""}" data-type="${options.type}">

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

@@ -494,9 +494,9 @@ export const removeAttrViewColAnimation = (blockElement: Element, id: string) =>
 
 export const duplicateCompletely = (protyle:IProtyle, nodeElement:HTMLElement) => {
     fetchPost("/api/av/duplicateAttributeViewBlock", {avID: nodeElement.getAttribute("data-av-id")}, (response) => {
-        nodeElement.classList.remove("protyle-wysiwyg--select")
+        nodeElement.classList.remove("protyle-wysiwyg--select");
         const tempElement = document.createElement("template");
-        tempElement.innerHTML = protyle.lute.SpinBlockDOM(`<div data-node-id="${response.data.blockID}" data-av-id="${response.data.avID}" data-type="NodeAttributeView" data-av-type="table"></div>`)
+        tempElement.innerHTML = protyle.lute.SpinBlockDOM(`<div data-node-id="${response.data.blockID}" data-av-id="${response.data.avID}" data-type="NodeAttributeView" data-av-type="table"></div>`);
         const cloneElement = tempElement.content.firstElementChild;
         nodeElement.after(cloneElement);
         avRender(cloneElement, protyle, () => {
@@ -513,4 +513,4 @@ export const duplicateCompletely = (protyle:IProtyle, nodeElement:HTMLElement) =
             id: response.data.blockID,
         }]);
     });
-}
+};

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

@@ -583,7 +583,7 @@ export const updateCellsValue = (protyle: IProtyle, nodeElement: HTMLElement, va
                         link = aElement.getAttribute("data-href");
                         name = aElement.textContent;
                     } else {
-                        const imgElement = tempElement.content.querySelector('.img img');
+                        const imgElement = tempElement.content.querySelector(".img img");
                         if (imgElement) {
                             imgSrc = imgElement.getAttribute("data-src");
                         }

+ 0 - 1
app/src/util/newFile.ts

@@ -13,7 +13,6 @@ import {replaceFileName, validateName} from "../editor/rename";
 import {hideElements} from "../protyle/ui/hideElements";
 import {openMobileFileById} from "../mobile/editor";
 import {App} from "../index";
-import {insertHTML} from "../protyle/util/insertHTML";
 import {escapeHtml} from "./escape";
 
 export const getNewFilePath = (useSavePath: boolean) => {