From be3fa436ac573c4873f8c7a54df824c1d83e9bc4 Mon Sep 17 00:00:00 2001 From: kuuuube Date: Thu, 23 May 2024 10:33:57 -0400 Subject: [PATCH 01/30] Add dictionary import to welcome page --- ext/js/pages/welcome-main.js | 8 ++++ ext/welcome.html | 85 +++++++++++++++++++++++++++++++++++- 2 files changed, 91 insertions(+), 2 deletions(-) diff --git a/ext/js/pages/welcome-main.js b/ext/js/pages/welcome-main.js index 10a84a59da..31a185dddf 100644 --- a/ext/js/pages/welcome-main.js +++ b/ext/js/pages/welcome-main.js @@ -20,6 +20,8 @@ import {Application} from '../application.js'; import {DocumentFocusController} from '../dom/document-focus-controller.js'; import {querySelectorNotNull} from '../dom/query-selector.js'; import {ExtensionContentController} from './common/extension-content-controller.js'; +import {DictionaryController} from './settings/dictionary-controller.js'; +import {DictionaryImportController} from './settings/dictionary-import-controller.js'; import {GenericSettingController} from './settings/generic-setting-controller.js'; import {LanguagesController} from './settings/languages-controller.js'; import {ModalController} from './settings/modal-controller.js'; @@ -83,6 +85,12 @@ await Application.main(true, async (application) => { const genericSettingController = new GenericSettingController(settingsController); preparePromises.push(setupGenericSettingsController(genericSettingController)); + const dictionaryController = new DictionaryController(settingsController, modalController, statusFooter); + preparePromises.push(dictionaryController.prepare()); + + const dictionaryImportController = new DictionaryImportController(settingsController, modalController, statusFooter); + preparePromises.push(dictionaryImportController.prepare()); + const simpleScanningInputController = new ScanInputsSimpleController(settingsController); preparePromises.push(simpleScanningInputController.prepare()); diff --git a/ext/welcome.html b/ext/welcome.html index dd3e2f1e20..8bf3c17ffe 100644 --- a/ext/welcome.html +++ b/ext/welcome.html @@ -70,6 +70,20 @@

Recommended Permissions (Important)

+

Import Dictionaries (Important)

+
+
+
+
+
Import dictionaries…
+
+
+ +
+
+
+
+

Here are some basics to get started

@@ -222,7 +236,9 @@

Basic customization

All
-
Priority
+
Priority
+
+
@@ -238,7 +254,32 @@

Basic customization

+ + + @@ -268,6 +309,28 @@

Basic customization

+ + + +