Initial commit

This commit is contained in:
Mindboost
2025-07-01 10:53:26 +00:00
commit 38050e5c69
416 changed files with 48708 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
<template>
<div class="text-center mt-10">
<h1 class="text-2xl font-bold">E-Mail wird verifiziert...</h1>
<p>Bitte einen Moment Geduld.</p>
</div>
</template>
<script setup>
import { useI18n } from 'vue-i18n'
import { useRoute, useRouter } from 'vue-router'
const route = useRoute()
const router = useRouter()
const localePath = useLocalePath()
const config = useRuntimeConfig()
const apiBase = config.public.apiUrl
onMounted(async () => {
try {
const token = route.params.token
await axios.get(`${apiBase}/api/verify-email/${token}`)
// Weiterleitung mit Query-Param (z.B. für Erfolgsmeldung im Login)
router.push({
path: localePath('/auth/login'),
query: { verified: '1' }
})
} catch (error) {
if (error.response && (error.response.status === 400 || error.response.status === 404)) {
// Token ungültig oder abgelaufen Weiterleitung zur Registrierung
router.push({
path: localePath('/auth/signup'),
query: { error: 'invalid_or_expired_token' }
})
} else {
router.push({
path: localePath('/auth/login'),
query: { error: 'verification_failed' }
})
}
}
})
</script>