using npm run commands for building angular application (supports pre steps).

Automatically embed the application version in the UI.
This commit is contained in:
Jason Kulatunga
2022-05-26 22:37:45 -07:00
parent 5dbfad68ad
commit d93d24b52d
9 changed files with 45 additions and 6 deletions
@@ -39,7 +39,7 @@
<!-- Spacer -->
<div class="spacer"></div>
<code>{{appVersion}}</code>
<!-- Shortcuts -->
<!-- <shortcuts [shortcuts]="data.shortcuts"></shortcuts>-->
@@ -48,6 +48,7 @@
<!-- <notifications [notifications]="data.notifications"></notifications>-->
</div>
@@ -4,6 +4,7 @@ import { Subject } from 'rxjs';
import { takeUntil } from 'rxjs/operators';
import { TreoMediaWatcherService } from '@treo/services/media-watcher';
import { TreoNavigationService } from '@treo/components/navigation';
import {versions} from 'environments/versions';
@Component({
selector : 'material-layout',
@@ -13,6 +14,7 @@ import { TreoNavigationService } from '@treo/components/navigation';
})
export class MaterialLayoutComponent implements OnInit, OnDestroy
{
appVersion: string;
data: any;
isScreenSmall: boolean;
@@ -46,6 +48,8 @@ export class MaterialLayoutComponent implements OnInit, OnDestroy
// Set the defaults
this.fixedHeader = false;
this.fixedFooter = false;
this.appVersion = `${versions.version}${versions.branch === 'master' ? '' : '#' + versions.branch}`
}
// -----------------------------------------------------------------------------------------------------