web: respect reduced motion & transparency preferences

also cleaned up settings & device libs
This commit is contained in:
wukko
2024-07-12 18:49:29 +06:00
parent 1160b90c17
commit d27bed7add
10 changed files with 71 additions and 52 deletions

View File

@ -17,7 +17,7 @@ export const load: Load = async ({ url }) => {
if (browser) {
const device = (await import('$lib/device')).device;
const settings = get((await import('$lib/settings')).default);
const deviceLanguage = device.preferredLocale;
const deviceLanguage = device.prefers.language;
const settingsLanguage = settings.appearance.language;
const isValid = (lang: string) => (