From 11fffd5751bc15eb9823a8da668f4e98283e4f86 Mon Sep 17 00:00:00 2001 From: Lucas Li Date: Wed, 6 Nov 2024 11:34:37 -0800 Subject: [PATCH] add build number to mobile more page --- .../src/app/components/more/more.component.html | 4 +++- .../src/app/components/more/more.component.ts | 14 +++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/client/wfnews-war/src/main/angular/src/app/components/more/more.component.html b/client/wfnews-war/src/main/angular/src/app/components/more/more.component.html index 38de8bac9f..29a41e4a8d 100644 --- a/client/wfnews-war/src/main/angular/src/app/components/more/more.component.html +++ b/client/wfnews-war/src/main/angular/src/app/components/more/more.component.html @@ -73,5 +73,7 @@
Copyright
-
{{versionNumber}}
+
+ {{ showVersion ? versionNumber : buildNumber }} +
diff --git a/client/wfnews-war/src/main/angular/src/app/components/more/more.component.ts b/client/wfnews-war/src/main/angular/src/app/components/more/more.component.ts index 89feb9877a..a4c13a3e32 100644 --- a/client/wfnews-war/src/main/angular/src/app/components/more/more.component.ts +++ b/client/wfnews-war/src/main/angular/src/app/components/more/more.component.ts @@ -2,6 +2,8 @@ import { Component, OnInit } from '@angular/core'; import { Router } from '@angular/router'; import { ResourcesRoutes, snowPlowHelper } from '@app/utils'; import { AppConfigService } from '@wf1/core-ui'; +import { BUILD_NUMBER } from '../../../environments/build-info'; + @Component({ selector: 'wfnews-more', @@ -10,7 +12,10 @@ import { AppConfigService } from '@wf1/core-ui'; }) export class MoreComponent implements OnInit{ public versionNumber; - public snowPlowHelper = snowPlowHelper + public snowPlowHelper = snowPlowHelper; + public buildNumber: string; + public showVersion = true; + constructor( private router: Router, private appConfig: AppConfigService) {} @@ -20,6 +25,9 @@ export class MoreComponent implements OnInit{ if (version) { this.versionNumber = 'Version ' + version; } + if (BUILD_NUMBER) { + this.buildNumber = ' Build: ' + BUILD_NUMBER; + } } navigate(menu) { @@ -52,4 +60,8 @@ export class MoreComponent implements OnInit{ break; } } + + toggleVersionDisplay() { + this.showVersion = !this.showVersion; + } }