[codex] Fix Jellyfin setup and discovery toggle (#59)

This commit is contained in:
2026-05-02 19:56:10 -07:00
committed by GitHub
parent 27f5b2bb58
commit db30c61327
38 changed files with 1372 additions and 107 deletions
+17 -1
View File
@@ -39,13 +39,18 @@ export type TrayMenuActionHandlers = {
openYomitanSettings: () => void;
openRuntimeOptions: () => void;
openJellyfinSetup: () => void;
showJellyfinDiscovery: boolean;
jellyfinDiscoveryActive: boolean;
toggleJellyfinDiscovery: () => void;
openAnilistSetup: () => void;
quitApp: () => void;
};
export function buildTrayMenuTemplateRuntime(handlers: TrayMenuActionHandlers): Array<{
label?: string;
type?: 'separator';
type?: 'separator' | 'checkbox';
checked?: boolean;
enabled?: boolean;
click?: () => void;
}> {
return [
@@ -85,6 +90,17 @@ export function buildTrayMenuTemplateRuntime(handlers: TrayMenuActionHandlers):
label: 'Configure Jellyfin',
click: handlers.openJellyfinSetup,
},
...(handlers.showJellyfinDiscovery
? [
{
label: 'Jellyfin Discovery',
type: 'checkbox' as const,
checked: handlers.jellyfinDiscoveryActive,
enabled: true,
click: handlers.toggleJellyfinDiscovery,
},
]
: []),
{
label: 'Configure AniList',
click: handlers.openAnilistSetup,