Refactor web build process and update documentation
- Removed Node.js build artifacts from .gitignore and adjusted Makefile to reflect changes in web UI build process, now using server-rendered Go templates instead of React. - Updated README to clarify the new web UI architecture and output formats, emphasizing the removal of the Node.js build step. - Added a command to set the number of frames per render task in manager configuration, enhancing user control over rendering settings. - Improved Gitea workflow by removing unnecessary npm install step, streamlining the CI process.
This commit is contained in:
44
web/templates/partials/admin_users.html
Normal file
44
web/templates/partials/admin_users.html
Normal file
@@ -0,0 +1,44 @@
|
||||
{{ define "partial_admin_users" }}
|
||||
{{ $users := index . "users" }}
|
||||
{{ $currentUserID := index . "current_user_id" }}
|
||||
{{ if not $users }}
|
||||
<p>No users found.</p>
|
||||
{{ else }}
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Name</th>
|
||||
<th>Email</th>
|
||||
<th>Provider</th>
|
||||
<th>Admin</th>
|
||||
<th>Created</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{ range $user := $users }}
|
||||
<tr>
|
||||
<td>{{ $user.ID }}</td>
|
||||
<td>{{ $user.Name }}</td>
|
||||
<td>{{ $user.Email }}</td>
|
||||
<td>{{ if $user.OAuthProvider }}{{ $user.OAuthProvider }}{{ else }}local{{ end }}</td>
|
||||
<td>{{ if $user.IsAdmin }}yes{{ else }}no{{ end }}</td>
|
||||
<td>{{ formatTime $user.CreatedAt }}</td>
|
||||
<td class="row">
|
||||
{{ if and $user.IsAdmin (eq $user.ID $currentUserID) }}
|
||||
<button class="btn tiny" disabled title="You cannot revoke your own admin status">
|
||||
Revoke Admin
|
||||
</button>
|
||||
{{ else }}
|
||||
<button class="btn tiny" data-set-admin="{{ $user.ID }}" data-admin-value="{{ if $user.IsAdmin }}false{{ else }}true{{ end }}">
|
||||
{{ if $user.IsAdmin }}Revoke Admin{{ else }}Make Admin{{ end }}
|
||||
</button>
|
||||
{{ end }}
|
||||
</td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
</tbody>
|
||||
</table>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user