diff --git a/backend/server.ts b/backend/server.ts index 564cd7e8..a1916e29 100644 --- a/backend/server.ts +++ b/backend/server.ts @@ -44,6 +44,8 @@ export class Server { Logger.info(LOG_TAG, 'running diagnostics...'); await ConfigDiagnostics.runDiagnostics(); Logger.info(LOG_TAG, 'using config:'); + const appVer = require('../package.json').version; + Config.Client.appVersion = appVer; Logger.info(LOG_TAG, JSON.stringify(Config, null, '\t')); this.app = _express(); diff --git a/common/config/public/ConfigClass.ts b/common/config/public/ConfigClass.ts index 29fc7d19..313bdb7f 100644 --- a/common/config/public/ConfigClass.ts +++ b/common/config/public/ConfigClass.ts @@ -79,6 +79,7 @@ export module ClientConfig { } export interface Config { + appVersion: string; applicationTitle: string; publicUrl: string; urlBase: string; @@ -105,6 +106,7 @@ export class PublicConfigClass { public Client: ClientConfig.Config = { applicationTitle: 'PiGallery 2', + appVersion: '', Thumbnail: { concurrentThumbnailGenerations: 1, thumbnailSizes: [200, 400, 600], diff --git a/frontend/app/ui/admin/admin.component.css b/frontend/app/ui/admin/admin.component.css index e69de29b..5e46844c 100644 --- a/frontend/app/ui/admin/admin.component.css +++ b/frontend/app/ui/admin/admin.component.css @@ -0,0 +1,7 @@ +.version{ + color: #6c757d; +} + +.version:hover{ + text-decoration: underline; +} diff --git a/frontend/app/ui/admin/admin.component.html b/frontend/app/ui/admin/admin.component.html index bf70ef0f..d2b03fd7 100644 --- a/frontend/app/ui/admin/admin.component.html +++ b/frontend/app/ui/admin/admin.component.html @@ -21,21 +21,27 @@