Added imprint and privacy urls
This commit is contained in:
parent
ff415c354d
commit
7be40ed236
@ -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>
|
@ -17,13 +17,18 @@ 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,
|
||||
private spinnerService: SpinnerService
|
||||
) { }
|
||||
) {}
|
||||
|
||||
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();
|
||||
|
@ -3,6 +3,8 @@ import { Theme } from '../view/theme';
|
||||
|
||||
export interface Appsettings {
|
||||
ApiURL: string;
|
||||
PrivacyURL: string;
|
||||
ImprintURL: string;
|
||||
WebVersion: SoftwareVersion;
|
||||
Themes: Theme[];
|
||||
}
|
@ -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!');
|
||||
|
@ -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",
|
||||
|
@ -163,7 +163,8 @@
|
||||
"footer": {
|
||||
"backend": "API",
|
||||
"frontend": "Webseite",
|
||||
"imprint": "Impressum"
|
||||
"imprint": "Impressum",
|
||||
"privacy": "Datenschutz"
|
||||
},
|
||||
"general": {
|
||||
"days": "Tage",
|
||||
|
@ -163,7 +163,8 @@
|
||||
"footer": {
|
||||
"backend": "Website",
|
||||
"frontend": "API",
|
||||
"imprint": "Imprint"
|
||||
"imprint": "Imprint",
|
||||
"privacy": "Privacy"
|
||||
},
|
||||
"general": {
|
||||
"days": "Days",
|
||||
|
Loading…
Reference in New Issue
Block a user