Migrate shared UI and backend components
Lint / Lint (push) Failing after 7s
Tests / Go backend (push) Failing after 6s
Tests / Dashboard checks (push) Failing after 4s
Docker / Docker Build & Push (push) Failing after 10s

This commit is contained in:
Gabriel20xx committed 2026-08-04 17:05:37 +02:00
1 parent 64d22d0aac
commit ac08be0248
16 files changed
+236 -395

No files matched your search

@@ -1,12 +1,27 @@
<script>
import { page } from '$app/state';
import { AppShell as SharedAppShell, ProfileDialog } from '@gabriel20xx/shared-code/web-ui';
import { Tooltip } from 'bits-ui';
import Header from '$lib/components/Header.svelte';
import AuthPage from '$lib/features/auth/AuthPage.svelte';
import { createAuthStore } from '$lib/features/auth/auth.svelte.js';
import SettingsDialog from './SettingsDialog.svelte';
let { children } = $props();
const auth = createAuthStore();
const navItems = [
{ href: '/', label: 'Overview' },
{ href: '/about', label: 'About' },
];
let settingsOpen = $state(false);
let credentialsOpen = $state(false);
async function saveProfile(input) {
await auth.updateCredentials({
newUsername: input.username.trim() || undefined,
newEmail: input.email.trim() || undefined,
newPassword: input.password || undefined,
});
}
</script>
<Tooltip.Provider delayDuration={300}>
@@ -19,11 +34,27 @@
{:else if !auth.status || auth.status.setupRequired || !auth.status.authenticated}
<AuthPage setupRequired={auth.status?.setupRequired ?? true} />
{:else}
<div class="flex min-h-screen flex-col">
<Header />
<main class="flex min-w-0 flex-1 flex-col">
<SharedAppShell
brand="CollabTable"
currentPath={page.url.pathname}
{navItems}
theme="system"
username={auth.status.username ?? ''}
onLogout={() => auth.logout()}
onProfile={() => (credentialsOpen = true)}
onSettings={() => (settingsOpen = true)}
>
{#snippet children()}
{@render children?.()}
</main>
</div>
{/snippet}
</SharedAppShell>
{/if}
</Tooltip.Provider>
<SettingsDialog bind:open={settingsOpen} />
<ProfileDialog
bind:open={credentialsOpen}
currentUsername={auth.status?.username ?? ''}
currentEmail={auth.status?.email ?? ''}
onSave={saveProfile}
/>