mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2026-01-10 20:12:48 +00:00
fix: server load interferes with spa
This commit is contained in:
@@ -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;
|
|
||||||
@@ -1,11 +1,14 @@
|
|||||||
import type { LayoutLoad } from "./$types";
|
import type { LayoutLoad } from "./$types";
|
||||||
import { browser } from "$app/environment";
|
import { browser } from "$app/environment";
|
||||||
import { charaFileFromUriComponent } from "$lib/share/share-url";
|
import { charaFileFromUriComponent } from "$lib/share/share-url";
|
||||||
|
import { themeBase, themeColor, themeSuccessBase } from "$lib/style/theme";
|
||||||
|
|
||||||
export const load = (async ({ url, data, fetch }) => {
|
export const load = (async ({ url, data, fetch }) => {
|
||||||
const importFile = browser && new URLSearchParams(url.search).get("import");
|
const importFile = browser && new URLSearchParams(url.search).get("import");
|
||||||
return {
|
return {
|
||||||
...data,
|
themeSuccessBase,
|
||||||
|
themeBase,
|
||||||
|
themeColor,
|
||||||
importFile: importFile
|
importFile: importFile
|
||||||
? await charaFileFromUriComponent(importFile, fetch)
|
? await charaFileFromUriComponent(importFile, fetch)
|
||||||
: undefined,
|
: undefined,
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
export const prerender = false;
|
|
||||||
export const ssr = false;
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
// noinspection ES6PreferShortImport
|
// noinspection ES6PreferShortImport
|
||||||
import { themeColor } from "./src/lib/style/theme.server";
|
import { themeColor } from "./src/lib/style/theme";
|
||||||
import { sveltekit } from "@sveltejs/kit/vite";
|
import { sveltekit } from "@sveltejs/kit/vite";
|
||||||
import { defineConfig } from "vite";
|
import { defineConfig } from "vite";
|
||||||
import { SvelteKitPWA } from "@vite-pwa/sveltekit";
|
import { SvelteKitPWA } from "@vite-pwa/sveltekit";
|
||||||
|
|||||||
Reference in New Issue
Block a user