fix: confirm admin role toggle and keep the checkbox controlled
The admin checkbox fired an immediate, irreversible privilege change with no confirmation, and on cancel/failure the optimistic DOM flip stuck while the server state was unchanged. Add a confirm() gate (like Delete) and make the checkbox controlled by u.is_admin: onchange reverts the DOM immediately and it only flips once the server confirms — so a cancelled or failed toggle never misrepresents the real role. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mangalord-frontend",
|
||||
"version": "0.125.0",
|
||||
"version": "0.125.1",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user