feat(dictionary): add Hachidori backend support

- Add backend selection, setup gating, Anki integration, and external host support
- Add launcher flags, documentation, packaging, and focused tests
- Open on-demand overlay modals on the first attempt
This commit is contained in:
2026-09-22 00:21:19 -07:00
parent 1508863dbb
commit d9fdc7ef6d
446 changed files with 109060 additions and 244 deletions
+12 -2
View File
@@ -1,3 +1,5 @@
import type { DictionaryBackend } from '../../types/config';
export function resolveTrayIconPathRuntime(deps: {
platform: string;
resourcesPath: string;
@@ -39,6 +41,8 @@ export type TrayMenuActionHandlers = {
showFirstRunSetup: boolean;
openWindowsMpvLauncherSetup: () => void;
showWindowsMpvLauncherSetup: boolean;
dictionaryBackend: DictionaryBackend;
openHachidoriSettings: () => void;
openYomitanSettings: () => void;
openConfigSettings: () => void;
openSyncUi: () => void;
@@ -102,8 +106,14 @@ export function buildTrayMenuTemplateRuntime(handlers: TrayMenuActionHandlers):
]
: []),
{
label: 'Open Yomitan Settings',
click: handlers.openYomitanSettings,
label:
handlers.dictionaryBackend === 'hachidori'
? 'Open Hachidori Settings'
: 'Open Yomitan Settings',
click:
handlers.dictionaryBackend === 'hachidori'
? handlers.openHachidoriSettings
: handlers.openYomitanSettings,
},
{
label: 'Open SubMiner Settings',