Skip to content

Commit

Permalink
Display app version the settings UI
Browse files Browse the repository at this point in the history
  • Loading branch information
knadh committed Jun 9, 2021
1 parent a3b285f commit b361292
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions cmd/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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})
}
Expand Down
4 changes: 3 additions & 1 deletion frontend/src/views/Settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit b361292

Please sign in to comment.