design: implement dynamic theme-based app icons for system tray and taskbar

This commit is contained in:
2026-02-21 04:43:05 +01:00
parent b64ddafab9
commit fc19f66ace
8 changed files with 65 additions and 1 deletions

View File

@@ -31,8 +31,18 @@ export const AppThemeProvider: React.FC<{ children: React.ReactNode }> = ({ chil
if (api?.updateServerConfig) {
await api.updateServerConfig({ theme });
}
if (api?.updateAppIcon) {
await api.updateAppIcon(theme);
}
};
useEffect(() => {
const api = (window as any).electronAPI;
if (api?.updateAppIcon && currentTheme) {
api.updateAppIcon(currentTheme);
}
}, [currentTheme]);
const theme = useMemo(() => getTheme(currentTheme), [currentTheme]);
return (