feat: add notes app
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user