feat(webui): implement state versions list

This commit is contained in:
Julien Dessaux 2025-01-27 22:00:51 +01:00
parent 80958d5b0f
commit 26e10a9399
Signed by: adyxax
GPG key ID: F92E51B86E07177E
12 changed files with 195 additions and 10 deletions

30
pkg/webui/html/state.html Normal file
View file

@ -0,0 +1,30 @@
{{ define "main" }}
<main class="responsive" id="main">
<p>
Locked:
{{ if eq .State.Lock nil }}no{{ else }}
<span>yes</span>
<div class="tooltip left max">
<b>Lock</b>
<p>{{ .State.Lock }}</p>
</div>
{{ end }}
</p>
<table class="clickable-rows no-space">
<thead>
<tr>
<th>By</th>
<th>Created</th>
</tr>
</thead>
<tbody>
{{ range .Versions }}
<tr>
<td><a href="/version/{{ .Id }}">{{ index $.Usernames .AccountId }}</a></td>
<td><a href="/version/{{ .Id }}">{{ .Created }}</a></td>
</tr>
{{ end }}
</tbody>
</table>
</main>
{{ end }}