aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/+video-edit/video-update.component.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-12-19 16:04:34 +0100
committerChocobozzz <me@florianbigard.com>2018-12-19 17:26:52 +0100
commitf8b2c1b4f509c037b9650cca2c5befd21f056df3 (patch)
tree89d278f9628d657e6aad1b1e15febaf8ff9fcfa9 /client/src/app/videos/+video-edit/video-update.component.ts
parente0e665f0efa98f2701dd9f5529e99989680481ae (diff)
downloadPeerTube-f8b2c1b4f509c037b9650cca2c5befd21f056df3.tar.gz
PeerTube-f8b2c1b4f509c037b9650cca2c5befd21f056df3.tar.zst
PeerTube-f8b2c1b4f509c037b9650cca2c5befd21f056df3.zip
Refractor notification service
Shorter name and use primeng component
Diffstat (limited to 'client/src/app/videos/+video-edit/video-update.component.ts')
-rw-r--r--client/src/app/videos/+video-edit/video-update.component.ts10
1 files changed, 5 insertions, 5 deletions
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'
2import { Component, OnInit } from '@angular/core' 2import { Component, OnInit } from '@angular/core'
3import { ActivatedRoute, Router } from '@angular/router' 3import { ActivatedRoute, Router } from '@angular/router'
4import { LoadingBarService } from '@ngx-loading-bar/core' 4import { LoadingBarService } from '@ngx-loading-bar/core'
5import { NotificationsService } from 'angular2-notifications' 5import { Notifier } from '@app/core'
6import { VideoConstant, VideoPrivacy } from '../../../../../shared/models/videos' 6import { VideoConstant, VideoPrivacy } from '../../../../../shared/models/videos'
7import { ServerService } from '../../core' 7import { ServerService } from '../../core'
8import { FormReactive } from '../../shared' 8import { FormReactive } from '../../shared'
@@ -35,7 +35,7 @@ export class VideoUpdateComponent extends FormReactive implements OnInit {
35 protected formValidatorService: FormValidatorService, 35 protected formValidatorService: FormValidatorService,
36 private route: ActivatedRoute, 36 private route: ActivatedRoute,
37 private router: Router, 37 private router: Router,
38 private notificationsService: NotificationsService, 38 private notifier: Notifier,
39 private serverService: ServerService, 39 private serverService: ServerService,
40 private videoService: VideoService, 40 private videoService: VideoService,
41 private loadingBar: LoadingBarService, 41 private loadingBar: LoadingBarService,
@@ -78,7 +78,7 @@ export class VideoUpdateComponent extends FormReactive implements OnInit {
78 78
79 err => { 79 err => {
80 console.error(err) 80 console.error(err)
81 this.notificationsService.error(this.i18n('Error'), err.message) 81 this.notifier.error(err.message)
82 } 82 }
83 ) 83 )
84 } 84 }
@@ -121,14 +121,14 @@ export class VideoUpdateComponent extends FormReactive implements OnInit {
121 this.updateDone = true 121 this.updateDone = true
122 this.isUpdatingVideo = false 122 this.isUpdatingVideo = false
123 this.loadingBar.complete() 123 this.loadingBar.complete()
124 this.notificationsService.success(this.i18n('Success'), this.i18n('Video updated.')) 124 this.notifier.success(this.i18n('Video updated.'))
125 this.router.navigate([ '/videos/watch', this.video.uuid ]) 125 this.router.navigate([ '/videos/watch', this.video.uuid ])
126 }, 126 },
127 127
128 err => { 128 err => {
129 this.loadingBar.complete() 129 this.loadingBar.complete()
130 this.isUpdatingVideo = false 130 this.isUpdatingVideo = false
131 this.notificationsService.error(this.i18n('Error'), err.message) 131 this.notifier.error(err.message)
132 console.error(err) 132 console.error(err)
133 } 133 }
134 ) 134 )