feat: add notes app

This commit is contained in:
2026-10-01 19:39:20 +02:00
parent ccb8dd3d15
commit ddbb6f37b5
35 changed files with 706 additions and 52 deletions
+2 -7
View File
@@ -1,12 +1,9 @@
<script setup lang="ts">
useHead({ title: 'Diary' })
const { data: session, refresh } = await useFetch<{ unlocked: boolean }>('/api/diary/session', { key: 'diary-session' })
const unlocked = computed(() => !!session.value?.unlocked)
</script>
<template>
<template v-if="unlocked">
<PasswordGate title="Diary">
<UMain>
<UContainer class="py-8">
<DiaryTimeline />
@@ -14,7 +11,5 @@ const unlocked = computed(() => !!session.value?.unlocked)
</UMain>
<LogModal />
</template>
<PasswordModal v-else @unlocked="refresh()" />
</PasswordGate>
</template>