From f8b2c1b4f509c037b9650cca2c5befd21f056df3 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 19 Dec 2018 16:04:34 +0100 Subject: Refractor notification service Shorter name and use primeng component --- client/src/app/videos/+video-edit/video-update.component.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'client/src/app/videos/+video-edit/video-update.component.ts') diff --git a/client/src/app/videos/+video-edit/video-update.component.ts b/client/src/app/videos/+video-edit/video-update.component.ts index d99a02b18..d22ee540a 100644 --- a/client/src/app/videos/+video-edit/video-update.component.ts +++ b/client/src/app/videos/+video-edit/video-update.component.ts @@ -2,7 +2,7 @@ import { map, switchMap } from 'rxjs/operators' import { Component, OnInit } from '@angular/core' import { ActivatedRoute, Router } from '@angular/router' import { LoadingBarService } from '@ngx-loading-bar/core' -import { NotificationsService } from 'angular2-notifications' +import { Notifier } from '@app/core' import { VideoConstant, VideoPrivacy } from '../../../../../shared/models/videos' import { ServerService } from '../../core' import { FormReactive } from '../../shared' @@ -35,7 +35,7 @@ export class VideoUpdateComponent extends FormReactive implements OnInit { protected formValidatorService: FormValidatorService, private route: ActivatedRoute, private router: Router, - private notificationsService: NotificationsService, + private notifier: Notifier, private serverService: ServerService, private videoService: VideoService, private loadingBar: LoadingBarService, @@ -78,7 +78,7 @@ export class VideoUpdateComponent extends FormReactive implements OnInit { err => { console.error(err) - this.notificationsService.error(this.i18n('Error'), err.message) + this.notifier.error(err.message) } ) } @@ -121,14 +121,14 @@ export class VideoUpdateComponent extends FormReactive implements OnInit { this.updateDone = true this.isUpdatingVideo = false this.loadingBar.complete() - this.notificationsService.success(this.i18n('Success'), this.i18n('Video updated.')) + this.notifier.success(this.i18n('Video updated.')) this.router.navigate([ '/videos/watch', this.video.uuid ]) }, err => { this.loadingBar.complete() this.isUpdatingVideo = false - this.notificationsService.error(this.i18n('Error'), err.message) + this.notifier.error(err.message) console.error(err) } ) -- cgit v1.2.3