Skip to content

High performance, self-hosted, newsletter and mailing list manager with a modern dashboard. Single binary app.

Display app version the settings UI

Kailash Nadhb3612927c82b
diff --git a/cmd/admin.go b/cmd/admin.go
index 292226ba..618ae19f 100644
--- a/cmd/admin.go
+++ b/cmd/admin.go
@@ -17,6 +17,7 @@ type serverConfig struct {
Lang string `json:"lang"`
Update *AppUpdate `json:"update"`
NeedsRestart bool `json:"needs_restart"`
+ Version string `json:"version"`
}
// handleGetServerConfig returns general server config.
@@ -51,6 +52,7 @@ func handleGetServerConfig(c echo.Context) error {
out.NeedsRestart = app.needsRestart
out.Update = app.update
app.Unlock()
+ out.Version = versionString
return c.JSON(http.StatusOK, okResp{out})
}
diff --git a/frontend/src/views/Settings.vue b/frontend/src/views/Settings.vue
index 40ba8964..5697f8f6 100644
--- a/frontend/src/views/Settings.vue
+++ b/frontend/src/views/Settings.vue
@@ -3,7 +3,9 @@
<b-loading :is-full-page="true" v-if="loading.settings || isLoading" active />
<header class="columns">
<div class="column is-half">
- <h1 class="title is-4">{{ $t('settings.title') }}</h1>
+ <h1 class="title is-4">{{ $t('settings.title') }}
+ <span class="has-text-grey-light">({{ serverConfig.version }})</span>
+ </h1>
</div>
<div class="column has-text-right">
<b-button :disabled="!hasFormChanged"