From 5facddcb5adada80caf4bad261f67ca6d4c9b110 Mon Sep 17 00:00:00 2001 From: Flo Date: Fri, 30 Aug 2024 21:35:28 +0000 Subject: [PATCH] intermediate commit --- src/app/app.component.html | 3 ++ .../core/components/home/home.component.html | 2 + .../core/components/home/home.component.ts | 12 ++++- .../navigation/navigation.component.html | 45 ++++++++++++++++--- .../notification-bar.component.html | 42 +++++++++++++++++ .../notification-bar.component.scss | 0 .../notification-bar.component.ts | 29 ++++++++++++ src/app/core/core.module.ts | 12 ++++- src/app/core/services/notification.service.ts | 13 ++++++ src/app/core/services/request.service.ts | 21 +++++---- src/styles.scss | 4 +- 11 files changed, 164 insertions(+), 19 deletions(-) create mode 100644 src/app/core/components/notification-bar/notification-bar.component.html create mode 100644 src/app/core/components/notification-bar/notification-bar.component.scss create mode 100644 src/app/core/components/notification-bar/notification-bar.component.ts create mode 100644 src/app/core/services/notification.service.ts diff --git a/src/app/app.component.html b/src/app/app.component.html index 0680b43..5051e59 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -1 +1,4 @@ +
+ +
diff --git a/src/app/core/components/home/home.component.html b/src/app/core/components/home/home.component.html index 4b8a0ee..35be8d2 100644 --- a/src/app/core/components/home/home.component.html +++ b/src/app/core/components/home/home.component.html @@ -1,5 +1,7 @@ + +
diff --git a/src/app/core/components/home/home.component.ts b/src/app/core/components/home/home.component.ts index be17790..7c8406c 100644 --- a/src/app/core/components/home/home.component.ts +++ b/src/app/core/components/home/home.component.ts @@ -1,8 +1,18 @@ import { Component } from "@angular/core"; +import { NotificationService } from "../../services/notification.service"; @Component({ selector: "app-home", templateUrl: "./home.component.html", styleUrls: ["./home.component.scss"], }) -export class HomeComponent {} +export class HomeComponent { + constructor(private notificationService: NotificationService) {} + + fehler() { + this.notificationService.push({ + message: "Ein Fehler ist aufgetreten :(", + type: "danger", + }); + } +} diff --git a/src/app/core/components/navigation/navigation.component.html b/src/app/core/components/navigation/navigation.component.html index 80355b0..f4bd01e 100644 --- a/src/app/core/components/navigation/navigation.component.html +++ b/src/app/core/components/navigation/navigation.component.html @@ -15,7 +15,7 @@ + + + + + + +