Added imprint and privacy urls

This commit is contained in:
Sven Heidemann 2023-03-17 13:18:33 +01:00
parent ff415c354d
commit 7be40ed236
7 changed files with 37 additions and 8 deletions

View File

@ -21,6 +21,8 @@
</div>
</div>
<div class="right">
<a href="https://www.sh-edraft.de/Impressum" target="_blank">{{'footer.imprint' | translate}}</a>
<a [href]="privacy" target="_blank">{{'footer.privacy' | translate}}</a>
<span> | </span>
<a [href]="imprint" target="_blank">{{'footer.imprint' | translate}}</a>
</div>
</footer>

View File

@ -17,6 +17,9 @@ export class FooterComponent implements OnInit {
frontendVersion: SoftwareVersion = new SoftwareVersion("0", "0", "0");
backendVersion: SoftwareVersion = new SoftwareVersion("0", "0", "0");
public privacy: string = "";
public imprint: string = "";
constructor(
private settings: SettingsService,
private guiService: GuiService,
@ -24,6 +27,8 @@ export class FooterComponent implements OnInit {
) {}
ngOnInit(): void {
this.privacy = this.settings.getPrivacyURL();
this.imprint = this.settings.getImprintURL();
this.frontendVersion = this.settings.getWebVersion() ?? new SoftwareVersion('0', '0', '0');
this.spinnerService.showSpinner();

View File

@ -3,6 +3,8 @@ import { Theme } from '../view/theme';
export interface Appsettings {
ApiURL: string;
PrivacyURL: string;
ImprintURL: string;
WebVersion: SoftwareVersion;
Themes: Theme[];
}

View File

@ -30,13 +30,29 @@ export class SettingsService {
}
public getApiURL(): string {
if (!this.appsettings || !this.appsettings.Themes) {
if (!this.appsettings || !this.appsettings.ApiURL) {
console.error('ApiUrl is not set!');
return "";
}
return this.appsettings.ApiURL;
}
public getPrivacyURL(): string {
if (!this.appsettings || !this.appsettings.PrivacyURL) {
console.error('PrivacyURL is not set!');
return "";
}
return this.appsettings.PrivacyURL;
}
public getImprintURL(): string {
if (!this.appsettings || !this.appsettings.ImprintURL) {
console.error('ImprintURL is not set!');
return "";
}
return this.appsettings.ImprintURL;
}
public getWebVersion(): SoftwareVersion | null {
if (!this.appsettings || !this.appsettings.WebVersion) {
console.error('WebVersion is not set!');

View File

@ -1,5 +1,7 @@
{
"ApiURL": "http://localhost:8044",
"PrivacyURL": "https://www.sh-edraft.de/Datenschutz",
"ImprintURL": "https://www.sh-edraft.de/Impressum",
"WebVersion": {
"Major": "1",
"Minor": "0",

View File

@ -163,7 +163,8 @@
"footer": {
"backend": "API",
"frontend": "Webseite",
"imprint": "Impressum"
"imprint": "Impressum",
"privacy": "Datenschutz"
},
"general": {
"days": "Tage",

View File

@ -163,7 +163,8 @@
"footer": {
"backend": "Website",
"frontend": "API",
"imprint": "Imprint"
"imprint": "Imprint",
"privacy": "Privacy"
},
"general": {
"days": "Days",