2024-08-12 11:00:25 +02:00
|
|
|
<script lang="ts">
|
|
|
|
|
import { page } from '$app/stores';
|
2024-09-09 10:29:41 +02:00
|
|
|
import appConfigStore from '$lib/stores/application-configuration-store';
|
2024-08-12 11:00:25 +02:00
|
|
|
import userStore from '$lib/stores/user-store';
|
|
|
|
|
import Logo from '../logo.svelte';
|
|
|
|
|
import HeaderAvatar from './header-avatar.svelte';
|
|
|
|
|
|
|
|
|
|
let isAuthPage = $derived(
|
2024-09-06 08:57:48 +02:00
|
|
|
!$page.error &&
|
|
|
|
|
($page.url.pathname.startsWith('/authorize') || $page.url.pathname.startsWith('/login'))
|
2024-08-12 11:00:25 +02:00
|
|
|
);
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<div class=" w-full {isAuthPage ? 'absolute top-0 z-10 mt-4' : 'border-b'}">
|
2024-10-02 10:02:28 +02:00
|
|
|
<div
|
|
|
|
|
class="{!isAuthPage
|
|
|
|
|
? 'max-w-[1640px]'
|
|
|
|
|
: ''} mx-auto flex w-full items-center justify-between px-4 md:px-10"
|
|
|
|
|
>
|
2024-08-12 11:00:25 +02:00
|
|
|
<div class="flex h-16 items-center">
|
|
|
|
|
{#if !isAuthPage}
|
2025-01-03 16:15:10 +01:00
|
|
|
<Logo class="mr-3 h-8 w-8" />
|
2024-08-12 11:00:25 +02:00
|
|
|
<h1 class="text-lg font-medium" data-testid="application-name">
|
2024-09-09 10:29:41 +02:00
|
|
|
{$appConfigStore.appName}
|
2024-08-12 11:00:25 +02:00
|
|
|
</h1>
|
|
|
|
|
{/if}
|
|
|
|
|
</div>
|
|
|
|
|
{#if $userStore?.id}
|
|
|
|
|
<HeaderAvatar />
|
|
|
|
|
{/if}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|