panel: show the running version in the layout footer
Nothing in the UI said which build was running, though it is the value a backup manifest is compared against on restore and the first thing worth knowing when the panel misbehaves — it was only in the startup log line and `panel -version`. Add it as a small footer in the shared layout, supplied from render() alongside .Active so no handler has to pass it, and gated on .User: the login and setup pages face the internet and should not advertise a version. Tests cover both the footer and render() supplying the key, since neither is visible from any single handler. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -19,6 +19,11 @@
|
||||
<main>
|
||||
{{if .User}}{{template "nav" .}}{{end}}
|
||||
{{template "content" .}}
|
||||
{{/* The running version, on every authenticated page: it is what a backup
|
||||
manifest is checked against on restore and the first thing to establish
|
||||
when something behaves unexpectedly. Only for signed-in administrators —
|
||||
the login and setup pages must not advertise it to the internet. */}}
|
||||
{{if .User}}<footer class="version">SelfPost {{.Version}}</footer>{{end}}
|
||||
</main>
|
||||
</body>
|
||||
</html>{{end}}
|
||||
|
||||
Reference in New Issue
Block a user