Unify the two "Profiles": public page + Edit, cross-linked and clearly named
The app had two things both called "Profile": the /settings editor and the public /npub page. They're not duplicates (edit vs. view) but the naming and lack of links between them was confusing. Now: - Public profile (/npub) gets an owner-only "Edit Profile" button that deep- links to /settings?section=profile - Settings row renamed "Profile" -> "Edit Profile" (section title already said Edit Profile); it already has a "View my public profile" link back - Result: one Profile (the public page), one obvious way to edit it, linked both directions — the standard IG/GitHub pattern Bonus fix: mobile menu "My Data" used a broken ?tab=mydata param; corrected to ?section=mydata (the settings page reads ?section=). Co-authored-by: shakespeare.diy <assistant@shakespeare.diy>
This commit is contained in:
parent
433f59415b
commit
1528c7b343
3 changed files with 11 additions and 2 deletions
|
|
@ -206,7 +206,7 @@ function MobileHeaderUserMenu({
|
|||
</Link>
|
||||
</DropdownMenuItem>
|
||||
<DropdownMenuItem asChild>
|
||||
<Link to="/settings?tab=mydata" className="flex items-center gap-2 cursor-pointer">
|
||||
<Link to="/settings?section=mydata" className="flex items-center gap-2 cursor-pointer">
|
||||
<Database className="h-4 w-4 text-[#ccff00]" />
|
||||
<span className="text-[#ccff00]">My Data</span>
|
||||
</Link>
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ import {
|
|||
Users,
|
||||
Crown,
|
||||
Bot,
|
||||
Pencil,
|
||||
} from 'lucide-react';
|
||||
import { useState } from 'react';
|
||||
import { UserStatusIndicator } from '@/components/UserStatusIndicator';
|
||||
|
|
@ -173,6 +174,14 @@ function ProfilePage({ pubkey }: { pubkey: string }) {
|
|||
|
||||
{/* Actions */}
|
||||
<div className="flex items-center gap-2">
|
||||
{isOwnProfile && (
|
||||
<Link to="/settings?section=profile">
|
||||
<Button variant="outline" className="gap-2 border-[#ccff00]/50 text-[#ccff00] hover:bg-[#ccff00]/10">
|
||||
<Pencil className="h-4 w-4" />
|
||||
<span className="hidden sm:inline">Edit Profile</span>
|
||||
</Button>
|
||||
</Link>
|
||||
)}
|
||||
{!isOwnProfile && user && (
|
||||
<Link to={`/messages/${npub}`}>
|
||||
<Button variant="outline" className="gap-2 border-[#ff0040]/50 text-[#ff0040] hover:bg-[#ff0040]/10">
|
||||
|
|
|
|||
|
|
@ -788,7 +788,7 @@ function SettingsMenu({ onNavigate }: { onNavigate: (s: Section) => void }) {
|
|||
<MenuGroup title="Account">
|
||||
<MenuRow
|
||||
icon={User}
|
||||
label="Profile"
|
||||
label="Edit Profile"
|
||||
sublabel={metadata?.name ?? (user ? 'Not loaded' : 'Not logged in')}
|
||||
iconColor="text-[#ccff00]"
|
||||
iconBg="bg-[#ccff00]/15"
|
||||
|
|
|
|||
Loading…
Reference in a new issue