feat(frontend): show @handle and link to profile in federation actor lists

This commit is contained in:
2026-05-15 04:28:36 +02:00
parent d98c338e52
commit d88eb5d127
3 changed files with 24 additions and 12 deletions

View File

@@ -11,6 +11,7 @@ import { useAuth } from "@/hooks/use-auth";
import { UserAvatar } from "@/components/user-avatar";
import { Button } from "@/components/ui/button";
import { toast } from "sonner";
import Link from "next/link";
interface Props {
compact?: boolean;
@@ -56,7 +57,10 @@ export function PendingRequests({ compact = false }: Props) {
key={actor.url}
className="flex items-center justify-between gap-3"
>
<div className="flex items-center gap-2 min-w-0">
<Link
href={`/users/@${actor.handle}`}
className="flex items-center gap-2 min-w-0 hover:opacity-80"
>
<UserAvatar
src={actor.avatarUrl}
alt={actor.displayName}
@@ -66,11 +70,11 @@ export function PendingRequests({ compact = false }: Props) {
<p className="text-sm font-medium truncate">
{actor.displayName || actor.handle}
</p>
<p className="text-xs text-muted-foreground truncate">
{actor.handle}
<p className="text-xs text-muted-foreground truncate font-mono">
@{actor.handle}
</p>
</div>
</div>
</Link>
<div className="flex gap-2 shrink-0">
<Button size="sm" onClick={() => accept(actor.url)}>
Accept