Added version display
- Added error route handling
This commit is contained in:
@ -1,19 +1,26 @@
|
||||
import { Component } from '@angular/core';
|
||||
import {RouterLink} from "@angular/router";
|
||||
import {LegalService} from "../../service/legalService";
|
||||
import axios from "axios";
|
||||
import {DevelopmentStore} from "../../store/DevelopmentStore";
|
||||
import {NgIf} from "@angular/common";
|
||||
|
||||
@Component({
|
||||
selector: 'app-credits',
|
||||
standalone: true,
|
||||
imports: [
|
||||
RouterLink
|
||||
],
|
||||
imports: [
|
||||
RouterLink,
|
||||
NgIf
|
||||
],
|
||||
templateUrl: './credits.component.html',
|
||||
styleUrl: './credits.component.scss'
|
||||
})
|
||||
export class CreditsComponent {
|
||||
|
||||
constructor(private legalService: LegalService) {
|
||||
version: string = '';
|
||||
|
||||
constructor(private legalService: LegalService, private developmentStore: DevelopmentStore) {
|
||||
this.getVersion();
|
||||
}
|
||||
|
||||
openPrivacyPolicyModal() {
|
||||
@ -23,4 +30,14 @@ export class CreditsComponent {
|
||||
openTermsOfUseModal() {
|
||||
this.legalService.openTermsOfUse();
|
||||
}
|
||||
|
||||
getVersion() {
|
||||
axios.get(this.developmentStore.getBaseUrl() + 'api/v1/version')
|
||||
.then((response) => {
|
||||
this.version = response.data;
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user