chore: singe source of truth for version & show it on splash screen (#7)

Co-authored-by: 2mal3 <56305732+2mal3@users.noreply.github.com>
This commit is contained in:
E44
2026-01-10 14:06:10 -05:00
committed by GitHub
parent c64eb345fd
commit b0a57f9c67
6 changed files with 31 additions and 5 deletions
+4 -1
View File
@@ -15,6 +15,7 @@ import (
"os/exec"
"path/filepath"
shared "plg-mudics/shared"
"strings"
"github.com/gabriel-vasile/mimetype"
"github.com/labstack/echo/v4"
@@ -35,7 +36,9 @@ func StartWebServer(v string, port string) {
e.GET("/", indexRoute)
e.GET("/sse", sseRoute)
e.GET("/splash", func(ctx echo.Context) error {
return ctx.HTML(http.StatusOK, shared.SplashScreenTemplate)
html := shared.SplashScreenTemplate
html = strings.ReplaceAll(html, "%%APP-VERSION%%", version)
return ctx.HTML(http.StatusOK, html)
})
e.GET("/qr", qrRoute)