From 0f7ec4000199478844f2ba18a401fa8a6fb3a044 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lukas=20Mau=C3=9F?= <lukas.mauss@mni.thm.de>
Date: Mon, 4 Mar 2019 18:49:19 +0100
Subject: [PATCH] Add notification to footer-buttons to confirm

---
 src/app/components/shared/footer/footer.component.ts | 5 +++--
 src/app/services/util/notification.service.ts        | 4 ++--
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/app/components/shared/footer/footer.component.ts b/src/app/components/shared/footer/footer.component.ts
index 2f83eb10f..a6606a90b 100644
--- a/src/app/components/shared/footer/footer.component.ts
+++ b/src/app/components/shared/footer/footer.component.ts
@@ -1,5 +1,4 @@
 import { Component, OnInit } from '@angular/core';
-import { AuthenticationService } from '../../../services/http/authentication.service';
 import { NotificationService } from '../../../services/util/notification.service';
 import { Router } from '@angular/router';
 import { MatDialog } from '@angular/material';
@@ -15,7 +14,6 @@ export class FooterComponent implements OnInit {
   dsgvoUrl = 'https://arsnova.thm.de/blog/datenschutzerklaerung/';
   imprUrl = 'https://arsnova.thm.de/blog/impressum/';
   constructor(
-    public authenticationService: AuthenticationService,
     public notificationService: NotificationService,
     public router: Router,
     public dialog: MatDialog
@@ -25,6 +23,9 @@ export class FooterComponent implements OnInit {
   }
 
   navToBlog() {
+    this.notificationService.show('Der Blog wird in einem neuen Fenster geöffnet', 'Okay!' , {
+      duration: 3000
+    });
     window.open(this.blogUrl, '_blank');
   }
   navToDSGVO() {
diff --git a/src/app/services/util/notification.service.ts b/src/app/services/util/notification.service.ts
index ed66238e0..e1f5adbeb 100644
--- a/src/app/services/util/notification.service.ts
+++ b/src/app/services/util/notification.service.ts
@@ -10,8 +10,8 @@ export class NotificationService {
   constructor(private snackBar: MatSnackBar) {
   }
 
-  show(message: string, config?: MatSnackBarConfig) {
+  show(message: string, action?: string, config?: MatSnackBarConfig) {
     // Delegate the message and merge the (optionally) passed config with the default config
-    this.snackBar.open(message, '', Object.assign({}, this.defaultConfig, config));
+    this.snackBar.open(message, action, Object.assign({}, this.defaultConfig, config));
   }
 }
-- 
GitLab