fix: remove AdminDialog and admin option from header profile dropdown
Docker / Docker Build & Push (push) Successful in 2m13s
Lint / Lint (push) Successful in 51s
Tests / Go backend (push) Successful in 44s
Tests / Dashboard checks (push) Successful in 43s

Shared web-ui package already dropped this in a prior sync; this app's
layout was still wiring up the removed onAdmin prop and AdminDialog.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Gabriel20xxandClaude Sonnet 5 committed 2026-09-05 12:08:12 +02:00
1 parent bbf5d8bb05
commit 80cf207d37
1 file changed
+1 -13
@@ -1,6 +1,6 @@
<script>
import { page } from '$app/state';
import { AdminDialog, AppShell as SharedAppShell, ProfileDialog } from '@gabriel20xx/web-ui';
import { AppShell as SharedAppShell, ProfileDialog } from '@gabriel20xx/web-ui';
import { Tooltip } from 'bits-ui';
import AuthPage from '$lib/features/auth/AuthPage.svelte';
import { createAuthStore } from '$lib/features/auth/auth.svelte.js';
@@ -18,8 +18,6 @@
];
let settingsOpen = $state(false);
let credentialsOpen = $state(false);
let adminOpen = $state(false);
const isAdmin = $derived(auth.status?.role === 'admin' || auth.status?.role === 'superadmin');
async function saveProfile(input) {
await auth.updateCredentials({
@@ -50,7 +48,6 @@
username={auth.status.username ?? ''}
onLogout={() => auth.logout()}
onProfile={() => (credentialsOpen = true)}
onAdmin={isAdmin ? () => (adminOpen = true) : undefined}
onSettings={() => (settingsOpen = true)}
>
{@render children?.()}
@@ -59,15 +56,6 @@
</Tooltip.Provider>
<SettingsDialog bind:open={settingsOpen} />
<AdminDialog
bind:open={adminOpen}
currentRole={auth.status?.role ?? 'user'}
currentUserId={auth.status?.id}
onCreateUser={(input) => auth.createUser(input)}
onDeleteUser={(id) => auth.deleteUser(id)}
onListUsers={() => auth.listUsers()}
onUpdateUser={(id, input) => auth.updateUser(id, input)}
/>
<ProfileDialog
bind:open={credentialsOpen}
currentUsername={auth.status?.username ?? ''}