Add profile message action
This commit is contained in:
@@ -4,6 +4,7 @@ import { Link } from 'react-router-dom';
|
||||
import {
|
||||
Globe,
|
||||
HandHeart,
|
||||
MessageSquare,
|
||||
Megaphone,
|
||||
MoreHorizontal,
|
||||
QrCode,
|
||||
@@ -341,6 +342,7 @@ export function ProfileIdentityHeader({
|
||||
avatar row instead. */}
|
||||
{!hideActionBar && (
|
||||
<ActionBar
|
||||
pubkey={pubkey}
|
||||
isOwnProfile={isOwnProfile}
|
||||
isFollowing={isFollowing}
|
||||
followPending={followPending}
|
||||
@@ -505,6 +507,7 @@ export function ProfileAvatarBlock({
|
||||
// ─── Action bar ──────────────────────────────────────────────────────────────
|
||||
|
||||
export function ActionBar({
|
||||
pubkey,
|
||||
isOwnProfile,
|
||||
isFollowing,
|
||||
followPending,
|
||||
@@ -516,6 +519,7 @@ export function ActionBar({
|
||||
onDonate,
|
||||
align = 'start',
|
||||
}: {
|
||||
pubkey: string;
|
||||
isOwnProfile: boolean;
|
||||
isFollowing: boolean;
|
||||
followPending: boolean;
|
||||
@@ -545,7 +549,7 @@ export function ActionBar({
|
||||
</Button>
|
||||
</Link>
|
||||
<Button
|
||||
variant="outline"
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
className="rounded-full size-10"
|
||||
title={t('profile.header.shareFollowLink')}
|
||||
@@ -553,6 +557,17 @@ export function ActionBar({
|
||||
>
|
||||
<QrCode className="size-5" />
|
||||
</Button>
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
className="rounded-full size-10"
|
||||
title={t('nav.messages')}
|
||||
asChild
|
||||
>
|
||||
<Link to={`/messages?to=${pubkey}`}>
|
||||
<MessageSquare className="size-5" />
|
||||
</Link>
|
||||
</Button>
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
@@ -606,6 +621,17 @@ export function ActionBar({
|
||||
</DropdownMenuContent>
|
||||
</DropdownMenu>
|
||||
) : null}
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
className="rounded-full size-10"
|
||||
title={t('nav.messages')}
|
||||
asChild
|
||||
>
|
||||
<Link to={`/messages?to=${pubkey}`}>
|
||||
<MessageSquare className="size-5" />
|
||||
</Link>
|
||||
</Button>
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
|
||||
@@ -1383,6 +1383,7 @@ function FollowersListModal({ pubkey, open, onOpenChange, displayName }: Followe
|
||||
onLightbox={(url) => setLightboxImage(url)}
|
||||
/>
|
||||
<ActionBar
|
||||
pubkey={pubkey}
|
||||
align="end"
|
||||
isOwnProfile={isOwnProfile}
|
||||
isFollowing={isFollowing}
|
||||
|
||||
Reference in New Issue
Block a user