Files
2026-10-01 19:39:20 +02:00

12 lines
381 B
Vue

<script setup lang="ts">
// Shows its content only after the shared password has been entered
defineProps<{ title: string }>()
const { data: session, refresh } = await useFetch<{ unlocked: boolean }>('/api/auth/session', { key: 'auth-session' })
</script>
<template>
<slot v-if="session?.unlocked" />
<PasswordModal v-else :title="title" @unlocked="refresh()" />
</template>