Enhance SvelteKit project by adding new API routes for dark mode toggling, updating existing route parameters, and improving type definitions. Refactor component imports and optimize asset handling for better performance and maintainability.
CI / build (push) Has been skipped
CI / deploy (push) Successful in 1m29s

This commit is contained in:
eewing
2026-02-18 14:16:38 -06:00
parent a3db68e8fc
commit cfff9de0e6
574 changed files with 21605 additions and 1702 deletions
+38
View File
@@ -0,0 +1,38 @@
const COLLECTION = "Stackq_Items";
const load = async ({ locals }) => {
const list = await locals.pb.collection(COLLECTION).getFullList({ sort: "-created", expand: "Parent" }).catch(() => []);
const itemsForParent = list.map((i) => ({ id: i.id, Item: i.Item, SKU: i.SKU }));
return { items: list, itemsForParent };
};
const actions = {
setDarkmode: async ({ request, locals }) => {
const user = locals.user;
if (!user) return { success: false };
const formData = await request.formData();
const darkmode = formData.get("darkmode") === "true";
try {
const record = await locals.pb.collection("users").update(user.id, { darkmode });
locals.pb.authStore.save(locals.pb.authStore.token, record);
return { success: true, darkmode };
} catch {
return { success: false };
}
}
};
var _page_server_ts = /*#__PURE__*/Object.freeze({
__proto__: null,
actions: actions,
load: load
});
const index = 2;
let component_cache;
const component = async () => component_cache ??= (await import('./_page.svelte-CGQ867Ip.js')).default;
const server_id = "src/routes/+page.server.ts";
const imports = ["_app/immutable/nodes/2.Ds5Yb8tM.js","_app/immutable/chunks/B5gxx3nr.js","_app/immutable/chunks/DScGFiBY.js","_app/immutable/chunks/BlbL38UD.js","_app/immutable/chunks/Bzak7iHL.js","_app/immutable/chunks/Cua5CQwk.js","_app/immutable/chunks/CcEFwafz.js","_app/immutable/chunks/BPc-JNDc.js","_app/immutable/chunks/BfWekp-4.js","_app/immutable/chunks/BNQ00IGn.js","_app/immutable/chunks/DkOFPg3x.js","_app/immutable/chunks/DoRZqEmo.js"];
const stylesheets = [];
const fonts = [];
export { component, fonts, imports, index, _page_server_ts as server, server_id, stylesheets };
//# sourceMappingURL=2-DA-0Vznt.js.map