58 lines
2.2 KiB
HTML
58 lines
2.2 KiB
HTML
{{- /* SPDX-License-Identifier: GPL-2.0-or-later */ -}}
|
|
{{- /* Copyright (C) 2026 Bryan Joshua Pedini */ -}}
|
|
|
|
{{define "title"}}Users{{end}}
|
|
{{define "content"}}<div class="page-head">
|
|
<h1>Users</h1>
|
|
<button type="button" class="btn btn-primary" id="new-user">New user</button>
|
|
</div>
|
|
<div class="toolbar">
|
|
<label class="choice" for="show-deleted"><input type="checkbox" id="show-deleted"> Show deleted users</label>
|
|
</div>
|
|
<div class="table-wrap">
|
|
<table class="table" id="users-table">
|
|
<thead>
|
|
<tr><th scope="col">Username</th><th scope="col">Role</th><th scope="col" class="num">Zones</th><th scope="col">Created (UTC)</th><th scope="col">Last login (UTC)</th><th scope="col">State</th></tr>
|
|
</thead>
|
|
<tbody id="users-body"></tbody>
|
|
</table>
|
|
</div>
|
|
<p class="muted" id="users-status" role="status">Loading users...</p>
|
|
|
|
<dialog id="user-dialog" class="dialog" aria-labelledby="user-dialog-title">
|
|
<form id="user-form" class="form" novalidate>
|
|
<div class="dialog-head">
|
|
<h2 id="user-dialog-title">New user</h2>
|
|
<button type="button" class="btn btn-icon" data-close aria-label="Close">×</button>
|
|
</div>
|
|
<div class="dialog-body">
|
|
<div class="field">
|
|
<label for="nu-username">Username</label>
|
|
<input id="nu-username" name="username" type="text" autocomplete="off" autocapitalize="none" spellcheck="false" maxlength="64" required>
|
|
<p class="hint">Lowercase letters, digits, dot, underscore and hyphen. A username can never be reused.</p>
|
|
</div>
|
|
<div class="field">
|
|
<label for="nu-role">Role</label>
|
|
<select id="nu-role" name="role">
|
|
<option value="user">user</option>
|
|
<option value="admin">admin</option>
|
|
</select>
|
|
</div>
|
|
<div class="field">
|
|
<label for="nu-password">Password</label>
|
|
<input id="nu-password" name="password" type="password" autocomplete="new-password" maxlength="256" required>
|
|
<p class="hint">12 to 256 characters.</p>
|
|
</div>
|
|
<div class="field">
|
|
<label for="nu-repeat">Repeat the password</label>
|
|
<input id="nu-repeat" name="repeat" type="password" autocomplete="new-password" maxlength="256" required>
|
|
</div>
|
|
</div>
|
|
<div class="dialog-actions">
|
|
<button type="button" class="btn" data-close>Cancel</button>
|
|
<button type="submit" class="btn btn-primary">Create user</button>
|
|
</div>
|
|
</form>
|
|
</dialog>
|
|
{{end}}
|