Add registration page, fix auth paths, and improve navigation
This commit is contained in:
@@ -97,8 +97,11 @@
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { AlertCircle, Check, Loader2, Lock } from 'lucide-vue-next'
|
||||
|
||||
const router = useRouter()
|
||||
|
||||
const formData = ref({
|
||||
email: '',
|
||||
password: ''
|
||||
@@ -128,9 +131,9 @@ const handleLogin = async () => {
|
||||
// Redirect based on role
|
||||
setTimeout(() => {
|
||||
if (response.user.role === 'admin' || response.user.role === 'vorstand') {
|
||||
navigateTo('/cms')
|
||||
router.push('/cms')
|
||||
} else {
|
||||
navigateTo('/mitgliederbereich')
|
||||
router.push('/mitgliederbereich')
|
||||
}
|
||||
}, 1000)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user