feat(web): add inline unban action in chat info bans list
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:
@@ -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>
|
||||
);
|
||||
})}
|
||||
|
||||
Reference in New Issue
Block a user