From 9e9137e6b06f321b2811d45173d048f7917eb258 Mon Sep 17 00:00:00 2001 From: padreug Date: Sun, 10 Aug 2025 23:45:12 +0200 Subject: [PATCH] refactor: Simplify Logout Confirmation Handling in Navbar - Remove the showLogoutConfirm state variable from Navbar.vue to streamline the logout confirmation process. - Update the LogoutConfirmDialog component to manage its own visibility state internally, enhancing encapsulation. - Refactor the logout button to directly trigger the confirmation dialog, improving code clarity and user experience. feat: Enhance Logout Confirmation Handling Across Components - Introduce a showLogoutConfirm state variable in ProfileDialog.vue, UserProfile.vue, and Navbar.vue to manage the visibility of the Logout Confirmation dialog. - Refactor logout buttons in these components to trigger the confirmation dialog, improving user experience and preventing accidental logouts. - Update the LogoutConfirmDialog component to accept an isOpen prop for better control of its visibility, ensuring consistent functionality across the application. --- src/components/auth/ProfileDialog.vue | 17 ++++--- src/components/auth/UserProfile.vue | 17 ++++--- src/components/layout/Navbar.vue | 17 +++---- .../LogoutConfirmDialog.vue | 45 +++++++++---------- 4 files changed, 53 insertions(+), 43 deletions(-) diff --git a/src/components/auth/ProfileDialog.vue b/src/components/auth/ProfileDialog.vue index 124dac3..602bb71 100644 --- a/src/components/auth/ProfileDialog.vue +++ b/src/components/auth/ProfileDialog.vue @@ -1,5 +1,5 @@