Stamp app version into builds
This commit is contained in:
@@ -43,6 +43,15 @@ import (
|
||||
"golang.org/x/exp/shiny/materialdesign/icons"
|
||||
)
|
||||
|
||||
var appVersion = "dev"
|
||||
|
||||
func currentAppVersion() string {
|
||||
if strings.TrimSpace(appVersion) == "" {
|
||||
return "dev"
|
||||
}
|
||||
return strings.TrimSpace(appVersion)
|
||||
}
|
||||
|
||||
type entry = vault.Entry
|
||||
|
||||
const (
|
||||
@@ -4246,12 +4255,12 @@ func (u *ui) aboutDetailPanel(gtx layout.Context) layout.Dimensions {
|
||||
aboutFact(u.theme, "Programmatic Access", "Secure local gRPC API", "Built for trusted clients such as browser extensions and automation."),
|
||||
layout.Spacer{Height: unit.Dp(14)}.Layout,
|
||||
func(gtx layout.Context) layout.Dimensions {
|
||||
lbl := material.Label(u.theme, unit.Sp(12), "Runtime")
|
||||
lbl := material.Label(u.theme, unit.Sp(12), "Version")
|
||||
lbl.Color = mutedColor
|
||||
return lbl.Layout(gtx)
|
||||
},
|
||||
func(gtx layout.Context) layout.Dimensions {
|
||||
lbl := material.Label(u.theme, unit.Sp(14), fmt.Sprintf("%s on %s/%s", runtime.Version(), runtime.GOOS, runtime.GOARCH))
|
||||
lbl := material.Label(u.theme, unit.Sp(14), currentAppVersion())
|
||||
lbl.Color = u.theme.Palette.Fg
|
||||
return lbl.Layout(gtx)
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user