diff --git a/kdb-web/src/app/components/footer/footer.component.html b/kdb-web/src/app/components/footer/footer.component.html index 240f8583..9d0a7414 100644 --- a/kdb-web/src/app/components/footer/footer.component.html +++ b/kdb-web/src/app/components/footer/footer.component.html @@ -21,6 +21,8 @@
- \ No newline at end of file + diff --git a/kdb-web/src/app/components/footer/footer.component.ts b/kdb-web/src/app/components/footer/footer.component.ts index ae891bc6..d1c0d4a9 100644 --- a/kdb-web/src/app/components/footer/footer.component.ts +++ b/kdb-web/src/app/components/footer/footer.component.ts @@ -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(); diff --git a/kdb-web/src/app/models/config/appsettings.ts b/kdb-web/src/app/models/config/appsettings.ts index de434a03..f3f5796b 100644 --- a/kdb-web/src/app/models/config/appsettings.ts +++ b/kdb-web/src/app/models/config/appsettings.ts @@ -3,6 +3,8 @@ import { Theme } from '../view/theme'; export interface Appsettings { ApiURL: string; + PrivacyURL: string; + ImprintURL: string; WebVersion: SoftwareVersion; Themes: Theme[]; -} \ No newline at end of file +} diff --git a/kdb-web/src/app/services/settings/settings.service.ts b/kdb-web/src/app/services/settings/settings.service.ts index 52b8238b..81afc135 100644 --- a/kdb-web/src/app/services/settings/settings.service.ts +++ b/kdb-web/src/app/services/settings/settings.service.ts @@ -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!'); diff --git a/kdb-web/src/assets/config.json b/kdb-web/src/assets/config.json index 3847c4c1..cb6190e2 100644 --- a/kdb-web/src/assets/config.json +++ b/kdb-web/src/assets/config.json @@ -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", @@ -23,4 +25,4 @@ "Name": "sh-edraft-dark-theme" } ] -} \ No newline at end of file +} diff --git a/kdb-web/src/assets/i18n/de.json b/kdb-web/src/assets/i18n/de.json index 79234f3d..af34e987 100644 --- a/kdb-web/src/assets/i18n/de.json +++ b/kdb-web/src/assets/i18n/de.json @@ -163,7 +163,8 @@ "footer": { "backend": "API", "frontend": "Webseite", - "imprint": "Impressum" + "imprint": "Impressum", + "privacy": "Datenschutz" }, "general": { "days": "Tage", diff --git a/kdb-web/src/assets/i18n/en.json b/kdb-web/src/assets/i18n/en.json index 0eebcb6f..d8840535 100644 --- a/kdb-web/src/assets/i18n/en.json +++ b/kdb-web/src/assets/i18n/en.json @@ -163,7 +163,8 @@ "footer": { "backend": "Website", "frontend": "API", - "imprint": "Imprint" + "imprint": "Imprint", + "privacy": "Privacy" }, "general": { "days": "Days",