From b55792ee90dc9c7ce2ea703f7d870fc681602342 Mon Sep 17 00:00:00 2001
From: Padreug
Date: Sat, 2 May 2026 17:24:13 +0200
Subject: [PATCH] feat(profile): add Log out button + confirmation dialog
The Profile sheet (mounted as the Profile dock slot in Hub.vue and
elsewhere) had no way to log out. Added a LogoutConfirmDialog at
the bottom of ProfileSettings.vue, separated from the form by a
horizontal divider. Confirming the dialog:
1. calls auth.logout() (clears the LNbits token + Nostr session)
2. toasts "Logged out"
3. routes to /login on the current app's origin
Reuses the existing LogoutConfirmDialog component
(src/components/ui/LogoutConfirmDialog/) so the styling and
behaviour match wherever a logout affordance already exists in the
codebase.
Co-Authored-By: Claude Opus 4.7 (1M context)
---
.../base/components/ProfileSettings.vue | 57 ++++++++++++++++++-
1 file changed, 56 insertions(+), 1 deletion(-)
diff --git a/src/modules/base/components/ProfileSettings.vue b/src/modules/base/components/ProfileSettings.vue
index d1dab22..fed1828 100644
--- a/src/modules/base/components/ProfileSettings.vue
+++ b/src/modules/base/components/ProfileSettings.vue
@@ -147,6 +147,34 @@
Use the "Broadcast to Nostr" button to manually re-broadcast your profile.
+
+
+
+
+
+
+
+
+
+
+ Log out of {{ user?.username || 'your account' }}?
+
+ You'll need to sign in again to access your wallet, post in the
+ forum, place orders, or use any feature that needs your account.
+
+
+
+ Cancel
+
+ Log out
+
+
+
+
+