feat(05-11): add adminDeleteUser API function + inline delete confirmation panel

- Export adminDeleteUser(id, adminPassword) from client.js — sends JSON body to DELETE /api/admin/users/{id}
- AdminUsersTab: add confirmDelete, deletePassword, deleteError state refs
- AdminUsersTab: add startDelete, cancelDelete, confirmDoDelete functions (mutually exclusive with deactivate panel)
- AdminUsersTab: Delete button added to active and deactivated user rows
- AdminUsersTab: inline password confirmation panel with Argon2 verification via backend
This commit is contained in:
curo1305
2026-05-30 11:39:10 +02:00
parent 390a693ec6
commit 72687212a1
2 changed files with 92 additions and 0 deletions
+8
View File
@@ -269,6 +269,14 @@ export function adminUpdateAiConfig(id, provider, model) {
})
}
export function adminDeleteUser(id, adminPassword) {
return request(`/api/admin/users/${id}`, {
method: 'DELETE',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ admin_password: adminPassword }),
})
}
// ── Folders ───────────────────────────────────────────────────────────────────
export function listFolders(parentId = null) {