aboutsummaryrefslogtreecommitdiffhomepage
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/src/app/app.component.html4
-rw-r--r--client/src/app/app.component.ts12
-rw-r--r--client/src/sass/primeng-custom.scss8
3 files changed, 17 insertions, 7 deletions
diff --git a/client/src/app/app.component.html b/client/src/app/app.component.html
index 6969329e8..629c04e6b 100644
--- a/client/src/app/app.component.html
+++ b/client/src/app/app.component.html
@@ -53,9 +53,7 @@
53 <p>{{ message.detail }}</p> 53 <p>{{ message.detail }}</p>
54 </div> 54 </div>
55 55
56 <span *ngIf="message.severity === 'success'" class="glyphicon glyphicon-ok"></span> 56 <my-global-icon [iconName]="getNotificationIcon(message)"></my-global-icon>
57 <span *ngIf="message.severity === 'info'" class="glyphicon glyphicon-info-sign"></span>
58 <span *ngIf="message.severity === 'error'" class="glyphicon glyphicon-remove"></span>
59 </div> 57 </div>
60 </ng-template> 58 </ng-template>
61</p-toast> 59</p-toast>
diff --git a/client/src/app/app.component.ts b/client/src/app/app.component.ts
index a60138af9..8fdab0c40 100644
--- a/client/src/app/app.component.ts
+++ b/client/src/app/app.component.ts
@@ -31,6 +31,7 @@ import { BroadcastMessageLevel, HTMLServerConfig, UserRole } from '@shared/model
31import { MenuService } from './core/menu/menu.service' 31import { MenuService } from './core/menu/menu.service'
32import { POP_STATE_MODAL_DISMISS } from './helpers' 32import { POP_STATE_MODAL_DISMISS } from './helpers'
33import { InstanceService } from './shared/shared-instance' 33import { InstanceService } from './shared/shared-instance'
34import { GlobalIconName } from './shared/shared-icons'
34 35
35@Component({ 36@Component({
36 selector: 'my-app', 37 selector: 'my-app',
@@ -150,6 +151,17 @@ export class AppComponent implements OnInit, AfterViewInit {
150 this.screenService.isBroadcastMessageDisplayed = false 151 this.screenService.isBroadcastMessageDisplayed = false
151 } 152 }
152 153
154 getNotificationIcon (message: { severity: 'success' | 'error' | 'info' }): GlobalIconName {
155 switch (message.severity) {
156 case 'error':
157 return 'cross'
158 case 'success':
159 return 'tick'
160 case 'info':
161 return 'help'
162 }
163 }
164
153 private initRouteEvents () { 165 private initRouteEvents () {
154 const eventsObs = this.router.events 166 const eventsObs = this.router.events
155 167
diff --git a/client/src/sass/primeng-custom.scss b/client/src/sass/primeng-custom.scss
index a66e4485b..ef117ae34 100644
--- a/client/src/sass/primeng-custom.scss
+++ b/client/src/sass/primeng-custom.scss
@@ -927,19 +927,19 @@ p-toast {
927 box-shadow: 0 2px 12px 0 rgba(0, 0 , 0, .1); 927 box-shadow: 0 2px 12px 0 rgba(0, 0 , 0, .1);
928 overflow: hidden; 928 overflow: hidden;
929 929
930 &.p-toast-message-success .glyphicon { 930 &.p-toast-message-success my-global-icon {
931 color: #8BC34A !important; 931 color: #8BC34A !important;
932 } 932 }
933 933
934 &.p-toast-message-error .glyphicon { 934 &.p-toast-message-error my-global-icon {
935 color: #F44336 !important; 935 color: #F44336 !important;
936 } 936 }
937 937
938 &.p-toast-message-warn .glyphicon { 938 &.p-toast-message-warn my-global-icon {
939 color: #F1680D !important; 939 color: #F1680D !important;
940 } 940 }
941 941
942 &.p-toast-message-info .glyphicon { 942 &.p-toast-message-info my-global-icon {
943 color: #03A9F4 !important; 943 color: #03A9F4 !important;
944 } 944 }
945 945