switch to another frontend framework wheeeeeeeeeeee

This commit is contained in:
sam 2024-09-05 22:29:12 +02:00
parent fa3c1ccaa7
commit c4adf6918c
Signed by: sam
GPG key ID: B4EF20DDE721CAA1
58 changed files with 6246 additions and 1703 deletions

View file

@ -0,0 +1,23 @@
import { UserSettings } from "./api/user";
import { getCookie } from "./request.server";
export default function getLocalSettings(req: Request): UserSettings {
const settings = { dark_mode: null } as UserSettings;
const theme = getCookie(req, "pronounscc-theme");
switch (theme) {
case "auto":
settings.dark_mode = null;
break;
case "light":
settings.dark_mode = false;
break;
case "dark":
settings.dark_mode = true;
break;
default:
break;
}
return settings;
}