Files
owenandClaude Sonnet 5 affdbfaa41 Restyle admin UI to dark theme, fix Docker /data volume permissions
- Rework the admin UI (topbar, sidebar, cards, tables, badges, stat
  tiles) into a dark theme with a light/dark toggle, matching the
  visual style requested for the project.
- Fix Dockerfile: chown /data to the distroless nonroot uid/gid before
  the VOLUME declaration so a freshly created named volume is seeded
  with writable permissions instead of root:root (was causing
  "unable to open database file" on first run).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QTXFrNP1imCW7jtfL5SZrw
2026-08-17 10:37:51 -05:00

49 lines
2.6 KiB
HTML

{{define "proxy_hosts"}}{{template "header" .}}
{{$d := .Data}}
<div class="d-flex justify-content-between align-items-center mb-3">
<div class="input-icon">
<i class="bi bi-search"></i>
<input type="text" class="form-control" style="width:20rem" placeholder="Search proxy hosts…" data-search-target="hostsTable">
</div>
<a href="/proxy-hosts/new" class="btn btn-primary"><i class="bi bi-plus-lg"></i> Add Proxy Host</a>
</div>
<div class="card">
<div class="table-responsive">
<table class="table table-hover align-middle mb-0" id="hostsTable">
<thead class="table-light">
<tr><th>Name</th><th>Domains</th><th>Type</th><th>Destination</th><th>SSL</th><th>Status</th><th></th></tr>
</thead>
<tbody>
{{range $d.Hosts}}
<tr>
<td><a href="/proxy-hosts/{{.ID}}/edit">{{.Name}}</a>{{if .Comments}}<div class="small text-secondary">{{.Comments}}</div>{{end}}</td>
<td>{{join .Domains ", "}}</td>
<td><span class="badge text-bg-{{if eq .Type "redirect"}}warning{{else}}info{{end}}">{{.Type}}</span></td>
<td>
{{if eq .Type "redirect"}}{{.RedirectTargetURL}}
{{else}}{{range .Backends}}{{.Host}}:{{.Port}} {{end}}{{end}}
</td>
<td>{{if .CertificateID}}<i class="bi bi-shield-check text-success"></i>{{else}}<i class="bi bi-shield-slash text-secondary"></i>{{end}}</td>
<td>{{if .Enabled}}<span class="badge text-bg-success">enabled</span>{{else}}<span class="badge text-bg-secondary">disabled</span>{{end}}</td>
<td class="text-end">
<form method="post" action="/proxy-hosts/{{.ID}}/toggle" class="d-inline">
{{template "csrf_field" $.CSRFToken}}
<button class="btn btn-sm btn-outline-secondary" title="Enable/disable"><i class="bi bi-power"></i></button>
</form>
<a href="/proxy-hosts/{{.ID}}/edit" class="btn btn-sm btn-outline-primary"><i class="bi bi-pencil"></i></a>
<form method="post" action="/proxy-hosts/{{.ID}}/delete" id="del-host-{{.ID}}" class="d-inline">
{{template "csrf_field" $.CSRFToken}}
</form>
<button type="button" class="btn btn-sm btn-outline-danger" data-confirm-delete-form="del-host-{{.ID}}" data-confirm-message="Delete proxy host &quot;{{.Name}}&quot;?"><i class="bi bi-trash"></i></button>
</td>
</tr>
{{else}}
<tr><td colspan="7" class="text-center text-secondary py-4">No proxy hosts yet.</td></tr>
{{end}}
</tbody>
</table>
</div>
</div>
{{template "confirm_delete_modal" .}}
{{template "footer" .}}{{end}}