mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-05-29 12:55:16 -07:00
feat: add Anki deck dropdown with Yomitan auto-fill in settings (#95)
This commit is contained in:
@@ -326,7 +326,18 @@ export class KnownWordCacheManager {
|
||||
: null;
|
||||
|
||||
if (!selectedDeckEntry) {
|
||||
return null;
|
||||
const configuredFields = trimmedDeckEntries.flatMap(([, fields]) =>
|
||||
Array.isArray(fields) ? fields : [],
|
||||
);
|
||||
const normalizedFields = [
|
||||
...new Set(
|
||||
configuredFields
|
||||
.map(String)
|
||||
.map((field) => field.trim())
|
||||
.filter((field) => field.length > 0),
|
||||
),
|
||||
];
|
||||
return normalizedFields.length > 0 ? normalizedFields : this.getDefaultKnownWordFields();
|
||||
}
|
||||
|
||||
const deckFields = selectedDeckEntry[1];
|
||||
|
||||
Reference in New Issue
Block a user