From ee9e04d3e0c095823a949ce87e8d41f39f911ae1 Mon Sep 17 00:00:00 2001 From: "shakespeare.diy" Date: Thu, 30 Jul 2026 21:16:15 +0700 Subject: [PATCH] Profile access, real gig messaging, desktop Local Chat removal + audit fixes #0 Crew band gig booking: - Rename "Book them for a gig" -> "Set up a gig" (honest: it creates an event) - Add "Message about a gig" -> pre-filled encrypted DM (NIP-17) to the crew founder via existing /messages/:npub?message= flow (real communication) #1 Profile access (was missing/mislabeled everywhere): - Desktop header: add "View my profile" icon linking to /npub - Mobile user menu: split mislabeled "My Profile"(->Settings) into "View Profile" (-> /npub) + "Settings" - Burger menu: add "View Profile" entry - Settings > Edit Profile: add "View my public profile" quick link #2 Remove standalone Local Chat button on desktop map toolbar (kept on mobile) Audit fixes: - Mobile menu "Wallet & Stash" -> "Wallet" (Stash is already its own item) Co-authored-by: shakespeare.diy --- src/components/Layout.tsx | 37 ++++++++++++++++++++++++++++++++---- src/pages/CrewDetailPage.tsx | 17 ++++++++++++++--- src/pages/MapPage.tsx | 7 ++++--- src/pages/SettingsPage.tsx | 12 ++++++++++++ 4 files changed, 63 insertions(+), 10 deletions(-) diff --git a/src/components/Layout.tsx b/src/components/Layout.tsx index ca05aca..d5fcb66 100644 --- a/src/components/Layout.tsx +++ b/src/components/Layout.tsx @@ -1,5 +1,6 @@ import { useState, useRef } from 'react'; import { Link, useLocation } from 'react-router-dom'; +import { nip19 } from 'nostr-tools'; import { cn } from '@/lib/utils'; import { CustomizeNavSheet } from '@/components/CustomizeNavSheet'; import { useNavPreferences, useDesktopNavPreferences, type NavTab } from '@/hooks/useNavPreferences'; @@ -193,9 +194,15 @@ function MobileHeaderUserMenu({ - + - My Profile + View Profile + + + + + + Settings @@ -213,7 +220,7 @@ function MobileHeaderUserMenu({ - Wallet & Stash + Wallet @@ -569,8 +576,21 @@ export function Layout({ children, noPadding }: LayoutProps) { {/* Language Toggle */} + {/* View own public profile */} + {user && ( + + + + )} - @@ -661,6 +681,15 @@ export function Layout({ children, noPadding }: LayoutProps) { onClick={() => setMobileMenuOpen(false)} /> ))} + {user && ( + setMobileMenuOpen(false)} + /> + )} {user && ( (); const { data: crew, isLoading, error } = useCrew(identifier || '', pubkey); const author = useAuthor(crew?.pubkey); + const { user } = useCurrentUser(); const { isFounder, isAdmin, role, canManage } = useCrewRole(crew); const { toast } = useToast(); const [agentOpen, setAgentOpen] = useState(false); @@ -560,11 +562,20 @@ export default function CrewDetailPage() { to={`/create-event?crew=${crew.pubkey}:${crew.identifier}&type=concert&title=${encodeURIComponent(`${crew.bandName} live`)}`} className="flex items-center justify-center gap-2 rounded-lg bg-purple-500 px-3 py-2 text-sm font-black uppercase text-white transition-colors hover:bg-purple-600" > - Book them for a gig + Set up a gig + {user && user.pubkey !== crew.pubkey && ( + + Message about a gig + + )}

- Sets up a music event hosted by this crew on the Events calendar — - sort the date & venue and it's booked. + Set up a gig adds a music event to the + calendar hosted by this crew. Message opens + an encrypted DM to the crew to sort dates & details.

diff --git a/src/pages/MapPage.tsx b/src/pages/MapPage.tsx index d29c4f4..f0cfb36 100644 --- a/src/pages/MapPage.tsx +++ b/src/pages/MapPage.tsx @@ -1437,16 +1437,17 @@ export default function MapPage() { {/* Spacer */}
- {/* Local Chat - live geohash channel for wherever the map is centered */} + {/* Local Chat - live geohash channel for wherever the map is centered. + Mobile only: on desktop the toolbar is dense and DMs/crew chat cover + messaging, so we hide the standalone Local Chat trigger at md+. */} void }) {
) : (
+ {/* Quick link to the user's own public profile page */} + + + + View my public profile + + + {!metadata?.name && (