Add light mode toggle

This commit is contained in:
Jack Kingsman
2026-03-10 19:32:22 -07:00
parent 42ca242ee1
commit d3a7b7ce07
3 changed files with 58 additions and 3 deletions
+6
View File
@@ -7,6 +7,8 @@ export interface Theme {
metaThemeColor: string;
}
export const THEME_CHANGE_EVENT = 'remoteterm-theme-change';
export const THEMES: Theme[] = [
{
id: 'original',
@@ -77,4 +79,8 @@ export function applyTheme(themeId: string): void {
meta.setAttribute('content', theme.metaThemeColor);
}
}
if (typeof window !== 'undefined') {
window.dispatchEvent(new CustomEvent(THEME_CHANGE_EVENT, { detail: themeId }));
}
}