Skip to content

Commit

Permalink
add build number to mobile more page
Browse files Browse the repository at this point in the history
  • Loading branch information
yzlucas committed Nov 6, 2024
1 parent 2b8ca30 commit 11fffd5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,7 @@
<div class="bottom-section-item" onclick="window.open('https://www2.gov.bc.ca/gov/content/home/copyright', '_blank')">Copyright</div>
</div>
<div class="divider"></div>
<div class="version-number">{{versionNumber}}</div>
<div class="version-number" (click)="toggleVersionDisplay()">
{{ showVersion ? versionNumber : buildNumber }}
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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) {}
Expand All @@ -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) {
Expand Down Expand Up @@ -52,4 +60,8 @@ export class MoreComponent implements OnInit{
break;
}
}

toggleVersionDisplay() {
this.showVersion = !this.showVersion;
}
}

0 comments on commit 11fffd5

Please sign in to comment.