design: implement dynamic theme-based app icons for system tray and taskbar
This commit is contained in:
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user