dark_theme: Add automatic color scheme support for spectators.

Similar to the light/dark theme support for the spectators, this adds
the automatic color scheme support by storing the user's preference
in the local storage.
This commit is contained in:
Sayam Samal
2024-06-06 00:50:05 +05:30
committed by Tim Abbott
parent e41d1fb48f
commit 2f6cc4a6b0
2 changed files with 8 additions and 0 deletions

View File

@@ -429,6 +429,8 @@ export function initialize_everything(state_data) {
dark_theme.enable();
} else if (preferred_theme === "light") {
dark_theme.disable();
} else {
dark_theme.default_preference_checker();
}
}