diff --git a/src/app/components/shared/footer/footer.component.ts b/src/app/components/shared/footer/footer.component.ts index 2f83eb10f7b600c5453d44b22466317e6236cc4d..a6606a90b2c30c9894e85b8f1f5790233c4cfbf8 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 ed66238e05c75a7bb9d8dba94addfa3737d294c8..e1f5adbebe0b50f10089ba5f8372b98537e321ea 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)); } }