feat: Add logo and enhance login functionality

- Introduce a new logo asset for branding.
- Update LoginDialog.vue to include routing for successful login and registration.
- Modify Navbar.vue to integrate LoginDialog and manage its visibility.
- Revise Login.vue to update the logo and welcome title, along with routing enhancements post-login and registration.
This commit is contained in:
padreug 2025-07-29 23:49:17 +02:00
parent be4ab13b32
commit 90c2b445bd
4 changed files with 26 additions and 4 deletions

View file

@ -4,9 +4,9 @@
<!-- Welcome Section -->
<div class="text-center space-y-4">
<div class="flex justify-center">
<img src="@/assets/logo-72px.png" alt="Logo" class="h-24 w-24" />
<img src="@/assets/logo.png" alt="Logo" class="h-36 w-36" />
</div>
<h1 class="text-4xl font-bold tracking-tight">Welcome to Ario</h1>
<h1 class="text-4xl font-bold tracking-tight">Welcome to the Virtual Realm</h1>
<p class="text-xl text-muted-foreground max-w-md">
Your secure platform for events and community management
</p>
@ -137,6 +137,7 @@
<script setup lang="ts">
import { ref, computed } from 'vue'
import { useRouter } from 'vue-router'
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'
import { Button } from '@/components/ui/button'
import { Input } from '@/components/ui/input'
@ -144,6 +145,7 @@ import { Label } from '@/components/ui/label'
import { auth } from '@/composables/useAuth'
import { toast } from 'vue-sonner'
const router = useRouter()
const showRegister = ref(false)
const isLoading = ref(false)
const error = ref('')
@ -184,6 +186,8 @@ async function handleLogin() {
})
toast.success('Login successful!')
// Redirect to home page after successful login
router.push('/')
} catch (err) {
error.value = err instanceof Error ? err.message : 'Login failed'
toast.error('Login failed. Please check your credentials.')
@ -207,6 +211,8 @@ async function handleRegister() {
})
toast.success('Registration successful!')
// Redirect to home page after successful registration
router.push('/')
} catch (err) {
error.value = err instanceof Error ? err.message : 'Registration failed'
toast.error('Registration failed. Please try again.')
@ -214,4 +220,4 @@ async function handleRegister() {
isLoading.value = false
}
}
</script>
</script>