From 6a143c699fd8125fb1fa4e09b6fa4fc2e75e57bb Mon Sep 17 00:00:00 2001 From: Vanessa Date: Tue, 8 Nov 2022 19:25:07 +0800 Subject: [PATCH] :rotating_light: --- app/src/layout/dock/Files.ts | 10 +++++----- app/src/mobile/util/showKeyboardToolbar.ts | 2 +- app/src/protyle/toolbar/index.ts | 2 +- app/src/protyle/wysiwyg/index.ts | 2 +- app/src/util/history.ts | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/src/layout/dock/Files.ts b/app/src/layout/dock/Files.ts index 4dd747619..13f919662 100644 --- a/app/src/layout/dock/Files.ts +++ b/app/src/layout/dock/Files.ts @@ -202,7 +202,7 @@ export class Files extends Model { } target = target.parentElement; } - }) + }); this.element.addEventListener("click", (event) => { if (event.detail !== 1) { setPanelFocus(this.element.parentElement); @@ -319,14 +319,14 @@ export class Files extends Model { selectElements = [liElement]; } let ids = ""; - const ghostElement = document.createElement("ul") + const ghostElement = document.createElement("ul"); selectElements.forEach((item: HTMLElement) => { ghostElement.append(item.cloneNode(true)); item.style.opacity = "0.1"; ids += (item.getAttribute("data-node-id") || "") + ","; }); - ghostElement.setAttribute("style", `width: 219px;position: fixed;top:-${selectElements.length * 30}px`) - ghostElement.setAttribute("class", "b3-list b3-list--background") + ghostElement.setAttribute("style", `width: 219px;position: fixed;top:-${selectElements.length * 30}px`); + ghostElement.setAttribute("class", "b3-list b3-list--background"); document.body.append(ghostElement); event.dataTransfer.setDragImage(ghostElement, 16, 16); event.dataTransfer.setData(Constants.SIYUAN_DROP_FILE, ids); @@ -335,7 +335,7 @@ export class Files extends Model { window.siyuan.dragElement.innerText = ids; setTimeout(() => { ghostElement.remove(); - }) + }); } }); this.element.addEventListener("dragend", () => { diff --git a/app/src/mobile/util/showKeyboardToolbar.ts b/app/src/mobile/util/showKeyboardToolbar.ts index fc01c953d..50d65f9f3 100644 --- a/app/src/mobile/util/showKeyboardToolbar.ts +++ b/app/src/mobile/util/showKeyboardToolbar.ts @@ -23,7 +23,7 @@ export const showKeyboardToolbar = (bottom = 0) => { toolbarElement.style.bottom = bottom + "px"; setTimeout(() => { - const contentElement = window.siyuan.mobileEditor.protyle.contentElement + const contentElement = window.siyuan.mobileEditor.protyle.contentElement; const cursorTop = getSelectionPosition(contentElement).top - contentElement.getBoundingClientRect().top; if (cursorTop < window.innerHeight - 96) { return; diff --git a/app/src/protyle/toolbar/index.ts b/app/src/protyle/toolbar/index.ts index 7744809c3..c73545bfe 100644 --- a/app/src/protyle/toolbar/index.ts +++ b/app/src/protyle/toolbar/index.ts @@ -105,7 +105,7 @@ export class Toolbar { this.range.collapse(false); } else if (event.key === "ArrowUp") { this.range = setFirstNodeRange(getContenteditableElement(endElement), range); - nodeElement = hasClosestBlock(endElement) + nodeElement = hasClosestBlock(endElement); if (!nodeElement) { return; } diff --git a/app/src/protyle/wysiwyg/index.ts b/app/src/protyle/wysiwyg/index.ts index 193dc9bdf..e632c5ffe 100644 --- a/app/src/protyle/wysiwyg/index.ts +++ b/app/src/protyle/wysiwyg/index.ts @@ -1931,7 +1931,7 @@ export class WYSIWYG { // 清除选中的子块 https://ld246.com/article/1667826582251 item.querySelectorAll(".protyle-wysiwyg--select").forEach(subItem => { subItem.classList.remove("protyle-wysiwyg--select"); - }) + }); }); countBlockWord(ids); if (toDown) { diff --git a/app/src/util/history.ts b/app/src/util/history.ts index 5a1fc9b49..50dde67b7 100644 --- a/app/src/util/history.ts +++ b/app/src/util/history.ts @@ -381,7 +381,7 @@ export const openHistory = () => { }); break; } else if (type === "toggle") { - const iconElement = target.firstElementChild.firstElementChild + const iconElement = target.firstElementChild.firstElementChild; if (iconElement.classList.contains("b3-list-item__arrow--open")) { target.nextElementSibling.classList.add("fn__none"); iconElement.classList.remove("b3-list-item__arrow--open");