feat(web): show avatars in chat info moderation lists
Some checks are pending
CI / test (push) Has started running
Some checks are pending
CI / test (push) Has started running
This commit is contained in:
@@ -578,13 +578,24 @@ export function ChatInfoPanel({ chatId, open, onClose }: Props) {
|
||||
}}
|
||||
type="button"
|
||||
>
|
||||
<p className="flex items-center gap-1 truncate text-sm font-semibold">
|
||||
<span className="truncate">{user?.name || `user #${member.user_id}`}</span>
|
||||
{member.role === "owner" ? <span className="rounded bg-amber-500/20 px-1.5 py-0.5 text-[10px] text-amber-300">👑 owner</span> : null}
|
||||
{member.role === "admin" ? <span className="rounded bg-sky-500/20 px-1.5 py-0.5 text-[10px] text-sky-300">👑 admin</span> : null}
|
||||
</p>
|
||||
<p className="truncate text-xs text-slate-400">@{user?.username || "unknown"}</p>
|
||||
{canOpenMemberMenu ? <p className="mt-1 text-[11px] text-slate-500">Right click for actions</p> : null}
|
||||
<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-sky-500/30 text-[11px] font-semibold uppercase text-sky-100">
|
||||
{initialsFromName(user?.name || user?.username || `user ${member.user_id}`)}
|
||||
</div>
|
||||
)}
|
||||
<div className="min-w-0 flex-1">
|
||||
<p className="flex items-center gap-1 truncate text-sm font-semibold">
|
||||
<span className="truncate">{user?.name || `user #${member.user_id}`}</span>
|
||||
{member.role === "owner" ? <span className="rounded bg-amber-500/20 px-1.5 py-0.5 text-[10px] text-amber-300">👑 owner</span> : null}
|
||||
{member.role === "admin" ? <span className="rounded bg-sky-500/20 px-1.5 py-0.5 text-[10px] text-sky-300">👑 admin</span> : null}
|
||||
</p>
|
||||
<p className="truncate text-xs text-slate-400">@{user?.username || "unknown"}</p>
|
||||
{canOpenMemberMenu ? <p className="mt-1 text-[11px] text-slate-500">Right click for actions</p> : null}
|
||||
</div>
|
||||
</div>
|
||||
</button>
|
||||
);
|
||||
})}
|
||||
@@ -680,10 +691,19 @@ export function ChatInfoPanel({ chatId, open, onClose }: Props) {
|
||||
}}
|
||||
type="button"
|
||||
>
|
||||
<div className="min-w-0">
|
||||
<p className="truncate text-xs font-semibold text-slate-200">{user?.name || `user #${ban.user_id}`}</p>
|
||||
<p className="truncate text-[11px] text-slate-400">@{user?.username || "unknown"}</p>
|
||||
<p className="truncate text-[10px] text-slate-500">Right click for actions</p>
|
||||
<div className="flex min-w-0 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 ${ban.user_id}`)}
|
||||
</div>
|
||||
)}
|
||||
<div className="min-w-0">
|
||||
<p className="truncate text-xs font-semibold text-slate-200">{user?.name || `user #${ban.user_id}`}</p>
|
||||
<p className="truncate text-[11px] text-slate-400">@{user?.username || "unknown"}</p>
|
||||
<p className="truncate text-[10px] text-slate-500">Right click for actions</p>
|
||||
</div>
|
||||
</div>
|
||||
<span className="rounded bg-slate-700 px-2 py-1 text-[11px]">Banned</span>
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user