[add] better log page, [add] admin users page, [add] admin nav
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
15
templates/pages/admin-logs.html
Normal file
15
templates/pages/admin-logs.html
Normal file
@@ -0,0 +1,15 @@
|
||||
{{template "base" .}} {{define "title"}}Admin - Logs{{end}} {{define
|
||||
"header"}}
|
||||
<a class="whitespace-pre" href="../admin">Admin - Logs</a>
|
||||
{{end}} {{define "content"}}
|
||||
|
||||
<div
|
||||
class="flex flex-col-reverse text-black dark:text-white"
|
||||
style="font-family: monospace"
|
||||
>
|
||||
{{range $log := .Data }}
|
||||
<span class="whitespace-pre">{{ $log }}</span>
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
{{end}}
|
||||
50
templates/pages/admin-users.html
Normal file
50
templates/pages/admin-users.html
Normal file
@@ -0,0 +1,50 @@
|
||||
{{template "base" .}} {{define "title"}}Admin - Users{{end}} {{define "header"}}
|
||||
<a class="whitespace-pre" href="../admin">Admin - Users</a>
|
||||
{{end}} {{define "content"}}
|
||||
<div class="overflow-x-auto">
|
||||
<div class="inline-block min-w-full overflow-hidden rounded shadow">
|
||||
<table class="min-w-full leading-normal bg-white dark:bg-gray-700 text-sm">
|
||||
<thead class="text-gray-800 dark:text-gray-400">
|
||||
<tr>
|
||||
<th class="p-3 font-normal text-left uppercase border-b border-gray-200 dark:border-gray-800 w-12">
|
||||
{{ template "svg/add" }}
|
||||
</th>
|
||||
<th class="p-3 font-normal text-left uppercase border-b border-gray-200 dark:border-gray-800">
|
||||
User
|
||||
</th>
|
||||
<th class="p-3 font-normal text-left uppercase border-b border-gray-200 dark:border-gray-800 text-center">
|
||||
Permissions
|
||||
</th>
|
||||
<th class="p-3 font-normal text-left uppercase border-b border-gray-200 dark:border-gray-800 w-48">
|
||||
Created
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="text-black dark:text-white">
|
||||
{{ if not .Data }}
|
||||
<tr>
|
||||
<td class="text-center p-3" colspan="2">No Results</td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
{{range $user := .Data }}
|
||||
<tr>
|
||||
<td class="p-3 border-b border-gray-200 text-gray-800 dark:text-gray-400">
|
||||
{{ template "svg/delete" }}
|
||||
</td>
|
||||
<td class="p-3 border-b border-gray-200">
|
||||
<p>{{ $user.ID }}</p>
|
||||
</td>
|
||||
<td class="p-3 border-b border-gray-200 text-center min-w-40">
|
||||
<span class="px-2 py-1 rounded-md text-white dark:text-black {{if $user.Admin}}bg-gray-800 dark:bg-gray-100{{else}}bg-gray-400 dark:bg-gray-600 cursor-pointer{{end}}">admin</span>
|
||||
<span class="px-2 py-1 rounded-md text-white dark:text-black {{if $user.Admin}}bg-gray-400 dark:bg-gray-600 cursor-pointer{{else}}bg-gray-800 dark:bg-gray-100{{end}}">user</span>
|
||||
</td>
|
||||
<td class="p-3 border-b border-gray-200">
|
||||
<p>{{ $user.CreatedAt }}</p>
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
@@ -1,6 +1,6 @@
|
||||
{{template "base" .}} {{define "title"}}Administration{{end}} {{define
|
||||
{{template "base" .}} {{define "title"}}Admin - General{{end}} {{define
|
||||
"header"}}
|
||||
<a href="./admin">Administration</a>
|
||||
<a class="whitespace-pre" href="./admin">Admin - General</a>
|
||||
{{end}} {{define "content"}}
|
||||
<div class="w-full flex flex-col md:flex-row gap-4">
|
||||
<div>
|
||||
@@ -168,7 +168,6 @@
|
||||
<td class="py-2 float-right">
|
||||
<a
|
||||
href="./admin/logs"
|
||||
target="_blank"
|
||||
class="inline-block w-40 px-10 py-2 text-base font-semibold text-center text-white transition duration-200 ease-in bg-black shadow-md hover:text-black hover:bg-white focus:outline-none focus:ring-2"
|
||||
>
|
||||
<span class="w-full">View</span>
|
||||
|
||||
Reference in New Issue
Block a user