+
-
@@ -91,26 +87,6 @@
-
-
-
Nostr Identity
-
-
-
- Lightning Address:
- {{ lightningAddress }}
-
-
-
- NIP-05:
- {{ nip05Preview }}
-
-
-
- These identifiers are automatically derived from your username
-
-
-
{{ updateError }}
@@ -135,34 +111,6 @@
Your profile is broadcast to Nostr automatically when you save changes.
-
-
-
-
-
-
-
-
- Log out
-
-
-
-
- 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
-
-
-
-
-
@@ -173,8 +121,7 @@ import { toTypedSchema } from '@vee-validate/zod'
import * as z from 'zod'
import { Button } from '@/components/ui/button'
import { Input } from '@/components/ui/input'
-import { Separator } from '@/components/ui/separator'
-import { User, Zap, Hash } from 'lucide-vue-next'
+import { User } from 'lucide-vue-next'
import {
FormControl,
FormDescription,
@@ -184,27 +131,13 @@ import {
FormMessage,
} from '@/components/ui/form'
import ImageUpload from './ImageUpload.vue'
-import {
- AlertDialog,
- AlertDialogAction,
- AlertDialogCancel,
- AlertDialogContent,
- AlertDialogDescription,
- AlertDialogFooter,
- AlertDialogHeader,
- AlertDialogTitle,
- AlertDialogTrigger,
-} from '@/components/ui/alert-dialog'
-import { LogOut } from 'lucide-vue-next'
import { useAuth } from '@/composables/useAuthService'
-import { useRouter } from 'vue-router'
import { injectService, SERVICE_TOKENS } from '@/core/di-container'
import type { ImageUploadService } from '../services/ImageUploadService'
import { useToast } from '@/core/composables/useToast'
// Services
-const { user, updateProfile, logout } = useAuth()
-const router = useRouter()
+const { user, updateProfile } = useAuth()
const imageService = injectService
(SERVICE_TOKENS.IMAGE_UPLOAD_SERVICE)
const toast = useToast()
@@ -224,14 +157,14 @@ const lightningDomain = computed(() =>
import.meta.env.VITE_LIGHTNING_DOMAIN || window.location.hostname
)
-// Computed previews
+// Live preview of the user's NIP-05 / Lightning address — shown in the
+// username field's helper text so the consequence of a future rename is
+// visible inline.
const nip05Preview = computed(() => {
const username = form.values.username || currentUsername.value || 'username'
return `${username}@${lightningDomain.value}`
})
-const lightningAddress = computed(() => nip05Preview.value)
-
// Form schema
const profileFormSchema = toTypedSchema(z.object({
username: z.string()
@@ -327,17 +260,4 @@ const updateUserProfile = async (formData: any) => {
isUpdating.value = false
}
}
-
-// Log out + redirect to /login on this app's origin.
-const onLogout = async () => {
- try {
- await logout()
- toast.success('Logged out')
- router.push('/login')
- } catch (error) {
- const errorMessage = error instanceof Error ? error.message : 'Failed to log out'
- console.error('Error logging out:', error)
- toast.error(`Logout failed: ${errorMessage}`)
- }
-}