Display app version the settings UI

This commit is contained in:
Kailash Nadh 2021-06-09 20:11:45 +05:30
parent a3b285fa62
commit b3612927c8
2 changed files with 5 additions and 1 deletions

View file

@ -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})
}

View file

@ -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"