From 80cd9ee2afd6de91529cc6ad2b4dac1a1741e66c Mon Sep 17 00:00:00 2001 From: "Felix T.J. Dietrich" Date: Wed, 20 Nov 2024 20:02:24 +0100 Subject: [PATCH] Add privacy statement (#184) --- webapp/Dockerfile | 3 ++- webapp/src/app/app.component.ts | 3 +-- webapp/src/app/app.routes.ts | 6 ++++-- webapp/src/app/core/footer/footer.component.html | 3 +++ .../app/legal/{imprint => }/imprint.component.ts | 0 webapp/src/app/legal/privacy.component.ts | 16 ++++++++++++++++ webapp/src/environments/environment.prod.ts | 3 ++- webapp/src/environments/environment.ts | 3 ++- webapp/src/styles.css | 1 + 9 files changed, 31 insertions(+), 7 deletions(-) rename webapp/src/app/legal/{imprint => }/imprint.component.ts (100%) create mode 100644 webapp/src/app/legal/privacy.component.ts diff --git a/webapp/Dockerfile b/webapp/Dockerfile index 1165c4af..2b45d02b 100644 --- a/webapp/Dockerfile +++ b/webapp/Dockerfile @@ -37,7 +37,8 @@ export const environment = { domains: '${UMAMI_DOMAINS}' }, legal: { - imprintHtml: '${LEGAL_IMPRINT_HTML}' + imprintHtml: '${LEGAL_IMPRINT_HTML}', + privacyHtml: '${LEGAL_PRIVACY_HTML}' } }; EOF diff --git a/webapp/src/app/app.component.ts b/webapp/src/app/app.component.ts index 9ef285e4..28fb1a29 100644 --- a/webapp/src/app/app.component.ts +++ b/webapp/src/app/app.component.ts @@ -8,8 +8,7 @@ import { FooterComponent } from './core/footer/footer.component'; selector: 'app-root', standalone: true, imports: [RouterOutlet, RouterLink, RouterLinkActive, AngularQueryDevtools, HeaderComponent, FooterComponent], - templateUrl: './app.component.html', - styles: [] + templateUrl: './app.component.html' }) export class AppComponent { title = 'Hephaestus'; diff --git a/webapp/src/app/app.routes.ts b/webapp/src/app/app.routes.ts index 14889f4a..9840c339 100644 --- a/webapp/src/app/app.routes.ts +++ b/webapp/src/app/app.routes.ts @@ -5,7 +5,8 @@ import { AdminComponent } from '@app/admin/admin.component'; import { AdminGuard } from '@app/core/security/admin.guard'; import { UserProfileComponent } from '@app/user/user-profile.component'; import { SettingsComponent } from '@app/settings/settings.component'; -import { ImprintComponent } from '@app/legal/imprint/imprint.component'; +import { ImprintComponent } from '@app/legal/imprint.component'; +import { PrivacyComponent } from '@app/legal/privacy.component'; export const routes: Routes = [ { path: '', component: HomeComponent }, @@ -17,5 +18,6 @@ export const routes: Routes = [ }, { path: 'user/:id', component: UserProfileComponent }, { path: 'settings', component: SettingsComponent }, - { path: 'imprint', component: ImprintComponent } + { path: 'imprint', component: ImprintComponent }, + { path: 'privacy', component: PrivacyComponent } ]; diff --git a/webapp/src/app/core/footer/footer.component.html b/webapp/src/app/core/footer/footer.component.html index caa682ec..c2ee280f 100644 --- a/webapp/src/app/core/footer/footer.component.html +++ b/webapp/src/app/core/footer/footer.component.html @@ -3,6 +3,9 @@

About

+

+ Privacy +

Imprint

diff --git a/webapp/src/app/legal/imprint/imprint.component.ts b/webapp/src/app/legal/imprint.component.ts similarity index 100% rename from webapp/src/app/legal/imprint/imprint.component.ts rename to webapp/src/app/legal/imprint.component.ts diff --git a/webapp/src/app/legal/privacy.component.ts b/webapp/src/app/legal/privacy.component.ts new file mode 100644 index 00000000..18a1d61b --- /dev/null +++ b/webapp/src/app/legal/privacy.component.ts @@ -0,0 +1,16 @@ +import { Component } from '@angular/core'; +import { environment } from 'environments/environment'; + +@Component({ + selector: 'app-privacy', + standalone: true, + template: ` +
+

Privacy

+
+
+ ` +}) +export class PrivacyComponent { + imprintHtml = environment.legal.privacyHtml; +} diff --git a/webapp/src/environments/environment.prod.ts b/webapp/src/environments/environment.prod.ts index e4679dd2..c7e2ad97 100644 --- a/webapp/src/environments/environment.prod.ts +++ b/webapp/src/environments/environment.prod.ts @@ -14,6 +14,7 @@ export const environment = { domains: '' }, legal: { - imprintHtml: '

This is the imprint.

' + imprintHtml: '

This is the imprint.

', + privacyHtml: '

This is the privacy policy.

' } }; diff --git a/webapp/src/environments/environment.ts b/webapp/src/environments/environment.ts index acd528ad..2ab91771 100644 --- a/webapp/src/environments/environment.ts +++ b/webapp/src/environments/environment.ts @@ -14,6 +14,7 @@ export const environment = { domains: '' }, legal: { - imprintHtml: '

This is the imprint.

' + imprintHtml: '

This is the imprint.

', + privacyHtml: '

This is the privacy policy.

' } }; diff --git a/webapp/src/styles.css b/webapp/src/styles.css index ff8c2fde..e922cf09 100644 --- a/webapp/src/styles.css +++ b/webapp/src/styles.css @@ -4,6 +4,7 @@ /* Material CDK */ @import '@angular/cdk/overlay-prebuilt.css'; +@import '@angular/cdk/a11y-prebuilt.css'; @tailwind base; @tailwind components;