From eb238ca380652bc9af51ca274e23659d72c2b5fa Mon Sep 17 00:00:00 2001 From: padreug Date: Thu, 31 Jul 2025 22:04:19 +0200 Subject: [PATCH] feat: Add ProfileDialog component for user profile management - Introduce ProfileDialog.vue to display user information and account settings. - Integrate ProfileDialog into Navbar.vue for easy access to user profile. - Implement logout functionality within the ProfileDialog, enhancing user experience. --- src/components/auth/ProfileDialog.vue | 123 ++++++++++++++++++++++++++ src/components/layout/Navbar.vue | 14 ++- 2 files changed, 135 insertions(+), 2 deletions(-) create mode 100644 src/components/auth/ProfileDialog.vue diff --git a/src/components/auth/ProfileDialog.vue b/src/components/auth/ProfileDialog.vue new file mode 100644 index 0000000..fbb5d51 --- /dev/null +++ b/src/components/auth/ProfileDialog.vue @@ -0,0 +1,123 @@ + + + \ No newline at end of file diff --git a/src/components/layout/Navbar.vue b/src/components/layout/Navbar.vue index 291921a..81b4e34 100644 --- a/src/components/layout/Navbar.vue +++ b/src/components/layout/Navbar.vue @@ -9,6 +9,7 @@ import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSepara import { Sun, Moon, Menu, X, User, LogOut } from 'lucide-vue-next' import LanguageSwitcher from '@/components/LanguageSwitcher.vue' import LoginDialog from '@/components/auth/LoginDialog.vue' +import ProfileDialog from '@/components/auth/ProfileDialog.vue' import { auth } from '@/composables/useAuth' interface NavigationItem { @@ -21,6 +22,7 @@ const { t } = useI18n() const { theme, setTheme } = useTheme() const isOpen = ref(false) const showLoginDialog = ref(false) +const showProfileDialog = ref(false) const navigation = computed(() => [ { name: t('nav.home'), href: '/' }, @@ -41,6 +43,11 @@ const openLoginDialog = () => { isOpen.value = false // Close mobile menu } +const openProfileDialog = () => { + showProfileDialog.value = true + isOpen.value = false // Close mobile menu +} + const handleLogout = async () => { try { auth.logout() @@ -87,7 +94,7 @@ const handleLogout = async () => { - + Profile @@ -146,7 +153,7 @@ const handleLogout = async () => { Logged In
- @@ -181,5 +188,8 @@ const handleLogout = async () => { + + +