aboutsummaryrefslogtreecommitdiff
path: root/ext/js/pages/settings/settings-main.js
diff options
context:
space:
mode:
authorKuuuube <61125188+Kuuuube@users.noreply.github.com>2024-05-11 23:03:27 -0400
committerGitHub <noreply@github.com>2024-05-12 03:03:27 +0000
commit486eec15b817d6a87ad98245dea3534545286334 (patch)
treea5376ab50b4770842915c7338401cb1b2a9e4636 /ext/js/pages/settings/settings-main.js
parent9b28e8ecf84027c4b52a015b389c6c1730732ce0 (diff)
Add option to bulk generate anki cards (#895)
* Add option to bulk generate anki cards * Fix tab replacement * Set deckname and modelname in note builder * Add addNotes to ankiconnect api implementation * Add option to send word list to anki directly * Add support for audio and media toggle * Add support for dictionary media * Remove unnecessary assignment * Remove unused css * Remove redundant html * Start of progress bar implementation * Remove redundant type annotation * Remove unused import * Rename words to terms * Print progress to console * Add confirmation to Export to file * Improve progress logs * Add unresponsive and console note * Add progress bars * Make cancel button actually cancel operation * Remove unresponsive warnings * Disable send and export buttons after they are clicked * Remove unneeded Yomichan mention * Mark as experimental * Clarify description * Add documentation on Anki Deck Generation * Add experimental note in docs * Add warning text to settings page * Switch example text based on language * Remove silly cancel function and bind directly * Rename to model * Add link to docs * Make test text less confusing * Rename deck to notes * Clarify what is being sent to anki * Fix incorrect modal header text * Clarify wording * Fix ankiconnect addNotes return types * Add error handling to send to anki * Fix wording and naming in docs * Add option to prevent sending duplicates to anki * Update anki deck and model without a page refresh * Cleanup internal html naming * Cleanup type definition styling * Update example text without a page refresh * Prevent closing the send/export confirm modal from messing up the ui and not allowing the user to see the current progress * Fix cancel getting stuck on true * Consolidate state changes * Support idle download timeout * Capitalize Failed to add cards error * Add separate variable for idleTimeout calculation * Remove redundant _cachedDictionaryEntryValue variable * Use tags option to populate tags * Include deck and tags when exporting to file * Use date down to seconds and zero pad * Remove unnecessary ternary * Limit 'path' finding function to only being able to search for 'path' * Rename _findPathsByKey to _findAllPaths
Diffstat (limited to 'ext/js/pages/settings/settings-main.js')
-rw-r--r--ext/js/pages/settings/settings-main.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/js/pages/settings/settings-main.js b/ext/js/pages/settings/settings-main.js
index df43df9b..3d3e2352 100644
--- a/ext/js/pages/settings/settings-main.js
+++ b/ext/js/pages/settings/settings-main.js
@@ -21,6 +21,7 @@ import {DocumentFocusController} from '../../dom/document-focus-controller.js';
import {querySelectorNotNull} from '../../dom/query-selector.js';
import {ExtensionContentController} from '../common/extension-content-controller.js';
import {AnkiController} from './anki-controller.js';
+import {AnkiDeckGeneratorController} from './anki-deck-generator-controller.js';
import {AnkiTemplatesController} from './anki-templates-controller.js';
import {AudioController} from './audio-controller.js';
import {BackupController} from './backup-controller.js';
@@ -117,6 +118,9 @@ await Application.main(true, async (application) => {
const ankiController = new AnkiController(settingsController);
preparePromises.push(ankiController.prepare());
+ const ankiDeckGeneratorController = new AnkiDeckGeneratorController(application, settingsController, modalController, ankiController);
+ preparePromises.push(ankiDeckGeneratorController.prepare());
+
const ankiTemplatesController = new AnkiTemplatesController(settingsController, modalController, ankiController);
preparePromises.push(ankiTemplatesController.prepare());