From fc391f99439e15fc5c401bb6a3f3a99a9ff1169f Mon Sep 17 00:00:00 2001 From: xiangyu <3170102889@zju.edu.cn> Date: Wed, 4 Jan 2023 18:10:38 +0800 Subject: [PATCH] refactor: follow addon template v0.0.11 --- TemplateDoc.md | 2 +- addon/chrome/content/export.xul | 16 +- addon/chrome/content/overlay.xul | 54 ++--- addon/chrome/content/sync.xul | 6 +- addon/chrome/content/syncList.xul | 14 +- addon/chrome/content/template.xul | 14 +- addon/chrome/content/wizard.xul | 12 +- addon/chrome/content/workspace.xul | 48 ++--- build.js | 3 + package.json | 6 +- src/addon.ts | 10 +- src/editor/editorController.ts | 6 +- src/editor/editorViews.ts | 34 ++-- src/editor/imageViewerWindow.ts | 4 +- src/index.ts | 9 +- src/module.ts | 6 +- src/note/noteExportController.ts | 20 +- src/note/noteExportWindow.ts | 8 +- src/note/noteImportController.ts | 8 +- src/note/noteParse.ts | 46 ++--- src/note/noteUtils.ts | 142 ++++++------- src/reader/readerViews.ts | 12 +- src/sync/syncController.ts | 14 +- src/sync/syncDiffWindow.ts | 18 +- src/sync/syncInfoWindow.ts | 4 +- src/sync/syncListWindow.ts | 4 +- src/sync/syncUtils.ts | 84 ++++---- src/template/templateController.ts | 20 +- src/template/templateWindow.ts | 8 +- src/utils.ts | 19 +- src/wizard/wizardWindow.ts | 6 +- src/workspace/workspaceMenu.ts | 4 +- src/workspace/workspaceOutline.ts | 8 +- src/workspace/workspaceWindow.ts | 20 +- src/zotero/events.ts | 310 ++++------------------------- src/zotero/notifies.ts | 291 +++++++++++++++++++++++++++ src/zotero/views.ts | 16 +- tsconfig.json | 30 +-- 38 files changed, 688 insertions(+), 648 deletions(-) create mode 100644 src/zotero/notifies.ts diff --git a/TemplateDoc.md b/TemplateDoc.md index 907a322..d2327ae 100644 --- a/TemplateDoc.md +++ b/TemplateDoc.md @@ -287,7 +287,7 @@ Required Variable: noteItem/subNoteItem. ```js

- + ${noteItem.key}

diff --git a/addon/chrome/content/export.xul b/addon/chrome/content/export.xul index c6f2a13..3ef5188 100644 --- a/addon/chrome/content/export.xul +++ b/addon/chrome/content/export.xul @@ -12,9 +12,9 @@ @@ -27,7 +27,7 @@ + oncommand="Zotero.BetterNotes.NoteExportWindow.doUpdate(event)" />