From 4cd93b0fec0223d8e0e871d41d9abd27493fa71a Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sat, 25 Nov 2023 17:10:06 +0800 Subject: [PATCH] :rotating_light: --- app/appearance/langs/en_US.json | 2 ++ app/appearance/langs/es_ES.json | 2 ++ app/appearance/langs/fr_FR.json | 2 ++ app/appearance/langs/zh_CHT.json | 2 ++ app/src/config/editor.ts | 2 +- app/src/history/diff.ts | 4 ++-- app/src/history/history.ts | 4 ++-- app/src/protyle/breadcrumb/index.ts | 2 +- app/src/protyle/index.ts | 2 +- app/src/protyle/util/onGet.ts | 1 - 10 files changed, 15 insertions(+), 8 deletions(-) diff --git a/app/appearance/langs/en_US.json b/app/appearance/langs/en_US.json index c1ab5450f..ac1f404ab 100644 --- a/app/appearance/langs/en_US.json +++ b/app/appearance/langs/en_US.json @@ -1,4 +1,6 @@ { + "tempUnlock": "Temporarily unlock", + "cancelTempUnlock": "Cancel temporary unlock", "addFilter": "Add filter", "removeFilters": "Clear filter", "checked": "Checked", diff --git a/app/appearance/langs/es_ES.json b/app/appearance/langs/es_ES.json index cb0d68ddc..ef3d6ea9a 100644 --- a/app/appearance/langs/es_ES.json +++ b/app/appearance/langs/es_ES.json @@ -1,4 +1,6 @@ { + "tempUnlock": "Desbloquear temporalmente", + "cancelTempUnlock": "Cancelar desbloqueo temporal", "addFilter": "Agregar filtro", "removeFilters": "Borrar filtro", "checked": "marcado", diff --git a/app/appearance/langs/fr_FR.json b/app/appearance/langs/fr_FR.json index 24df8df36..9277f209e 100644 --- a/app/appearance/langs/fr_FR.json +++ b/app/appearance/langs/fr_FR.json @@ -1,4 +1,6 @@ { + "tempUnlock": "Déverrouiller temporairement", + "cancelTempUnlock": "Annuler le déverrouillage temporaire", "addFilter": "Ajouter un filtre", "removeFilters": "Effacer le filtre", "checked": "Coché", diff --git a/app/appearance/langs/zh_CHT.json b/app/appearance/langs/zh_CHT.json index 8ddc7930a..3f09953fe 100644 --- a/app/appearance/langs/zh_CHT.json +++ b/app/appearance/langs/zh_CHT.json @@ -1,4 +1,6 @@ { + "tempUnlock": "暫時解鎖", + "cancelTempUnlock": "取消暫時解鎖", "addFilter": "新增篩選條件", "removeFilters": "清空篩選規則", "checked": "已完成", diff --git a/app/src/config/editor.ts b/app/src/config/editor.ts index f32cea7d9..acb85e8bd 100644 --- a/app/src/config/editor.ts +++ b/app/src/config/editor.ts @@ -337,7 +337,7 @@ export const editor = { }); }, _onSetEditor: (editorData: IEditor) => { - const changeReadonly = editorData.readOnly !== window.siyuan.config.editor.readOnly + const changeReadonly = editorData.readOnly !== window.siyuan.config.editor.readOnly; if (changeReadonly) { editor.setReadonly(editorData.readOnly); } diff --git a/app/src/history/diff.ts b/app/src/history/diff.ts index 03b31ca5c..180bf9f52 100644 --- a/app/src/history/diff.ts +++ b/app/src/history/diff.ts @@ -35,9 +35,9 @@ const renderCompare = (app: App, element: HTMLElement) => { if (!listElement) { return; } - const dialogContainerElement = hasClosestByClassName(element, "b3-dialog__container") + const dialogContainerElement = hasClosestByClassName(element, "b3-dialog__container"); if (!dialogContainerElement) { - return + return; } const leftElement = listElement.nextElementSibling.firstElementChild; const rightElement = listElement.nextElementSibling.lastElementChild; diff --git a/app/src/history/history.ts b/app/src/history/history.ts index 726906fb4..1000f2c60 100644 --- a/app/src/history/history.ts +++ b/app/src/history/history.ts @@ -536,7 +536,7 @@ const bindEvent = (app: App, element: Element, dialog?: Dialog) => { const opElement = firstPanelElement.querySelector('.b3-select[data-type="opselect"]') as HTMLSelectElement; const typeElement = firstPanelElement.querySelector('.b3-select[data-type="typeselect"]') as HTMLSelectElement; const notebookElement = firstPanelElement.querySelector('.b3-select[data-type="notebookselect"]') as HTMLSelectElement; - const created = target.getAttribute("data-created") + const created = target.getAttribute("data-created"); fetchPost("/api/history/getHistoryItems", { notebook: notebookElement.value, query: inputElement.value, @@ -615,7 +615,7 @@ const bindEvent = (app: App, element: Element, dialog?: Dialog) => { } else { mdElement.classList.add("fn__none"); docElement.classList.remove("fn__none"); - historyEditor.protyle.options.history.created = target.dataset.created + historyEditor.protyle.options.history.created = target.dataset.created; onGet({ data: response, protyle: historyEditor.protyle, diff --git a/app/src/protyle/breadcrumb/index.ts b/app/src/protyle/breadcrumb/index.ts index 70f800c42..e78cdcb46 100644 --- a/app/src/protyle/breadcrumb/index.ts +++ b/app/src/protyle/breadcrumb/index.ts @@ -108,7 +108,7 @@ export class Breadcrumb { break; } else if (type === "readonly") { if (!window.siyuan.config.readonly) { - const isReadonly = target.querySelector("use").getAttribute("xlink:href") !== "#iconUnlock" + const isReadonly = target.querySelector("use").getAttribute("xlink:href") !== "#iconUnlock"; if (window.siyuan.config.editor.readOnly) { if (isReadonly) { enableProtyle(protyle); diff --git a/app/src/protyle/index.ts b/app/src/protyle/index.ts index bd234f588..2604877e2 100644 --- a/app/src/protyle/index.ts +++ b/app/src/protyle/index.ts @@ -22,7 +22,7 @@ import {updatePanelByEditor} from "../editor/util"; import {setPanelFocus} from "../layout/util"; /// #endif import {Background} from "./header/Background"; -import {disabledProtyle, enableProtyle, onGet} from "./util/onGet"; +import {onGet} from "./util/onGet"; import {reloadProtyle} from "./util/reload"; import {renderBacklink} from "./wysiwyg/renderBacklink"; import {setEmpty} from "../mobile/util/setEmpty"; diff --git a/app/src/protyle/util/onGet.ts b/app/src/protyle/util/onGet.ts index e7a34d5b8..da8cc6e9a 100644 --- a/app/src/protyle/util/onGet.ts +++ b/app/src/protyle/util/onGet.ts @@ -378,7 +378,6 @@ export const enableProtyle = (protyle: IProtyle) => { hideTooltip(); }; - const focusElementById = (protyle: IProtyle, action: string[]) => { let focusElement: Element; Array.from(protyle.wysiwyg.element.querySelectorAll(`[data-node-id="${protyle.block.id}"]`)).find((item: HTMLElement) => {