From bafa46bb244f14c418d92783ca7d85cc7c5716c2 Mon Sep 17 00:00:00 2001 From: Giuseppe Digilio Date: Mon, 7 May 2018 15:49:03 +0200 Subject: [PATCH] Adjusted CSS and added default notification options in the environment config files --- config/environment.default.js | 7 ++- src/app/app.module.ts | 1 - .../notification/notification.component.html | 39 +++++++------- .../notification/notification.component.scss | 52 +++++++------------ .../notifications-board.component.html | 2 +- .../notifications-board.component.scss | 24 +++++---- .../notifications-board.component.ts | 8 +-- .../notifications/notifications.service.ts | 21 +++++--- src/config/notifications-config.interfaces.ts | 4 ++ 9 files changed, 82 insertions(+), 76 deletions(-) diff --git a/config/environment.default.js b/config/environment.default.js index bb0ac12680..25684402f2 100644 --- a/config/environment.default.js +++ b/config/environment.default.js @@ -25,7 +25,12 @@ module.exports = { notifications: { rtl: false, position: ['top', 'right'], - maxStack: 8 + maxStack: 8, + // NOTE: after how many seconds notification is closed automatically. If set to zero notifications are not closed automatically + timeOut: 5000, // 5 second + clickToClose: true, + // NOTE: 'fade' | 'fromTop' | 'fromRight' | 'fromBottom' | 'fromLeft' | 'rotate' | 'scale' + animate: 'scale' }, // Angular Universal settings universal: { diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 12f003cab7..786ee4ebbf 100755 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -28,7 +28,6 @@ import { HeaderComponent } from './header/header.component'; import { PageNotFoundComponent } from './pagenotfound/pagenotfound.component'; import { DSpaceRouterStateSerializer } from './shared/ngrx/dspace-router-state-serializer'; -import { NotificationsService } from './shared/notifications/notifications.service'; import { NotificationsBoardComponent } from './shared/notifications/notifications-board/notifications-board.component'; import { NotificationComponent } from './shared/notifications/notification/notification.component'; diff --git a/src/app/shared/notifications/notification/notification.component.html b/src/app/shared/notifications/notification/notification.component.html index 5033da6e05..193c0d9749 100644 --- a/src/app/shared/notifications/notification/notification.component.html +++ b/src/app/shared/notifications/notification/notification.component.html @@ -1,57 +1,54 @@ -