diff --git a/src/lib/style/theme.server.ts b/src/lib/style/theme.ts similarity index 100% rename from src/lib/style/theme.server.ts rename to src/lib/style/theme.ts diff --git a/src/routes/(app)/+layout.server.ts b/src/routes/(app)/+layout.server.ts deleted file mode 100644 index e435354d..00000000 --- a/src/routes/(app)/+layout.server.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { - themeBase, - themeColor, - themeSuccessBase, -} from "$lib/style/theme.server"; -import type { LayoutServerLoad } from "./$types"; - -export const load = (async () => ({ - themeSuccessBase, - themeBase, - themeColor, -})) satisfies LayoutServerLoad; diff --git a/src/routes/(app)/+layout.ts b/src/routes/(app)/+layout.ts index f70ad33c..fe2c9eff 100644 --- a/src/routes/(app)/+layout.ts +++ b/src/routes/(app)/+layout.ts @@ -1,11 +1,14 @@ import type { LayoutLoad } from "./$types"; import { browser } from "$app/environment"; import { charaFileFromUriComponent } from "$lib/share/share-url"; +import { themeBase, themeColor, themeSuccessBase } from "$lib/style/theme"; export const load = (async ({ url, data, fetch }) => { const importFile = browser && new URLSearchParams(url.search).get("import"); return { - ...data, + themeSuccessBase, + themeBase, + themeColor, importFile: importFile ? await charaFileFromUriComponent(importFile, fetch) : undefined, diff --git a/src/routes/(app)/ota-update/+layout.ts b/src/routes/(app)/ota-update/+layout.ts deleted file mode 100644 index ae88a275..00000000 --- a/src/routes/(app)/ota-update/+layout.ts +++ /dev/null @@ -1,2 +0,0 @@ -export const prerender = false; -export const ssr = false; diff --git a/vite.config.ts b/vite.config.ts index 97072a81..3d802e4d 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,5 +1,5 @@ // noinspection ES6PreferShortImport -import { themeColor } from "./src/lib/style/theme.server"; +import { themeColor } from "./src/lib/style/theme"; import { sveltekit } from "@sveltejs/kit/vite"; import { defineConfig } from "vite"; import { SvelteKitPWA } from "@vite-pwa/sveltekit";