feat: Implement dedicated login page and authentication middleware

This commit is contained in:
Ryderjj89
2025-10-01 19:55:49 -04:00
parent 4aa7198406
commit ce867de7bc
5 changed files with 115 additions and 131 deletions

View File

@@ -23,7 +23,7 @@
<div class="flex items-center space-x-4">
<UButton
v-if="!isLoggedIn"
@click="showLoginModal = true"
@click="navigateTo('/login')"
variant="outline"
color="primary"
>
@@ -78,12 +78,6 @@
</div>
</main>
<!-- Login Modal - Only show when triggered -->
<LoginModal
v-if="showLoginModal"
v-model="showLoginModal"
@success="handleLoginSuccess"
/>
</div>
</template>
@@ -93,7 +87,6 @@ import { format, parseISO, isAfter, subMonths } from 'date-fns'
const timeFilter = ref('3months')
const sermons = ref([])
const loading = ref(true)
const showLoginModal = ref(false)
const isLoggedIn = ref(false)
const timeOptions = [
@@ -134,9 +127,4 @@ onMounted(async () => {
await loadSermons()
})
const handleLoginSuccess = () => {
showLoginModal.value = false
isLoggedIn.value = true
}
</script>