web: data-driven switcher & save mode switcher

also:
- disabled ssr to enable localstorage
- removed the workaround for hover, as it looks bad
This commit is contained in:
wukko
2024-06-19 23:04:09 +06:00
parent e74aea076a
commit 4625939a87
7 changed files with 52 additions and 24 deletions

View File

@@ -18,7 +18,7 @@ const writeToStorage = (settings: CobaltSettings) => {
const loadFromStorage = () => {
const settings = localStorage.getItem('settings');
if (!settings) {
return writeToStorage(defaultSettings);
return defaultSettings;
}
return JSON.parse(settings) as CobaltSettings;