44 lines
1.0 KiB
TypeScript
44 lines
1.0 KiB
TypeScript
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,
|
|
NgIf
|
|
],
|
|
templateUrl: './credits.component.html',
|
|
styleUrl: './credits.component.scss'
|
|
})
|
|
export class CreditsComponent {
|
|
|
|
version: string = '';
|
|
|
|
constructor(private legalService: LegalService, private developmentStore: DevelopmentStore) {
|
|
this.getVersion();
|
|
}
|
|
|
|
openPrivacyPolicyModal() {
|
|
this.legalService.openPrivacyPolicy();
|
|
}
|
|
|
|
openTermsOfUseModal() {
|
|
this.legalService.openTermsOfUse();
|
|
}
|
|
|
|
getVersion() {
|
|
axios.get(this.developmentStore.getBaseUrl() + 'api/v1/public/version')
|
|
.then((response) => {
|
|
this.version = response.data;
|
|
})
|
|
.catch((error) => {
|
|
console.log(error);
|
|
});
|
|
}
|
|
}
|