Refactor PocketBase client initialization, update HTML template for favicon handling, and remove redundant text in main components for improved clarity and performance in SvelteKit project.
CI / build (push) Has been skipped
CI / deploy (push) Successful in 1m39s

This commit is contained in:
eewing
2026-02-17 15:30:31 -06:00
parent 7269444163
commit 27f297f9ec
6 changed files with 28 additions and 8 deletions
+2 -1
View File
@@ -1,6 +1,8 @@
<script lang="ts">
import { browser } from "$app/environment";
import { Button } from "$lib/components/ui/button";
let { data }: { data: { itemsForParent: { id: string; Item: string; SKU: string }[] } } = $props();
</script>
{#if browser}
@@ -14,7 +16,6 @@
{:else}
<main class="flex min-h-screen flex-col items-center justify-center gap-6 p-8">
<h1 class="text-2xl font-semibold">Stackq</h1>
<p class="text-muted-foreground">Svelte 5 + shadcn-svelte + PocketBase</p>
<div class="flex w-full max-w-xs flex-col gap-2">
<a href="/items" class="block">
<Button class="w-full">Items table</Button>
-1
View File
@@ -21,7 +21,6 @@
<main class="flex min-h-screen flex-col items-center justify-center gap-6 p-8">
<h1 class="text-2xl font-semibold">Stackq</h1>
<p class="text-muted-foreground">Svelte 5 + shadcn-svelte + PocketBase</p>
<div class="flex w-full max-w-xs flex-col gap-2">
<a href="/items" class="block">
<Button class="w-full">Items table</Button>
+2 -2
View File
@@ -4,13 +4,13 @@
import { Label } from "$lib/components/ui/label";
import { enhance } from "$app/forms";
import { Camera, X } from "@lucide/svelte";
import { pb } from "$lib/pocketbase";
import { POCKETBASE_BASE_URL } from "$lib/pocketbase";
import { UOM_OPTIONS, CATAGORY_OPTIONS, SUB_CATAGORY_OPTIONS } from "$lib/constants/items";
import type { StackqItem } from "$lib/types/items";
const COLLECTION = "Stackq_Items";
function itemImageUrl(recordId: string, filename: string): string {
return `${pb.baseUrl}/api/files/${COLLECTION}/${recordId}/${filename}`;
return `${POCKETBASE_BASE_URL}/api/files/${COLLECTION}/${recordId}/${filename}`;
}
let {