feat(character-dictionary): add manager modal and scope name matching to current media (#86)

This commit is contained in:
2026-05-25 18:29:20 -07:00
committed by GitHub
parent 097b619d71
commit 3932e53ced
71 changed files with 1896 additions and 127 deletions
+2 -2
View File
@@ -66,7 +66,7 @@ test('normalizes fallback shortcuts when AnkiConnect flag is unset', () => {
shortcuts: {
mineSentence: 'KeyQ',
openRuntimeOptions: 'Digit9',
openCharacterDictionary: 'Ctrl+Shift+KeyA',
openCharacterDictionaryManager: 'Ctrl+KeyD',
},
};
@@ -74,7 +74,7 @@ test('normalizes fallback shortcuts when AnkiConnect flag is unset', () => {
assert.equal(resolved.mineSentence, 'Q');
assert.equal(resolved.openRuntimeOptions, '9');
assert.equal(resolved.openCharacterDictionary, 'Ctrl+Shift+A');
assert.equal(resolved.openCharacterDictionaryManager, 'Ctrl+D');
});
test('preserves null shortcut overrides so defaults can be disabled', () => {
+4 -2
View File
@@ -12,7 +12,7 @@ export interface ConfiguredShortcuts {
multiCopyTimeoutMs: number;
toggleSecondarySub: string | null | undefined;
markAudioCard: string | null | undefined;
openCharacterDictionary: string | null | undefined;
openCharacterDictionaryManager: string | null | undefined;
openRuntimeOptions: string | null | undefined;
openJimaku: string | null | undefined;
openSessionHelp: string | null | undefined;
@@ -58,7 +58,9 @@ export function resolveConfiguredShortcuts(
config.shortcuts?.multiCopyTimeoutMs ?? defaultConfig.shortcuts?.multiCopyTimeoutMs ?? 5000,
toggleSecondarySub: normalizeShortcut(shortcutValue('toggleSecondarySub')),
markAudioCard: normalizeShortcut(isAnkiConnectDisabled ? null : shortcutValue('markAudioCard')),
openCharacterDictionary: normalizeShortcut(shortcutValue('openCharacterDictionary')),
openCharacterDictionaryManager: normalizeShortcut(
shortcutValue('openCharacterDictionaryManager'),
),
openRuntimeOptions: normalizeShortcut(shortcutValue('openRuntimeOptions')),
openJimaku: normalizeShortcut(shortcutValue('openJimaku')),
openSessionHelp: normalizeShortcut(shortcutValue('openSessionHelp')),