feat(web): add inline unban action in chat info bans list
Some checks are pending
CI / test (push) Has started running

This commit is contained in:
2026-03-08 21:40:53 +03:00
parent e233cab993
commit de8037d73c
2 changed files with 18 additions and 2 deletions

View File

@@ -716,7 +716,23 @@ export function ChatInfoPanel({ chatId, open, onClose }: Props) {
<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
className="rounded bg-slate-700 px-2 py-1 text-[11px] hover:bg-slate-600"
onClick={async (event) => {
event.stopPropagation();
try {
await unbanChatMember(chatId, ban.user_id);
await refreshBans(chatId, false);
await refreshMembers(chatId);
showToast("User unbanned");
} catch {
setError("Failed to unban user");
}
}}
type="button"
>
Unban
</button>
</button>
);
})}