This commit is contained in:
parent
5ff197ad49
commit
4c4dc3fc5c
4 changed files with 93 additions and 80 deletions
|
@ -2,7 +2,7 @@
|
|||
<mat-toolbar fxFlex="2em" id='top-toolbar'>
|
||||
<span
|
||||
style='font-family:GisafSymbols'
|
||||
matTooltip="Gisaf v. {{ (configService.conf | async).bsData?.version }}"
|
||||
matTooltip="Gisaf version: backend {{ version.backend }}, frontend {{ version.frontend }}"
|
||||
matTooltipPosition="below"
|
||||
class='gisafIcon'
|
||||
>
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
import { Component, OnInit,
|
||||
ChangeDetectionStrategy, ChangeDetectorRef } from '@angular/core'
|
||||
import {
|
||||
Component, OnInit,
|
||||
ChangeDetectionStrategy, ChangeDetectorRef
|
||||
} from '@angular/core'
|
||||
import { Title } from '@angular/platform-browser'
|
||||
import { BootstrapService } from './_services/bootstrap.service'
|
||||
import { ConfigService } from './_services/config.service'
|
||||
|
@ -8,6 +10,12 @@ import { MatDialog, MatDialogRef } from '@angular/material/dialog'
|
|||
|
||||
import { AuthenticationService } from './_services/authentication.service'
|
||||
import { LoginDialogComponent } from './login/login.component'
|
||||
import versionJson from '../version.json'
|
||||
|
||||
export class Version {
|
||||
public backend: string
|
||||
public frontend: string
|
||||
}
|
||||
|
||||
@Component({
|
||||
selector: 'app-root',
|
||||
|
@ -16,8 +24,8 @@ import { LoginDialogComponent } from './login/login.component'
|
|||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
})
|
||||
export class AppComponent implements OnInit {
|
||||
title = 'Gisaf'
|
||||
version: string
|
||||
title: string = 'Gisaf'
|
||||
version: Version = new Version()
|
||||
|
||||
routes = [
|
||||
{
|
||||
|
@ -52,7 +60,8 @@ export class AppComponent implements OnInit {
|
|||
// Bootstrap: set app wide configuration
|
||||
this.bootstrapService.get().subscribe({
|
||||
next: res => {
|
||||
this.version = res.version
|
||||
this.version.backend = res.version
|
||||
this.version.frontend = versionJson["version"]
|
||||
this.title = res.title || this.title
|
||||
this.titleService.setTitle(res.windowTitle || this.title)
|
||||
this.configService.setConf(res)
|
||||
|
|
3
src/version.json
Normal file
3
src/version.json
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"version": "0.0.0"
|
||||
}
|
|
@ -1,24 +1,25 @@
|
|||
{
|
||||
"compileOnSave": false,
|
||||
"compilerOptions": {
|
||||
"importHelpers": true,
|
||||
"module": "es2020",
|
||||
"esModuleInterop": true,
|
||||
"outDir": "./dist/out-tsc",
|
||||
"sourceMap": true,
|
||||
"declaration": false,
|
||||
"moduleResolution": "node",
|
||||
"esModuleInterop": true,
|
||||
"experimentalDecorators": true,
|
||||
"target": "ES2022",
|
||||
"typeRoots": [
|
||||
"node_modules/@types",
|
||||
"@types"
|
||||
],
|
||||
"importHelpers": true,
|
||||
"lib": [
|
||||
"es2019",
|
||||
"dom",
|
||||
"esnext.asynciterable"
|
||||
],
|
||||
"module": "es2020",
|
||||
"moduleResolution": "node",
|
||||
"resolveJsonModule": true,
|
||||
"outDir": "./dist/out-tsc",
|
||||
"sourceMap": true,
|
||||
"target": "ES2022",
|
||||
"typeRoots": [
|
||||
"node_modules/@types",
|
||||
"@types"
|
||||
],
|
||||
"useDefineForClassFields": false
|
||||
},
|
||||
"angularCompilerOptions": {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue