Changeset 0.22.5 (#147)

Co-authored-by: Jeffrey Smith <jasafpro@gmail.com>
Co-committed-by: Jeffrey Smith <jasafpro@gmail.com>
This commit is contained in:
2026-03-03 09:58:23 +00:00
committed by xcaliber
parent 3953dcf364
commit 45fe965c32
32 changed files with 3021 additions and 11 deletions

View File

@@ -0,0 +1,48 @@
{{/* Admin users — user management table. */}}
{{define "admin-users"}}
<div class="admin-page">
<h2>Users</h2>
<p class="section-hint">Manage user accounts, roles, and access.</p>
<div class="admin-toolbar">
<input type="text" class="admin-search" id="userSearch" placeholder="Filter users…" oninput="Pages.filterUsers(this.value)">
</div>
{{if .Data.Users}}
<table class="admin-table" id="userTable">
<thead>
<tr>
<th>Username</th>
<th>Email</th>
<th>Display Name</th>
<th>Role</th>
<th>Status</th>
<th></th>
</tr>
</thead>
<tbody>
{{range .Data.Users}}
<tr data-name="{{.Username}} {{.Email}} {{.DisplayName}}">
<td><strong>{{.Username}}</strong></td>
<td style="color:var(--text-secondary);">{{.Email}}</td>
<td>{{.DisplayName}}</td>
<td><span class="admin-badge admin-badge-{{.Role}}">{{.Role}}</span></td>
<td><span class="admin-badge admin-badge-{{if .IsActive}}active{{else}}inactive{{end}}">{{if .IsActive}}active{{else}}inactive{{end}}</span></td>
<td>
<button class="btn-small" onclick="Pages.editUserRole('{{.ID}}','{{.Username}}','{{.Role}}')">Role</button>
{{if .IsActive}}
<button class="btn-small" onclick="Pages.toggleUser('{{.ID}}',false)">Disable</button>
{{else}}
<button class="btn-small" onclick="Pages.toggleUser('{{.ID}}',true)">Enable</button>
{{end}}
</td>
</tr>
{{end}}
</tbody>
</table>
{{else}}
<div class="empty-hint">No users found.</div>
{{end}}
</div>
{{end}}