This commit is contained in:
Christian Beutel
2024-06-15 18:13:46 +02:00
parent 48c192376c
commit 369e63972c
27 changed files with 1321 additions and 41 deletions

View File

@@ -7,11 +7,14 @@
import { currentUser } from "$lib/stores/user_store";
import { isRouteProtected } from "$lib/util/authorization_util";
import "@fortawesome/fontawesome-free/css/all.min.css";
import { fade, slide } from "svelte/transition";
import { slide } from "svelte/transition";
import "../css/app.css";
import "../css/components.css";
import "../css/theme.css";
import { page } from "$app/stores";
import { onMount } from "svelte";
beforeNavigate((n) => {
if (!$currentUser && isRouteProtected(n.to?.url?.pathname ?? "")) {
n.cancel();
@@ -20,6 +23,7 @@
});
let hideDemoHint = false;
let hideWarning = false;
</script>
{#if env.PUBLIC_IS_DEMO === "true" && !hideDemoHint}
@@ -38,6 +42,19 @@
</div>
{/if}
{#if $page.data.warnings?.length && !hideWarning}
<div
class="flex items-center justify-between bg-red-200 text-center p-4 text-sm"
out:slide
>
<div></div>
<span>{@html $page.data.warnings[0]} </span>
<button class="btn-icon self-end" on:click={() => (hideWarning = true)}
><i class="fa fa-close"></i></button
>
</div>
{/if}
<NavBar></NavBar>
<Toast></Toast>
<slot />