X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fapp.component.ts;h=8fdab0c409478d62469444eb7ac76e55dccbc952;hb=2c2befaacaa7063df0d4557b71c187ee168a8eb6;hp=a60138af9fc22f8d0edb4458376abe54de53f983;hpb=c3edc5b074aa4bb1861ed0a94d3713808e87170f;p=github%2FChocobozzz%2FPeerTube.git 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 import { MenuService } from './core/menu/menu.service' import { POP_STATE_MODAL_DISMISS } from './helpers' import { InstanceService } from './shared/shared-instance' +import { GlobalIconName } from './shared/shared-icons' @Component({ selector: 'my-app', @@ -150,6 +151,17 @@ export class AppComponent implements OnInit, AfterViewInit { this.screenService.isBroadcastMessageDisplayed = false } + getNotificationIcon (message: { severity: 'success' | 'error' | 'info' }): GlobalIconName { + switch (message.severity) { + case 'error': + return 'cross' + case 'success': + return 'tick' + case 'info': + return 'help' + } + } + private initRouteEvents () { const eventsObs = this.router.events