Show build version in page footer

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Mikhail Chusavitin
2026-03-18 17:51:13 +03:00
parent 7de0f359b6
commit c34a42aaf5
2 changed files with 6 additions and 0 deletions

View File

@@ -7,6 +7,7 @@ import (
"strings" "strings"
qfassets "git.mchus.pro/mchus/quoteforge" qfassets "git.mchus.pro/mchus/quoteforge"
"git.mchus.pro/mchus/quoteforge/internal/appmeta"
"git.mchus.pro/mchus/quoteforge/internal/localdb" "git.mchus.pro/mchus/quoteforge/internal/localdb"
"git.mchus.pro/mchus/quoteforge/internal/models" "git.mchus.pro/mchus/quoteforge/internal/models"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
@@ -112,6 +113,7 @@ func NewWebHandler(_ string, localDB *localdb.LocalDB) (*WebHandler, error) {
} }
func (h *WebHandler) render(c *gin.Context, name string, data gin.H) { func (h *WebHandler) render(c *gin.Context, name string, data gin.H) {
data["AppVersion"] = appmeta.Version()
c.Header("Content-Type", "text/html; charset=utf-8") c.Header("Content-Type", "text/html; charset=utf-8")
tmpl, ok := h.templates[name] tmpl, ok := h.templates[name]
if !ok { if !ok {

View File

@@ -44,6 +44,10 @@
{{template "content" .}} {{template "content" .}}
</main> </main>
<footer class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-3 text-right">
<span class="text-xs text-gray-400">v{{.AppVersion}}</span>
</footer>
<div id="toast" class="fixed bottom-4 right-4 z-50"></div> <div id="toast" class="fixed bottom-4 right-4 z-50"></div>
<!-- Sync Info Modal --> <!-- Sync Info Modal -->