feat(web): add avatars to add-member search results
Some checks are pending
CI / test (push) Has started running

This commit is contained in:
2026-03-08 21:39:20 +03:00
parent 9f94084e3f
commit cf967026f4
2 changed files with 14 additions and 3 deletions

View File

@@ -29,7 +29,7 @@ Legend:
20. GIF - `PARTIAL` (web GIF picker with Tenor search + preset fallback + favorites)
21. Message History/Search - `DONE` (history/pagination/chat+global search)
22. Text Formatting - `PARTIAL` (bold/italic/underline/spoiler/mono/links + strikethrough + quote/code block; toolbar still evolving)
23. Groups - `PARTIAL` (create/add/remove/invite link; join-by-invite and invite permissions covered by integration tests; members API now returns profile fields (`username/name/avatar_url`) and web Chat Info consumes them to avoid extra per-member profile requests; advanced moderation still partial)
23. Groups - `PARTIAL` (create/add/remove/invite link; join-by-invite and invite permissions covered by integration tests; members API now returns profile fields (`username/name/avatar_url`) and web Chat Info consumes them to avoid extra per-member profile requests; add-member search also shows avatars; advanced moderation still partial)
24. Roles - `DONE` (owner/admin/member)
25. Admin Rights - `PARTIAL` (delete/pin/edit info + explicit ban APIs for groups/channels including ban list endpoint; web Chat Info now shows searchable `Banned users` with right-click `Unban` action for owner/admin, member search, avatars in moderation lists, and invite-link copy/regenerate actions; integration tests cover channel member read-only, channel admin full-delete, channel message delete-for-all permissions, group profile edit permissions, owner-only role management rules, and admin-visible/member-forbidden ban-list access; remaining UX moderation tools limited)
26. Channels - `PARTIAL` (create/post/edit/delete/subscribe/unsubscribe; integration tests now also cover invite-link permissions (member forbidden, admin allowed); UX edge-cases still polishing)

View File

@@ -657,8 +657,19 @@ export function ChatInfoPanel({ chatId, open, onClose }: Props) {
}
}}
>
<p className="truncate font-semibold">{user.name}</p>
<p className="truncate text-xs text-slate-400">@{user.username}</p>
<div className="flex items-start gap-2">
{user.avatar_url ? (
<img alt="avatar" className="h-8 w-8 shrink-0 rounded-full object-cover" src={user.avatar_url} />
) : (
<div className="flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-slate-700 text-[11px] font-semibold uppercase text-slate-200">
{initialsFromName(user.name || user.username || `user ${user.id}`)}
</div>
)}
<div className="min-w-0">
<p className="truncate font-semibold">{user.name}</p>
<p className="truncate text-xs text-slate-400">@{user.username}</p>
</div>
</div>
</button>
))}
</div>