mirror of
https://tangled.org/evan.jarrett.net/at-container-registry
synced 2026-04-22 01:10:36 +00:00
22 lines
835 B
HTML
22 lines
835 B
HTML
{{ define "devices-table" }}
|
|
{{ range .Devices }}
|
|
<tr id="device-{{ .ID }}">
|
|
<td>{{ .Name }}</td>
|
|
<td class="font-mono text-sm">{{ if .IPAddress }}{{ .IPAddress }}{{ else }}Unknown{{ end }}</td>
|
|
<td>{{ formatDate .CreatedAt }}</td>
|
|
<td>{{ if isZeroTime .LastUsed }}Never{{ else }}{{ formatDate .LastUsed }}{{ end }}</td>
|
|
<td>
|
|
<button class="btn btn-ghost btn-sm text-error"
|
|
hx-delete="/api/devices/{{ .ID }}"
|
|
hx-target="#device-{{ .ID }}"
|
|
hx-swap="delete"
|
|
hx-confirm="Revoke access for {{ .Name }}?">
|
|
{{ icon "trash-2" "size-4" }}
|
|
</button>
|
|
</td>
|
|
</tr>
|
|
{{ else }}
|
|
<tr><td colspan="5" class="text-center text-base-content/60">No authorized devices yet. Follow the setup instructions above!</td></tr>
|
|
{{ end }}
|
|
{{ end }}
|