[Closes #8] Added authentication
This commit is contained in:
parent
6eefa137bb
commit
6d3cdb560d
65 changed files with 5834 additions and 440 deletions
|
|
@ -1,4 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { useAuthStore } from "~/stores/auth";
|
||||
import DefaultSidebar from "~/layouts/default/Sidebar.vue";
|
||||
|
||||
import { SidebarInset, SidebarProvider, SidebarTrigger } from "~/components/ui/sidebar";
|
||||
|
|
@ -14,12 +15,19 @@ import {
|
|||
|
||||
import { Separator } from "~/components/ui/separator";
|
||||
|
||||
import { useRuntimeConfig } from "#app";
|
||||
|
||||
const currentYear = new Date().getFullYear();
|
||||
|
||||
const config = useRuntimeConfig();
|
||||
|
||||
const authStore = useAuthStore();
|
||||
await authStore.init();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<SidebarProvider>
|
||||
<DefaultSidebar />
|
||||
<DefaultSidebar :user="authStore.user" />
|
||||
<SidebarInset>
|
||||
<header class="flex h-12 shrink-0 items-center gap-2 border-b px-4">
|
||||
<SidebarTrigger class="-ml-1" />
|
||||
|
|
@ -40,8 +48,12 @@ const currentYear = new Date().getFullYear();
|
|||
<slot />
|
||||
</main>
|
||||
<footer class="flex h-12 shrink-0 items-center gap-2 border-b px-4" data-testid="footer">
|
||||
<div v-if="currentYear === 2025" class="bg-muted/50 flex-1 rounded-xl p-2 text-center">Glowing Fiesta 2025</div>
|
||||
<div v-else class="bg-muted/50 flex-1 rounded-xl p-2 text-center">Glowing Fiesta 2025 - {{ currentYear }}</div>
|
||||
<div v-if="currentYear === 2025" class="bg-muted/50 flex-1 rounded-xl p-2 text-center">
|
||||
Glowing Fiesta 2025 <span class="text-muted-foreground">({{ config.public.appVersion }})</span>
|
||||
</div>
|
||||
<div v-else class="bg-muted/50 flex-1 rounded-xl p-2 text-center">
|
||||
Glowing Fiesta 2025 - {{ currentYear }} <span class="text-muted-foreground">({{ config.public.appVersion }})</span>
|
||||
</div>
|
||||
</footer>
|
||||
</SidebarInset>
|
||||
</SidebarProvider>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue