Skip to content
This repository was archived by the owner on Jul 28, 2026. It is now read-only.

Commit ebf7aa6

Browse files
committed
refactor: move Danger Zone below Servers card
1 parent e70e845 commit ebf7aa6

1 file changed

Lines changed: 12 additions & 11 deletions

File tree

public/js/admin.js

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -883,17 +883,6 @@ async function renderAdminUserDetail(userId) {
883883
<button class="btn ${u.auth_restricted ? 'btn-primary' : 'btn-warning'}" id="admin-btn-toggle-auth-restriction" style="width:auto">${u.auth_restricted ? 'Unrestrict Auth' : 'Restrict Auth'}</button>
884884
</div>
885885
</div>
886-
<div class="card">
887-
<h2 class="card-title" style="margin-bottom:16px;color:var(--accent-red)">Danger Zone</h2>
888-
<p style="color:var(--text-secondary);font-size:0.88rem;margin-bottom:12px">
889-
Toggle admin privileges or delete this user.
890-
</p>
891-
<div style="display:flex;gap:8px;flex-wrap:wrap">
892-
<button class="btn ${u.is_admin ? 'btn-warning' : 'btn-primary'}" id="admin-btn-toggle-admin" style="width:auto">${u.is_admin ? 'Remove Admin' : 'Make Admin'}</button>
893-
<button class="btn btn-danger" id="admin-btn-delete-user" style="width:auto">Delete User</button>
894-
</div>
895-
<div id="admin-user-action-msg" style="margin-top:12px;display:none"></div>
896-
</div>
897886
</div>
898887
</div>
899888
@@ -929,6 +918,18 @@ async function renderAdminUserDetail(userId) {
929918
</div>
930919
` : '<p style="color:var(--text-secondary)">No servers.</p>'}
931920
</div>
921+
922+
<div class="card">
923+
<h2 class="card-title" style="margin-bottom:16px;color:var(--accent-red)">Danger Zone</h2>
924+
<p style="color:var(--text-secondary);font-size:0.88rem;margin-bottom:12px">
925+
Toggle admin privileges or delete this user.
926+
</p>
927+
<div style="display:flex;gap:8px;flex-wrap:wrap">
928+
<button class="btn ${u.is_admin ? 'btn-warning' : 'btn-primary'}" id="admin-btn-toggle-admin" style="width:auto">${u.is_admin ? 'Remove Admin' : 'Make Admin'}</button>
929+
<button class="btn btn-danger" id="admin-btn-delete-user" style="width:auto">Delete User</button>
930+
</div>
931+
<div id="admin-user-action-msg" style="margin-top:12px;display:none"></div>
932+
</div>
932933
`;
933934

934935
initUserActions(userId);

0 commit comments

Comments
 (0)