diff --git a/src/app/pages/profile/profile.component.ts b/src/app/pages/profile/profile.component.ts index 3a13c04..ad1e845 100644 --- a/src/app/pages/profile/profile.component.ts +++ b/src/app/pages/profile/profile.component.ts @@ -65,7 +65,7 @@ export class ProfileComponent implements OnInit { .updateUser(user) .subscribe( data => { - this.snackBar.openSnackBar("Das Passwort wurde erfolgreich aktualisiert"); + this.snackBar.openSnackBar("Das Passwort wurde erfolgreich aktualisiert", "Ok"); console.log(JSON.stringify(data)); }, (error) => { diff --git a/src/app/services/snackbar.service.ts b/src/app/services/snackbar.service.ts index 7c7fcfa..f1e829a 100644 --- a/src/app/services/snackbar.service.ts +++ b/src/app/services/snackbar.service.ts @@ -12,7 +12,7 @@ export class SnackBarService { openSnackBar(message: string, action: string = "") { this.snackBar.open(message, action, { duration: 5000, - panelClass: ['mat-toolbar', 'mat-primary'] + panelClass: ['mat-toolbar', 'mat-primary', 'simple-snack-bar'] }); } } diff --git a/src/styles.scss b/src/styles.scss index 4396c37..63faf2f 100644 --- a/src/styles.scss +++ b/src/styles.scss @@ -20,4 +20,8 @@ h1:before { .mat-list-item-content { width: 100%; -} \ No newline at end of file +} + +.simple-snack-bar .mat-simple-snackbar { + justify-content: center; + } \ No newline at end of file