add admin settings
All checks were successful
delpoy / build-and-deploy (push) Successful in 40s

This commit is contained in:
2023-11-30 19:15:00 +01:00
parent 44454f445f
commit 235dfe3094
12 changed files with 176 additions and 9 deletions

View File

@@ -1,7 +1,7 @@
<script lang="ts">
import { page } from '$app/stores';
import { env } from '$env/dynamic/public';
import { ArrowLeftOnRectangle, Flag, UserGroup, Users } from 'svelte-heros-v2';
import { ArrowLeftOnRectangle, Cog6Tooth, Flag, UserGroup, Users } from 'svelte-heros-v2';
import { buttonTriggeredRequest } from '$lib/components/utils';
import { goto } from '$app/navigation';
import type { LayoutData } from './$types';
@@ -44,6 +44,13 @@
name: 'Website Admins',
badge: $adminCount,
enabled: data.adminCount != null
},
{
path: `${env.PUBLIC_BASE_PATH}/admin/settings`,
icon: Cog6Tooth,
name: 'Website Einstellungen',
badge: null,
enabled: data.settingsRead
}
];
</script>
@@ -57,7 +64,9 @@
<a href={tab.path}>
<svelte:component this={tab.icon} />
<span class="mr-1" class:underline={$page.url.pathname === tab.path}>{tab.name}</span>
<div class="badge">{tab.badge}</div>
{#if tab.badge != null}
<div class="badge">{tab.badge}</div>
{/if}
</a>
</li>
{/if}
@@ -74,7 +83,7 @@
</ul>
</div>
</div>
<div class="h-full w-full overflow-y-scroll overflow-x-hidden">
<div class="h-full w-full -mt-12 pt-12 overflow-y-scroll overflow-x-hidden">
<slot />
</div>
{:else}