Showing the frontend and backend version in the settings panel.
Bumped the version to 7.6.0
This commit is contained in:
@ -91,6 +91,7 @@ export class AuthService {
|
||||
perms: decoded.scopes,
|
||||
access_token: token,
|
||||
exp: decoded.exp,
|
||||
ver: decoded.ver
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -8,6 +8,7 @@ export class User {
|
||||
isAuthenticated: boolean;
|
||||
access_token?: string;
|
||||
exp?: number;
|
||||
ver: string;
|
||||
|
||||
public constructor(init?: Partial<User>) {
|
||||
Object.assign(this, init);
|
||||
|
||||
@ -218,3 +218,8 @@
|
||||
</mat-card>
|
||||
</mat-tab>
|
||||
</mat-tab-group>
|
||||
<footer class="footer">
|
||||
<p>
|
||||
Backend: v{{ auth.user.ver }} / Frontend: v{{ version }}
|
||||
</p>
|
||||
</footer>
|
||||
|
||||
@ -12,6 +12,7 @@ import { Product } from '../core/product';
|
||||
import { debounceTime, distinctUntilChanged, map, startWith, switchMap } from 'rxjs/operators';
|
||||
import { Observable, of as observableOf } from 'rxjs';
|
||||
import { ProductService } from '../product/product.service';
|
||||
import {environment} from '../../environments/environment';
|
||||
|
||||
@Component({
|
||||
selector: 'app-settings',
|
||||
@ -30,6 +31,8 @@ export class SettingsComponent implements OnInit {
|
||||
|
||||
maintenance: any;
|
||||
|
||||
version: string;
|
||||
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
@ -51,6 +54,7 @@ export class SettingsComponent implements OnInit {
|
||||
this.listenToProductChanges();
|
||||
|
||||
this.maintenance = { enabled: false, user: '' };
|
||||
this.version = environment.version;
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
export const environment = {
|
||||
production: true,
|
||||
ACCESS_TOKEN_REFRESH_MINUTES: 10, // refresh token 10 minutes before expiry
|
||||
version: '7.6.0',
|
||||
};
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
export const environment = {
|
||||
production: false,
|
||||
ACCESS_TOKEN_REFRESH_MINUTES: 10, // refresh token 10 minutes before expiry
|
||||
version: '7.6.0',
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user