feat: try to get user data

This commit is contained in:
Bart van der Braak 2024-02-01 13:23:57 +01:00
parent 39a36462bb
commit 482ffd7b85
42 changed files with 383 additions and 227 deletions

View file

@ -5,6 +5,7 @@ declare global {
namespace App { namespace App {
interface Locals { interface Locals {
pocketBase: PocketBase; pocketBase: PocketBase;
user: object;
} }
// interface Error {} // interface Error {}
// interface PageData {} // interface PageData {}

View file

@ -1,4 +1,4 @@
import type { Handle } from '@sveltejs/kit'; import { redirect, type Handle } from '@sveltejs/kit';
import PocketBase from 'pocketbase'; import PocketBase from 'pocketbase';
import { pb } from '$lib/pocketbase'; import { pb } from '$lib/pocketbase';
import { PUBLIC_CLIENT_PB } from '$env/static/public'; import { PUBLIC_CLIENT_PB } from '$env/static/public';
@ -10,7 +10,18 @@ export const handle: Handle = async ({ event, resolve }) => {
pb.set(event.locals.pocketBase); pb.set(event.locals.pocketBase);
event.locals.pocketBase.authStore.loadFromCookie(event.request.headers.get('cookie') ?? ''); event.locals.pocketBase.authStore.loadFromCookie(event.request.headers.get('cookie') ?? '');
// try {
// //refresh the auth if it is valid
// if (!event.locals.pocketBase.authStore.isValid)
// await event.locals.pocketBase
// .collection('users')
// .authRefresh<{ id: string; email: string }>();
// //spread the model to locals.user to be available in all pages
// event.locals.user = { ...event.locals.pocketBase.authStore.model };
// } catch (err) {
// console.log(err, 'error in hooks');
// event.locals.pocketBase.authStore.clear();
// }
const response = await resolve(event); const response = await resolve(event);
response.headers.set( response.headers.set(

View file

@ -0,0 +1,51 @@
<script lang="ts">
import * as Avatar from '$lib/components/ui/avatar';
import { Button } from '$lib/components/ui/button';
import * as DropdownMenu from '$lib/components/ui/dropdown-menu';
import type { LayoutData } from '../../../../routes/$types';
export let authenticated = false;
export let user = {};
</script>
{#if authenticated}
<pre>{JSON.stringify(user)}</pre>
<DropdownMenu.Root>
<DropdownMenu.Trigger asChild let:builder>
<Button variant="ghost" builders={[builder]} class="relative h-8 w-8 rounded-full">
<Avatar.Root class="h-9 w-9">
<!-- <Avatar.Image src="/avatars/03.png" alt="@shadcn" /> -->
<Avatar.Fallback>BB</Avatar.Fallback>
</Avatar.Root>
</Button>
</DropdownMenu.Trigger>
<DropdownMenu.Content class="w-56" align="end">
<DropdownMenu.Label class="font-normal">
<div class="flex flex-col space-y-1">
<p class="text-sm font-medium leading-none">BB</p>
<p class="text-muted-foreground text-xs leading-none">email@email.com</p>
</div>
</DropdownMenu.Label>
<DropdownMenu.Separator />
<DropdownMenu.Group>
<DropdownMenu.Item>
Profile
<DropdownMenu.Shortcut>⇧⌘P</DropdownMenu.Shortcut>
</DropdownMenu.Item>
<DropdownMenu.Item>
Settings
<DropdownMenu.Shortcut>⌘S</DropdownMenu.Shortcut>
</DropdownMenu.Item>
<DropdownMenu.Item>New Dashboard</DropdownMenu.Item>
</DropdownMenu.Group>
<DropdownMenu.Separator />
<DropdownMenu.Item href="/logout">
Log out
<DropdownMenu.Shortcut>⇧⌘Q</DropdownMenu.Shortcut>
</DropdownMenu.Item>
</DropdownMenu.Content>
</DropdownMenu.Root>
{:else}
<Button href="/login">Login</Button>
<Button href="/register" variant="outline">Signup</Button>
{/if}

View file

@ -1,7 +1,10 @@
<script lang="ts"> <script lang="ts">
import { Icons, ModeToggle, MainNav, MobileNav } from '$lib/components/site'; import { Icons, ModeToggle, MainNav, MobileNav } from '$lib/components/site';
import { siteConfig } from '$lib/config/site';
import UserNav from './nav/user-nav.svelte';
export let authenticated = false; export let authenticated = false;
export let user = {};
</script> </script>
<header <header
@ -11,13 +14,15 @@
<a href="/" class="mr-6 flex items-center space-x-2"> <a href="/" class="mr-6 flex items-center space-x-2">
<span class="sr-only">Logo (return home)</span> <span class="sr-only">Logo (return home)</span>
<Icons.logo /> <Icons.logo />
<span class="text-xl font-bold tracking-tight">{siteConfig.name}</span>
</a> </a>
<MainNav {authenticated}/> <MainNav {authenticated} />
<div class="flex flex-1 items-center justify-between space-x-2 sm:space-x-4 md:justify-end"> <div class="flex flex-1 items-center justify-end space-x-2 sm:space-x-4">
<nav class="flex"> <nav class="flex">
<ModeToggle /> <ModeToggle />
</nav> </nav>
<MobileNav {authenticated} />
<UserNav {authenticated} {user}/>
</div> </div>
<MobileNav {authenticated}/>
</div> </div>
</header> </header>

View file

@ -17,26 +17,21 @@ export const navConfig: NavConfig = {
href: '/dashboard', href: '/dashboard',
auth: true auth: true
}, },
{ // {
title: 'Settings', // title: 'Settings',
href: '/settings', // href: '/settings',
auth: true // auth: true
}, // },
{ // {
title: 'Login', // title: 'Login',
href: '/login', // href: '/login',
auth: false, // auth: false,
}, // },
{ // {
title: 'Register', // title: 'Register',
href: '/register', // href: '/register',
auth: false, // auth: false,
}, // },
{
title: 'Logout',
href: '/logout',
auth: true
},
], ],
sidebarNav: [] sidebarNav: []
}; };

View file

@ -7,11 +7,11 @@
DoubleArrowLeft DoubleArrowLeft
} from "radix-icons-svelte"; } from "radix-icons-svelte";
import * as Select from "$lib/components/ui/select"; import * as Select from "$lib/components/ui/select";
import type { Task } from "../(data)/schemas"; import type { Ticket } from "../(data)/schemas";
import type { AnyPlugins } from "svelte-headless-table/plugins"; import type { AnyPlugins } from "svelte-headless-table/plugins";
import type { TableViewModel } from "svelte-headless-table"; import type { TableViewModel } from "svelte-headless-table";
export let tableModel: TableViewModel<Task, AnyPlugins>; export let tableModel: TableViewModel<Ticket, AnyPlugins>;
const { pageRows, pluginStates, rows } = tableModel; const { pageRows, pluginStates, rows } = tableModel;

View file

@ -3,10 +3,10 @@
import { Button } from "$lib/components/ui/button"; import { Button } from "$lib/components/ui/button";
import * as DropdownMenu from "$lib/components/ui/dropdown-menu"; import * as DropdownMenu from "$lib/components/ui/dropdown-menu";
import { labels } from "../(data)/data"; import { labels } from "../(data)/data";
import { taskSchema, type Task } from "../(data)/schemas"; import { ticketSchema, type Ticket } from "../(data)/schemas";
export let row: Task; export let row: Ticket;
const task = taskSchema.parse(row); const task = ticketSchema.parse(row);
</script> </script>
<DropdownMenu.Root> <DropdownMenu.Root>

View file

@ -1,15 +1,15 @@
<script lang="ts"> <script lang="ts">
import { Input } from "$lib/components/ui/input"; import { Input } from "$lib/components/ui/input";
import { DataTableFacetedFilter, DataTableViewOptions } from "."; import { DataTableFacetedFilter, DataTableViewOptions } from ".";
import type { AnyPlugins } from "svelte-headless-table/lib/types/TablePlugin"; import type { Ticket } from "../(data)/schemas";
import type { Task } from "../(data)/schemas";
import type { TableViewModel } from "svelte-headless-table/lib/createViewModel";
import Button from "$lib/components/ui/button/button.svelte"; import Button from "$lib/components/ui/button/button.svelte";
import { Cross2 } from "radix-icons-svelte"; import { Cross2 } from "radix-icons-svelte";
import { statuses, priorities } from "../(data)/data"; import { statuses, priorities } from "../(data)/data";
import type { Writable } from "svelte/store"; import type { Writable } from "svelte/store";
import type { TableViewModel } from "svelte-headless-table";
import type { AnyPlugins } from "svelte-headless-table/plugins";
export let tableModel: TableViewModel<Task, AnyPlugins>; export let tableModel: TableViewModel<Ticket, AnyPlugins>;
const { pluginStates } = tableModel; const { pluginStates } = tableModel;
const { const {

View file

@ -2,11 +2,11 @@
import { MixerHorizontal } from "radix-icons-svelte"; import { MixerHorizontal } from "radix-icons-svelte";
import { Button } from "$lib/components/ui/button"; import { Button } from "$lib/components/ui/button";
import * as DropdownMenu from "$lib/components/ui/dropdown-menu"; import * as DropdownMenu from "$lib/components/ui/dropdown-menu";
import type { AnyPlugins } from "svelte-headless-table/lib/types/TablePlugin"; import type { Ticket } from "../(data)/schemas";
import type { Task } from "../(data)/schemas"; import type { TableViewModel } from "svelte-headless-table";
import type { TableViewModel } from "svelte-headless-table/lib/createViewModel"; import type { AnyPlugins } from "svelte-headless-table/plugins";
export let tableModel: TableViewModel<Task, AnyPlugins>; export let tableModel: TableViewModel<Ticket, AnyPlugins>;
const { pluginStates, flatColumns } = tableModel; const { pluginStates, flatColumns } = tableModel;
const { hiddenColumnIds } = pluginStates.hide; const { hiddenColumnIds } = pluginStates.hide;

View file

@ -21,9 +21,9 @@
DataTablePagination DataTablePagination
} from "."; } from ".";
import type { Task } from "../(data)/schemas"; import type { Ticket } from "../(data)/schemas";
export let data: Task[]; export let data: Ticket[];
const table = createTable(readable(data), { const table = createTable(readable(data), {
select: addSelectedRows(), select: addSelectedRows(),

View file

@ -12,15 +12,15 @@ import {
export const labels = [ export const labels = [
{ {
value: "bug", value: "bug",
label: "Bug" label: "Incident"
}, },
{ {
value: "feature", value: "feature",
label: "Feature" label: "Change"
}, },
{ {
value: "documentation", value: "documentation",
label: "Documentation" label: "Information"
} }
]; ];

View file

@ -0,0 +1,18 @@
import { z } from "zod";
// We're keeping a simple non-relational schema here.
// IRL, you will have a schema for your data models.
export const ticketSchema = z.object({
id: z.string(),
// solution: z.string().optional(),
title: z.string(),
status: z.string(),
label: z.string(),
// createdAt: z.date(),
// updatedAt: z.date(),
priority: z.string(), // z.number().min(0).max(4),
// source: z.number(),
// assignee: z.string(),
});
export type Ticket = z.infer<typeof ticketSchema>;

View file

@ -4,699 +4,799 @@
"title": "You can't compress the program without quantifying the open-source SSD pixel!", "title": "You can't compress the program without quantifying the open-source SSD pixel!",
"status": "in progress", "status": "in progress",
"label": "documentation", "label": "documentation",
"priority": "medium" "priority": "medium",
"assignee": ""
}, },
{ {
"id": "TASK-7878", "id": "TASK-7878",
"title": "Try to calculate the EXE feed, maybe it will index the multi-byte pixel!", "title": "Try to calculate the EXE feed, maybe it will index the multi-byte pixel!",
"status": "backlog", "status": "backlog",
"label": "documentation", "label": "documentation",
"priority": "medium" "priority": "medium",
"assignee": ""
}, },
{ {
"id": "TASK-7839", "id": "TASK-7839",
"title": "We need to bypass the neural TCP card!", "title": "We need to bypass the neural TCP card!",
"status": "todo", "status": "todo",
"label": "bug", "label": "bug",
"priority": "high" "priority": "high",
"assignee": ""
}, },
{ {
"id": "TASK-5562", "id": "TASK-5562",
"title": "The SAS interface is down, bypass the open-source pixel so we can back up the PNG bandwidth!", "title": "The SAS interface is down, bypass the open-source pixel so we can back up the PNG bandwidth!",
"status": "backlog", "status": "backlog",
"label": "feature", "label": "feature",
"priority": "medium" "priority": "medium",
"assignee": ""
}, },
{ {
"id": "TASK-8686", "id": "TASK-8686",
"title": "I'll parse the wireless SSL protocol, that should driver the API panel!", "title": "I'll parse the wireless SSL protocol, that should driver the API panel!",
"status": "canceled", "status": "canceled",
"label": "feature", "label": "feature",
"priority": "medium" "priority": "medium",
"assignee": ""
}, },
{ {
"id": "TASK-1280", "id": "TASK-1280",
"title": "Use the digital TLS panel, then you can transmit the haptic system!", "title": "Use the digital TLS panel, then you can transmit the haptic system!",
"status": "done", "status": "done",
"label": "bug", "label": "bug",
"priority": "high" "priority": "high",
"assignee": ""
}, },
{ {
"id": "TASK-7262", "id": "TASK-7262",
"title": "The UTF8 application is down, parse the neural bandwidth so we can back up the PNG firewall!", "title": "The UTF8 application is down, parse the neural bandwidth so we can back up the PNG firewall!",
"status": "done", "status": "done",
"label": "feature", "label": "feature",
"priority": "high" "priority": "high",
"assignee": ""
}, },
{ {
"id": "TASK-1138", "id": "TASK-1138",
"title": "Generating the driver won't do anything, we need to quantify the 1080p SMTP bandwidth!", "title": "Generating the driver won't do anything, we need to quantify the 1080p SMTP bandwidth!",
"status": "in progress", "status": "in progress",
"label": "feature", "label": "feature",
"priority": "medium" "priority": "medium",
"assignee": ""
}, },
{ {
"id": "TASK-7184", "id": "TASK-7184",
"title": "We need to program the back-end THX pixel!", "title": "We need to program the back-end THX pixel!",
"status": "todo", "status": "todo",
"label": "feature", "label": "feature",
"priority": "low" "priority": "low",
"assignee": ""
}, },
{ {
"id": "TASK-5160", "id": "TASK-5160",
"title": "Calculating the bus won't do anything, we need to navigate the back-end JSON protocol!", "title": "Calculating the bus won't do anything, we need to navigate the back-end JSON protocol!",
"status": "in progress", "status": "in progress",
"label": "documentation", "label": "documentation",
"priority": "high" "priority": "high",
"assignee": ""
}, },
{ {
"id": "TASK-5618", "id": "TASK-5618",
"title": "Generating the driver won't do anything, we need to index the online SSL application!", "title": "Generating the driver won't do anything, we need to index the online SSL application!",
"status": "done", "status": "done",
"label": "documentation", "label": "documentation",
"priority": "medium" "priority": "medium",
"assignee": ""
}, },
{ {
"id": "TASK-6699", "id": "TASK-6699",
"title": "I'll transmit the wireless JBOD capacitor, that should hard drive the SSD feed!", "title": "I'll transmit the wireless JBOD capacitor, that should hard drive the SSD feed!",
"status": "backlog", "status": "backlog",
"label": "documentation", "label": "documentation",
"priority": "medium" "priority": "medium",
"assignee": ""
}, },
{ {
"id": "TASK-2858", "id": "TASK-2858",
"title": "We need to override the online UDP bus!", "title": "We need to override the online UDP bus!",
"status": "backlog", "status": "backlog",
"label": "bug", "label": "bug",
"priority": "medium" "priority": "medium",
"assignee": ""
}, },
{ {
"id": "TASK-9864", "id": "TASK-9864",
"title": "I'll reboot the 1080p FTP panel, that should matrix the HEX hard drive!", "title": "I'll reboot the 1080p FTP panel, that should matrix the HEX hard drive!",
"status": "done", "status": "done",
"label": "bug", "label": "bug",
"priority": "high" "priority": "high",
"assignee": ""
}, },
{ {
"id": "TASK-8404", "id": "TASK-8404",
"title": "We need to generate the virtual HEX alarm!", "title": "We need to generate the virtual HEX alarm!",
"status": "in progress", "status": "in progress",
"label": "bug", "label": "bug",
"priority": "low" "priority": "low",
"assignee": ""
}, },
{ {
"id": "TASK-5365", "id": "TASK-5365",
"title": "Backing up the pixel won't do anything, we need to transmit the primary IB array!", "title": "Backing up the pixel won't do anything, we need to transmit the primary IB array!",
"status": "in progress", "status": "in progress",
"label": "documentation", "label": "documentation",
"priority": "low" "priority": "low",
"assignee": ""
}, },
{ {
"id": "TASK-1780", "id": "TASK-1780",
"title": "The CSS feed is down, index the bluetooth transmitter so we can compress the CLI protocol!", "title": "The CSS feed is down, index the bluetooth transmitter so we can compress the CLI protocol!",
"status": "todo", "status": "todo",
"label": "documentation", "label": "documentation",
"priority": "high" "priority": "high",
"assignee": ""
}, },
{ {
"id": "TASK-6938", "id": "TASK-6938",
"title": "Use the redundant SCSI application, then you can hack the optical alarm!", "title": "Use the redundant SCSI application, then you can hack the optical alarm!",
"status": "todo", "status": "todo",
"label": "documentation", "label": "documentation",
"priority": "high" "priority": "high",
"assignee": ""
}, },
{ {
"id": "TASK-9885", "id": "TASK-9885",
"title": "We need to compress the auxiliary VGA driver!", "title": "We need to compress the auxiliary VGA driver!",
"status": "backlog", "status": "backlog",
"label": "bug", "label": "bug",
"priority": "high" "priority": "high",
"assignee": ""
}, },
{ {
"id": "TASK-3216", "id": "TASK-3216",
"title": "Transmitting the transmitter won't do anything, we need to compress the virtual HDD sensor!", "title": "Transmitting the transmitter won't do anything, we need to compress the virtual HDD sensor!",
"status": "backlog", "status": "backlog",
"label": "documentation", "label": "documentation",
"priority": "medium" "priority": "medium",
"assignee": ""
}, },
{ {
"id": "TASK-9285", "id": "TASK-9285",
"title": "The IP monitor is down, copy the haptic alarm so we can generate the HTTP transmitter!", "title": "The IP monitor is down, copy the haptic alarm so we can generate the HTTP transmitter!",
"status": "todo", "status": "todo",
"label": "bug", "label": "bug",
"priority": "high" "priority": "high",
"assignee": ""
}, },
{ {
"id": "TASK-1024", "id": "TASK-1024",
"title": "Overriding the microchip won't do anything, we need to transmit the digital OCR transmitter!", "title": "Overriding the microchip won't do anything, we need to transmit the digital OCR transmitter!",
"status": "in progress", "status": "in progress",
"label": "documentation", "label": "documentation",
"priority": "low" "priority": "low",
"assignee": ""
}, },
{ {
"id": "TASK-7068", "id": "TASK-7068",
"title": "You can't generate the capacitor without indexing the wireless HEX pixel!", "title": "You can't generate the capacitor without indexing the wireless HEX pixel!",
"status": "canceled", "status": "canceled",
"label": "bug", "label": "bug",
"priority": "low" "priority": "low",
"assignee": ""
}, },
{ {
"id": "TASK-6502", "id": "TASK-6502",
"title": "Navigating the microchip won't do anything, we need to bypass the back-end SQL bus!", "title": "Navigating the microchip won't do anything, we need to bypass the back-end SQL bus!",
"status": "todo", "status": "todo",
"label": "bug", "label": "bug",
"priority": "high" "priority": "high",
"assignee": ""
}, },
{ {
"id": "TASK-5326", "id": "TASK-5326",
"title": "We need to hack the redundant UTF8 transmitter!", "title": "We need to hack the redundant UTF8 transmitter!",
"status": "todo", "status": "todo",
"label": "bug", "label": "bug",
"priority": "low" "priority": "low",
"assignee": ""
}, },
{ {
"id": "TASK-6274", "id": "TASK-6274",
"title": "Use the virtual PCI circuit, then you can parse the bluetooth alarm!", "title": "Use the virtual PCI circuit, then you can parse the bluetooth alarm!",
"status": "canceled", "status": "canceled",
"label": "documentation", "label": "documentation",
"priority": "low" "priority": "low",
"assignee": ""
}, },
{ {
"id": "TASK-1571", "id": "TASK-1571",
"title": "I'll input the neural DRAM circuit, that should protocol the SMTP interface!", "title": "I'll input the neural DRAM circuit, that should protocol the SMTP interface!",
"status": "in progress", "status": "in progress",
"label": "feature", "label": "feature",
"priority": "medium" "priority": "medium",
"assignee": ""
}, },
{ {
"id": "TASK-9518", "id": "TASK-9518",
"title": "Compressing the interface won't do anything, we need to compress the online SDD matrix!", "title": "Compressing the interface won't do anything, we need to compress the online SDD matrix!",
"status": "canceled", "status": "canceled",
"label": "documentation", "label": "documentation",
"priority": "medium" "priority": "medium",
"assignee": ""
}, },
{ {
"id": "TASK-5581", "id": "TASK-5581",
"title": "I'll synthesize the digital COM pixel, that should transmitter the UTF8 protocol!", "title": "I'll synthesize the digital COM pixel, that should transmitter the UTF8 protocol!",
"status": "backlog", "status": "backlog",
"label": "documentation", "label": "documentation",
"priority": "high" "priority": "high",
"assignee": ""
}, },
{ {
"id": "TASK-2197", "id": "TASK-2197",
"title": "Parsing the feed won't do anything, we need to copy the bluetooth DRAM bus!", "title": "Parsing the feed won't do anything, we need to copy the bluetooth DRAM bus!",
"status": "todo", "status": "todo",
"label": "documentation", "label": "documentation",
"priority": "low" "priority": "low",
"assignee": ""
}, },
{ {
"id": "TASK-8484", "id": "TASK-8484",
"title": "We need to parse the solid state UDP firewall!", "title": "We need to parse the solid state UDP firewall!",
"status": "in progress", "status": "in progress",
"label": "bug", "label": "bug",
"priority": "low" "priority": "low",
"assignee": ""
}, },
{ {
"id": "TASK-9892", "id": "TASK-9892",
"title": "If we back up the application, we can get to the UDP application through the multi-byte THX capacitor!", "title": "If we back up the application, we can get to the UDP application through the multi-byte THX capacitor!",
"status": "done", "status": "done",
"label": "documentation", "label": "documentation",
"priority": "high" "priority": "high",
"assignee": ""
}, },
{ {
"id": "TASK-9616", "id": "TASK-9616",
"title": "We need to synthesize the cross-platform ASCII pixel!", "title": "We need to synthesize the cross-platform ASCII pixel!",
"status": "in progress", "status": "in progress",
"label": "feature", "label": "feature",
"priority": "medium" "priority": "medium",
"assignee": ""
}, },
{ {
"id": "TASK-9744", "id": "TASK-9744",
"title": "Use the back-end IP card, then you can input the solid state hard drive!", "title": "Use the back-end IP card, then you can input the solid state hard drive!",
"status": "done", "status": "done",
"label": "documentation", "label": "documentation",
"priority": "low" "priority": "low",
"assignee": ""
}, },
{ {
"id": "TASK-1376", "id": "TASK-1376",
"title": "Generating the alarm won't do anything, we need to generate the mobile IP capacitor!", "title": "Generating the alarm won't do anything, we need to generate the mobile IP capacitor!",
"status": "backlog", "status": "backlog",
"label": "documentation", "label": "documentation",
"priority": "low" "priority": "low",
"assignee": ""
}, },
{ {
"id": "TASK-7382", "id": "TASK-7382",
"title": "If we back up the firewall, we can get to the RAM alarm through the primary UTF8 pixel!", "title": "If we back up the firewall, we can get to the RAM alarm through the primary UTF8 pixel!",
"status": "todo", "status": "todo",
"label": "feature", "label": "feature",
"priority": "low" "priority": "low",
"assignee": ""
}, },
{ {
"id": "TASK-2290", "id": "TASK-2290",
"title": "I'll compress the virtual JSON panel, that should application the UTF8 bus!", "title": "I'll compress the virtual JSON panel, that should application the UTF8 bus!",
"status": "canceled", "status": "canceled",
"label": "documentation", "label": "documentation",
"priority": "high" "priority": "high",
"assignee": ""
}, },
{ {
"id": "TASK-1533", "id": "TASK-1533",
"title": "You can't input the firewall without overriding the wireless TCP firewall!", "title": "You can't input the firewall without overriding the wireless TCP firewall!",
"status": "done", "status": "done",
"label": "bug", "label": "bug",
"priority": "high" "priority": "high",
"assignee": ""
}, },
{ {
"id": "TASK-4920", "id": "TASK-4920",
"title": "Bypassing the hard drive won't do anything, we need to input the bluetooth JSON program!", "title": "Bypassing the hard drive won't do anything, we need to input the bluetooth JSON program!",
"status": "in progress", "status": "in progress",
"label": "bug", "label": "bug",
"priority": "high" "priority": "high",
"assignee": ""
}, },
{ {
"id": "TASK-5168", "id": "TASK-5168",
"title": "If we synthesize the bus, we can get to the IP panel through the virtual TLS array!", "title": "If we synthesize the bus, we can get to the IP panel through the virtual TLS array!",
"status": "in progress", "status": "in progress",
"label": "feature", "label": "feature",
"priority": "low" "priority": "low",
"assignee": ""
}, },
{ {
"id": "TASK-7103", "id": "TASK-7103",
"title": "We need to parse the multi-byte EXE bandwidth!", "title": "We need to parse the multi-byte EXE bandwidth!",
"status": "canceled", "status": "canceled",
"label": "feature", "label": "feature",
"priority": "low" "priority": "low",
"assignee": ""
}, },
{ {
"id": "TASK-4314", "id": "TASK-4314",
"title": "If we compress the program, we can get to the XML alarm through the multi-byte COM matrix!", "title": "If we compress the program, we can get to the XML alarm through the multi-byte COM matrix!",
"status": "in progress", "status": "in progress",
"label": "bug", "label": "bug",
"priority": "high" "priority": "high",
"assignee": ""
}, },
{ {
"id": "TASK-3415", "id": "TASK-3415",
"title": "Use the cross-platform XML application, then you can quantify the solid state feed!", "title": "Use the cross-platform XML application, then you can quantify the solid state feed!",
"status": "todo", "status": "todo",
"label": "feature", "label": "feature",
"priority": "high" "priority": "high",
"assignee": ""
}, },
{ {
"id": "TASK-8339", "id": "TASK-8339",
"title": "Try to calculate the DNS interface, maybe it will input the bluetooth capacitor!", "title": "Try to calculate the DNS interface, maybe it will input the bluetooth capacitor!",
"status": "in progress", "status": "in progress",
"label": "feature", "label": "feature",
"priority": "low" "priority": "low",
"assignee": ""
}, },
{ {
"id": "TASK-6995", "id": "TASK-6995",
"title": "Try to hack the XSS bandwidth, maybe it will override the bluetooth matrix!", "title": "Try to hack the XSS bandwidth, maybe it will override the bluetooth matrix!",
"status": "todo", "status": "todo",
"label": "feature", "label": "feature",
"priority": "high" "priority": "high",
"assignee": ""
}, },
{ {
"id": "TASK-8053", "id": "TASK-8053",
"title": "If we connect the program, we can get to the UTF8 matrix through the digital UDP protocol!", "title": "If we connect the program, we can get to the UTF8 matrix through the digital UDP protocol!",
"status": "todo", "status": "todo",
"label": "feature", "label": "feature",
"priority": "medium" "priority": "medium",
"assignee": ""
}, },
{ {
"id": "TASK-4336", "id": "TASK-4336",
"title": "If we synthesize the microchip, we can get to the SAS sensor through the optical UDP program!", "title": "If we synthesize the microchip, we can get to the SAS sensor through the optical UDP program!",
"status": "todo", "status": "todo",
"label": "documentation", "label": "documentation",
"priority": "low" "priority": "low",
"assignee": ""
}, },
{ {
"id": "TASK-8790", "id": "TASK-8790",
"title": "I'll back up the optical COM alarm, that should alarm the RSS capacitor!", "title": "I'll back up the optical COM alarm, that should alarm the RSS capacitor!",
"status": "done", "status": "done",
"label": "bug", "label": "bug",
"priority": "medium" "priority": "medium",
"assignee": ""
}, },
{ {
"id": "TASK-8980", "id": "TASK-8980",
"title": "Try to navigate the SQL transmitter, maybe it will back up the virtual firewall!", "title": "Try to navigate the SQL transmitter, maybe it will back up the virtual firewall!",
"status": "canceled", "status": "canceled",
"label": "bug", "label": "bug",
"priority": "low" "priority": "low",
"assignee": ""
}, },
{ {
"id": "TASK-7342", "id": "TASK-7342",
"title": "Use the neural CLI card, then you can parse the online port!", "title": "Use the neural CLI card, then you can parse the online port!",
"status": "backlog", "status": "backlog",
"label": "documentation", "label": "documentation",
"priority": "low" "priority": "low",
"assignee": ""
}, },
{ {
"id": "TASK-5608", "id": "TASK-5608",
"title": "I'll hack the haptic SSL program, that should bus the UDP transmitter!", "title": "I'll hack the haptic SSL program, that should bus the UDP transmitter!",
"status": "canceled", "status": "canceled",
"label": "documentation", "label": "documentation",
"priority": "low" "priority": "low",
"assignee": ""
}, },
{ {
"id": "TASK-1606", "id": "TASK-1606",
"title": "I'll generate the bluetooth PNG firewall, that should pixel the SSL driver!", "title": "I'll generate the bluetooth PNG firewall, that should pixel the SSL driver!",
"status": "done", "status": "done",
"label": "feature", "label": "feature",
"priority": "medium" "priority": "medium",
"assignee": ""
}, },
{ {
"id": "TASK-7872", "id": "TASK-7872",
"title": "Transmitting the circuit won't do anything, we need to reboot the 1080p RSS monitor!", "title": "Transmitting the circuit won't do anything, we need to reboot the 1080p RSS monitor!",
"status": "canceled", "status": "canceled",
"label": "feature", "label": "feature",
"priority": "medium" "priority": "medium",
"assignee": ""
}, },
{ {
"id": "TASK-4167", "id": "TASK-4167",
"title": "Use the cross-platform SMS circuit, then you can synthesize the optical feed!", "title": "Use the cross-platform SMS circuit, then you can synthesize the optical feed!",
"status": "canceled", "status": "canceled",
"label": "bug", "label": "bug",
"priority": "medium" "priority": "medium",
"assignee": ""
}, },
{ {
"id": "TASK-9581", "id": "TASK-9581",
"title": "You can't index the port without hacking the cross-platform XSS monitor!", "title": "You can't index the port without hacking the cross-platform XSS monitor!",
"status": "backlog", "status": "backlog",
"label": "documentation", "label": "documentation",
"priority": "low" "priority": "low",
"assignee": ""
}, },
{ {
"id": "TASK-8806", "id": "TASK-8806",
"title": "We need to bypass the back-end SSL panel!", "title": "We need to bypass the back-end SSL panel!",
"status": "done", "status": "done",
"label": "bug", "label": "bug",
"priority": "medium" "priority": "medium",
"assignee": ""
}, },
{ {
"id": "TASK-6542", "id": "TASK-6542",
"title": "Try to quantify the RSS firewall, maybe it will quantify the open-source system!", "title": "Try to quantify the RSS firewall, maybe it will quantify the open-source system!",
"status": "done", "status": "done",
"label": "feature", "label": "feature",
"priority": "low" "priority": "low",
"assignee": ""
}, },
{ {
"id": "TASK-6806", "id": "TASK-6806",
"title": "The VGA protocol is down, reboot the back-end matrix so we can parse the CSS panel!", "title": "The VGA protocol is down, reboot the back-end matrix so we can parse the CSS panel!",
"status": "canceled", "status": "canceled",
"label": "documentation", "label": "documentation",
"priority": "low" "priority": "low",
"assignee": ""
}, },
{ {
"id": "TASK-9549", "id": "TASK-9549",
"title": "You can't bypass the bus without connecting the neural JBOD bus!", "title": "You can't bypass the bus without connecting the neural JBOD bus!",
"status": "todo", "status": "todo",
"label": "feature", "label": "feature",
"priority": "high" "priority": "high",
"assignee": ""
}, },
{ {
"id": "TASK-1075", "id": "TASK-1075",
"title": "Backing up the driver won't do anything, we need to parse the redundant RAM pixel!", "title": "Backing up the driver won't do anything, we need to parse the redundant RAM pixel!",
"status": "done", "status": "done",
"label": "feature", "label": "feature",
"priority": "medium" "priority": "medium",
"assignee": ""
}, },
{ {
"id": "TASK-1427", "id": "TASK-1427",
"title": "Use the auxiliary PCI circuit, then you can calculate the cross-platform interface!", "title": "Use the auxiliary PCI circuit, then you can calculate the cross-platform interface!",
"status": "done", "status": "done",
"label": "documentation", "label": "documentation",
"priority": "high" "priority": "high",
"assignee": ""
}, },
{ {
"id": "TASK-1907", "id": "TASK-1907",
"title": "Hacking the circuit won't do anything, we need to back up the online DRAM system!", "title": "Hacking the circuit won't do anything, we need to back up the online DRAM system!",
"status": "todo", "status": "todo",
"label": "documentation", "label": "documentation",
"priority": "high" "priority": "high",
"assignee": ""
}, },
{ {
"id": "TASK-4309", "id": "TASK-4309",
"title": "If we generate the system, we can get to the TCP sensor through the optical GB pixel!", "title": "If we generate the system, we can get to the TCP sensor through the optical GB pixel!",
"status": "backlog", "status": "backlog",
"label": "bug", "label": "bug",
"priority": "medium" "priority": "medium",
"assignee": ""
}, },
{ {
"id": "TASK-3973", "id": "TASK-3973",
"title": "I'll parse the back-end ADP array, that should bandwidth the RSS bandwidth!", "title": "I'll parse the back-end ADP array, that should bandwidth the RSS bandwidth!",
"status": "todo", "status": "todo",
"label": "feature", "label": "feature",
"priority": "medium" "priority": "medium",
"assignee": ""
}, },
{ {
"id": "TASK-7962", "id": "TASK-7962",
"title": "Use the wireless RAM program, then you can hack the cross-platform feed!", "title": "Use the wireless RAM program, then you can hack the cross-platform feed!",
"status": "canceled", "status": "canceled",
"label": "bug", "label": "bug",
"priority": "low" "priority": "low",
"assignee": ""
}, },
{ {
"id": "TASK-3360", "id": "TASK-3360",
"title": "You can't quantify the program without synthesizing the neural OCR interface!", "title": "You can't quantify the program without synthesizing the neural OCR interface!",
"status": "done", "status": "done",
"label": "feature", "label": "feature",
"priority": "medium" "priority": "medium",
"assignee": ""
}, },
{ {
"id": "TASK-9887", "id": "TASK-9887",
"title": "Use the auxiliary ASCII sensor, then you can connect the solid state port!", "title": "Use the auxiliary ASCII sensor, then you can connect the solid state port!",
"status": "backlog", "status": "backlog",
"label": "bug", "label": "bug",
"priority": "medium" "priority": "medium",
"assignee": ""
}, },
{ {
"id": "TASK-3649", "id": "TASK-3649",
"title": "I'll input the virtual USB system, that should circuit the DNS monitor!", "title": "I'll input the virtual USB system, that should circuit the DNS monitor!",
"status": "in progress", "status": "in progress",
"label": "feature", "label": "feature",
"priority": "medium" "priority": "medium",
"assignee": ""
}, },
{ {
"id": "TASK-3586", "id": "TASK-3586",
"title": "If we quantify the circuit, we can get to the CLI feed through the mobile SMS hard drive!", "title": "If we quantify the circuit, we can get to the CLI feed through the mobile SMS hard drive!",
"status": "in progress", "status": "in progress",
"label": "bug", "label": "bug",
"priority": "low" "priority": "low",
"assignee": ""
}, },
{ {
"id": "TASK-5150", "id": "TASK-5150",
"title": "I'll hack the wireless XSS port, that should transmitter the IP interface!", "title": "I'll hack the wireless XSS port, that should transmitter the IP interface!",
"status": "canceled", "status": "canceled",
"label": "feature", "label": "feature",
"priority": "medium" "priority": "medium",
"assignee": ""
}, },
{ {
"id": "TASK-3652", "id": "TASK-3652",
"title": "The SQL interface is down, override the optical bus so we can program the ASCII interface!", "title": "The SQL interface is down, override the optical bus so we can program the ASCII interface!",
"status": "backlog", "status": "backlog",
"label": "feature", "label": "feature",
"priority": "low" "priority": "low",
"assignee": ""
}, },
{ {
"id": "TASK-6884", "id": "TASK-6884",
"title": "Use the digital PCI circuit, then you can synthesize the multi-byte microchip!", "title": "Use the digital PCI circuit, then you can synthesize the multi-byte microchip!",
"status": "canceled", "status": "canceled",
"label": "feature", "label": "feature",
"priority": "high" "priority": "high",
"assignee": ""
}, },
{ {
"id": "TASK-1591", "id": "TASK-1591",
"title": "We need to connect the mobile XSS driver!", "title": "We need to connect the mobile XSS driver!",
"status": "in progress", "status": "in progress",
"label": "feature", "label": "feature",
"priority": "high" "priority": "high",
"assignee": ""
}, },
{ {
"id": "TASK-3802", "id": "TASK-3802",
"title": "Try to override the ASCII protocol, maybe it will parse the virtual matrix!", "title": "Try to override the ASCII protocol, maybe it will parse the virtual matrix!",
"status": "in progress", "status": "in progress",
"label": "feature", "label": "feature",
"priority": "low" "priority": "low",
"assignee": ""
}, },
{ {
"id": "TASK-7253", "id": "TASK-7253",
"title": "Programming the capacitor won't do anything, we need to bypass the neural IB hard drive!", "title": "Programming the capacitor won't do anything, we need to bypass the neural IB hard drive!",
"status": "backlog", "status": "backlog",
"label": "bug", "label": "bug",
"priority": "high" "priority": "high",
"assignee": ""
}, },
{ {
"id": "TASK-9739", "id": "TASK-9739",
"title": "We need to hack the multi-byte HDD bus!", "title": "We need to hack the multi-byte HDD bus!",
"status": "done", "status": "done",
"label": "documentation", "label": "documentation",
"priority": "medium" "priority": "medium",
"assignee": ""
}, },
{ {
"id": "TASK-4424", "id": "TASK-4424",
"title": "Try to hack the HEX alarm, maybe it will connect the optical pixel!", "title": "Try to hack the HEX alarm, maybe it will connect the optical pixel!",
"status": "in progress", "status": "in progress",
"label": "documentation", "label": "documentation",
"priority": "medium" "priority": "medium",
"assignee": ""
}, },
{ {
"id": "TASK-3922", "id": "TASK-3922",
"title": "You can't back up the capacitor without generating the wireless PCI program!", "title": "You can't back up the capacitor without generating the wireless PCI program!",
"status": "backlog", "status": "backlog",
"label": "bug", "label": "bug",
"priority": "low" "priority": "low",
"assignee": ""
}, },
{ {
"id": "TASK-4921", "id": "TASK-4921",
"title": "I'll index the open-source IP feed, that should system the GB application!", "title": "I'll index the open-source IP feed, that should system the GB application!",
"status": "canceled", "status": "canceled",
"label": "bug", "label": "bug",
"priority": "low" "priority": "low",
"assignee": ""
}, },
{ {
"id": "TASK-5814", "id": "TASK-5814",
"title": "We need to calculate the 1080p AGP feed!", "title": "We need to calculate the 1080p AGP feed!",
"status": "backlog", "status": "backlog",
"label": "bug", "label": "bug",
"priority": "high" "priority": "high",
"assignee": ""
}, },
{ {
"id": "TASK-2645", "id": "TASK-2645",
"title": "Synthesizing the system won't do anything, we need to navigate the multi-byte HDD firewall!", "title": "Synthesizing the system won't do anything, we need to navigate the multi-byte HDD firewall!",
"status": "todo", "status": "todo",
"label": "documentation", "label": "documentation",
"priority": "medium" "priority": "medium",
"assignee": ""
}, },
{ {
"id": "TASK-4535", "id": "TASK-4535",
"title": "Try to copy the JSON circuit, maybe it will connect the wireless feed!", "title": "Try to copy the JSON circuit, maybe it will connect the wireless feed!",
"status": "in progress", "status": "in progress",
"label": "feature", "label": "feature",
"priority": "low" "priority": "low",
"assignee": ""
}, },
{ {
"id": "TASK-4463", "id": "TASK-4463",
"title": "We need to copy the solid state AGP monitor!", "title": "We need to copy the solid state AGP monitor!",
"status": "done", "status": "done",
"label": "documentation", "label": "documentation",
"priority": "low" "priority": "low",
"assignee": ""
}, },
{ {
"id": "TASK-9745", "id": "TASK-9745",
"title": "If we connect the protocol, we can get to the GB system through the bluetooth PCI microchip!", "title": "If we connect the protocol, we can get to the GB system through the bluetooth PCI microchip!",
"status": "canceled", "status": "canceled",
"label": "feature", "label": "feature",
"priority": "high" "priority": "high",
"assignee": ""
}, },
{ {
"id": "TASK-2080", "id": "TASK-2080",
"title": "If we input the bus, we can get to the RAM matrix through the auxiliary RAM card!", "title": "If we input the bus, we can get to the RAM matrix through the auxiliary RAM card!",
"status": "todo", "status": "todo",
"label": "bug", "label": "bug",
"priority": "medium" "priority": "medium",
"assignee": ""
}, },
{ {
"id": "TASK-3838", "id": "TASK-3838",
"title": "I'll bypass the online TCP application, that should panel the AGP system!", "title": "I'll bypass the online TCP application, that should panel the AGP system!",
"status": "backlog", "status": "backlog",
"label": "bug", "label": "bug",
"priority": "high" "priority": "high",
"assignee": ""
}, },
{ {
"id": "TASK-1340", "id": "TASK-1340",
"title": "We need to navigate the virtual PNG circuit!", "title": "We need to navigate the virtual PNG circuit!",
"status": "todo", "status": "todo",
"label": "bug", "label": "bug",
"priority": "medium" "priority": "medium",
"assignee": ""
}, },
{ {
"id": "TASK-6665", "id": "TASK-6665",
"title": "If we parse the monitor, we can get to the SSD hard drive through the cross-platform AGP alarm!", "title": "If we parse the monitor, we can get to the SSD hard drive through the cross-platform AGP alarm!",
"status": "canceled", "status": "canceled",
"label": "feature", "label": "feature",
"priority": "low" "priority": "low",
"assignee": ""
}, },
{ {
"id": "TASK-7585", "id": "TASK-7585",
"title": "If we calculate the hard drive, we can get to the SSL program through the multi-byte CSS microchip!", "title": "If we calculate the hard drive, we can get to the SSL program through the multi-byte CSS microchip!",
"status": "backlog", "status": "backlog",
"label": "feature", "label": "feature",
"priority": "low" "priority": "low",
"assignee": ""
}, },
{ {
"id": "TASK-6319", "id": "TASK-6319",
"title": "We need to copy the multi-byte SCSI program!", "title": "We need to copy the multi-byte SCSI program!",
"status": "backlog", "status": "backlog",
"label": "bug", "label": "bug",
"priority": "high" "priority": "high",
"assignee": ""
}, },
{ {
"id": "TASK-4369", "id": "TASK-4369",
"title": "Try to input the SCSI bus, maybe it will generate the 1080p pixel!", "title": "Try to input the SCSI bus, maybe it will generate the 1080p pixel!",
"status": "backlog", "status": "backlog",
"label": "bug", "label": "bug",
"priority": "high" "priority": "high",
"assignee": ""
}, },
{ {
"id": "TASK-9035", "id": "TASK-9035",
"title": "We need to override the solid state PNG array!", "title": "We need to override the solid state PNG array!",
"status": "canceled", "status": "canceled",
"label": "documentation", "label": "documentation",
"priority": "low" "priority": "low",
"assignee": ""
}, },
{ {
"id": "TASK-3970", "id": "TASK-3970",
"title": "You can't index the transmitter without quantifying the haptic ASCII card!", "title": "You can't index the transmitter without quantifying the haptic ASCII card!",
"status": "todo", "status": "todo",
"label": "documentation", "label": "documentation",
"priority": "medium" "priority": "medium",
"assignee": ""
}, },
{ {
"id": "TASK-4473", "id": "TASK-4473",
"title": "You can't bypass the protocol without overriding the neural RSS program!", "title": "You can't bypass the protocol without overriding the neural RSS program!",
"status": "todo", "status": "todo",
"label": "documentation", "label": "documentation",
"priority": "low" "priority": "low",
"assignee": ""
}, },
{ {
"id": "TASK-4136", "id": "TASK-4136",
"title": "You can't hack the hard drive without hacking the primary JSON program!", "title": "You can't hack the hard drive without hacking the primary JSON program!",
"status": "canceled", "status": "canceled",
"label": "bug", "label": "bug",
"priority": "medium" "priority": "medium",
"assignee": ""
}, },
{ {
"id": "TASK-3939", "id": "TASK-3939",
"title": "Use the back-end SQL firewall, then you can connect the neural hard drive!", "title": "Use the back-end SQL firewall, then you can connect the neural hard drive!",
"status": "done", "status": "done",
"label": "feature", "label": "feature",
"priority": "low" "priority": "low",
"assignee": ""
}, },
{ {
"id": "TASK-2007", "id": "TASK-2007",
"title": "I'll input the back-end USB protocol, that should bandwidth the PCI system!", "title": "I'll input the back-end USB protocol, that should bandwidth the PCI system!",
"status": "backlog", "status": "backlog",
"label": "bug", "label": "bug",
"priority": "high" "priority": "high",
"assignee": ""
}, },
{ {
"id": "TASK-7516", "id": "TASK-7516",
"title": "Use the primary SQL program, then you can generate the auxiliary transmitter!", "title": "Use the primary SQL program, then you can generate the auxiliary transmitter!",
"status": "done", "status": "done",
"label": "documentation", "label": "documentation",
"priority": "medium" "priority": "medium",
"assignee": ""
}, },
{ {
"id": "TASK-6906", "id": "TASK-6906",
"title": "Try to back up the DRAM system, maybe it will reboot the online transmitter!", "title": "Try to back up the DRAM system, maybe it will reboot the online transmitter!",
"status": "done", "status": "done",
"label": "feature", "label": "feature",
"priority": "high" "priority": "high",
"assignee": ""
}, },
{ {
"id": "TASK-5207", "id": "TASK-5207",
"title": "The SMS interface is down, copy the bluetooth bus so we can quantify the VGA card!", "title": "The SMS interface is down, copy the bluetooth bus so we can quantify the VGA card!",
"status": "in progress", "status": "in progress",
"label": "bug", "label": "bug",
"priority": "low" "priority": "low",
"assignee": ""
} }
] ]

View file

@ -0,0 +1,13 @@
<script lang="ts">
import DataTable from "./(components)/data-table.svelte";
import ticketData from "./(data)/tickets.json";
</script>
<div class="hidden h-full flex-1 flex-col space-y-8 p-8 md:flex">
<div class="flex items-center justify-between space-y-2">
<div>
<h2 class="text-2xl font-bold tracking-tight">Dashboard</h2>
</div>
</div>
<DataTable data={ticketData} />
</div>

View file

@ -9,6 +9,22 @@
export let form; export let form;
let isLoading = false; let isLoading = false;
// TODO: Implement Microsoft OAuth2 login
// import { PUBLIC_CLIENT_PB } from '$env/static/public';
// import PocketBase from 'pocketbase';
// const pb = new PocketBase(PUBLIC_CLIENT_PB);
// async function msLogin() {
// try {
// await pb.collection('users').authWithOAuth2({ provider: 'microsoft' });
// const input = document.createElement('input');
// input.type = 'hidden';
// input.name = 'token';
// input.value = pb.authStore.token;
// } catch (err) {
// console.error(err);
// }
// }
</script> </script>
<div class="lg:p-8"> <div class="lg:p-8">

View file

@ -1,45 +0,0 @@
<script lang="ts">
import * as Avatar from "$lib/components/ui/avatar";
import { Button } from "$lib/components/ui/button";
import * as DropdownMenu from "$lib/components/ui/dropdown-menu";
</script>
<DropdownMenu.Root>
<DropdownMenu.Trigger asChild let:builder>
<Button variant="ghost" builders={[builder]} class="relative h-8 w-8 rounded-full">
<Avatar.Root class="h-9 w-9">
<Avatar.Image src="/avatars/03.png" alt="@shadcn" />
<Avatar.Fallback>SC</Avatar.Fallback>
</Avatar.Root>
</Button>
</DropdownMenu.Trigger>
<DropdownMenu.Content class="w-56" align="end">
<DropdownMenu.Label class="font-normal">
<div class="flex flex-col space-y-1">
<p class="text-sm font-medium leading-none">shadcn</p>
<p class="text-xs leading-none text-muted-foreground">m@example.com</p>
</div>
</DropdownMenu.Label>
<DropdownMenu.Separator />
<DropdownMenu.Group>
<DropdownMenu.Item>
Profile
<DropdownMenu.Shortcut>⇧⌘P</DropdownMenu.Shortcut>
</DropdownMenu.Item>
<DropdownMenu.Item>
Billing
<DropdownMenu.Shortcut>⌘B</DropdownMenu.Shortcut>
</DropdownMenu.Item>
<DropdownMenu.Item>
Settings
<DropdownMenu.Shortcut>⌘S</DropdownMenu.Shortcut>
</DropdownMenu.Item>
<DropdownMenu.Item>New Team</DropdownMenu.Item>
</DropdownMenu.Group>
<DropdownMenu.Separator />
<DropdownMenu.Item>
Log out
<DropdownMenu.Shortcut>⇧⌘Q</DropdownMenu.Shortcut>
</DropdownMenu.Item>
</DropdownMenu.Content>
</DropdownMenu.Root>

View file

@ -1,13 +0,0 @@
import { z } from "zod";
// We're keeping a simple non-relational schema here.
// IRL, you will have a schema for your data models.
export const taskSchema = z.object({
id: z.string(),
title: z.string(),
status: z.string(),
label: z.string(),
priority: z.string()
});
export type Task = z.infer<typeof taskSchema>;

View file

@ -1,18 +0,0 @@
<script lang="ts">
import DataTable from "./(components)/data-table.svelte";
import UserNav from "./(components)/user-nav.svelte";
import data from "./(data)/tasks.json";
</script>
<div class="hidden h-full flex-1 flex-col space-y-8 p-8 md:flex">
<div class="flex items-center justify-between space-y-2">
<div>
<h2 class="text-2xl font-bold tracking-tight">Welcome back!</h2>
<p class="text-muted-foreground">Here's a list of your tasks for this month!</p>
</div>
<div class="flex items-center space-x-2">
<UserNav />
</div>
</div>
<DataTable {data} />
</div>

View file

@ -1,7 +1,29 @@
import type { LayoutServerLoad } from './$types'; import type { LayoutServerLoad } from './$types';
export const load: LayoutServerLoad = (async ({ locals }: { locals: App.Locals }) => { // export function load({locals}){
return { // console.log('base token',locals.userPb.authStore.token);
authenticated: locals.pocketBase.authStore.isValid // console.log('valid',locals.userPb.authStore.isValid);
}; // if(!locals.userPb.authStore.token) throw redirect(303,'/login');
});
// const user = {
// firstname: locals.userPb.authStore.baseModel.firstname
// }
// return{
// user
// }
// }
export const load: LayoutServerLoad = async ({ locals }: { locals: App.Locals }) => {
if (!locals.pocketBase.authStore.token) {
return {
authenticated: locals.pocketBase.authStore.isValid,
user: locals.pocketBase.authStore.model?.baseModel
};
} else {
return {
authenticated: locals.pocketBase.authStore.isValid,
user: {}
};
}
};

View file

@ -4,9 +4,9 @@
import { ModeWatcher } from 'mode-watcher'; import { ModeWatcher } from 'mode-watcher';
import '../app.pcss'; import '../app.pcss';
import { fade } from 'svelte/transition'; import { fade } from 'svelte/transition';
import type { PageData } from './$types'; import type { LayoutData } from './$types';
export let data: PageData; export let data: LayoutData;
</script> </script>
<ModeWatcher /> <ModeWatcher />
@ -14,7 +14,7 @@
<Metadata /> <Metadata />
<div class="relative flex min-h-screen flex-col" id="page"> <div class="relative flex min-h-screen flex-col" id="page">
<SiteNavBar authenticated={data.authenticated} /> <SiteNavBar authenticated={data.authenticated} user={data.user} />
<main class="container relative mb-4 mt-12 flex-1"> <main class="container relative mb-4 mt-12 flex-1">
<div in:fade={{ duration: 200, delay: 100 }} out:fade={{ duration: 100 }}> <div in:fade={{ duration: 200, delay: 100 }} out:fade={{ duration: 100 }}>
<slot /> <slot />