aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/+video-edit/video-add-components/video-upload.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/videos/+video-edit/video-add-components/video-upload.component.ts')
-rw-r--r--client/src/app/videos/+video-edit/video-add-components/video-upload.component.ts15
1 files changed, 7 insertions, 8 deletions
diff --git a/client/src/app/videos/+video-edit/video-add-components/video-upload.component.ts b/client/src/app/videos/+video-edit/video-add-components/video-upload.component.ts
index 2180e22ab..aa40f8781 100644
--- a/client/src/app/videos/+video-edit/video-add-components/video-upload.component.ts
+++ b/client/src/app/videos/+video-edit/video-add-components/video-upload.component.ts
@@ -2,11 +2,10 @@ import { HttpEventType, HttpResponse } from '@angular/common/http'
2import { Component, ElementRef, EventEmitter, OnDestroy, OnInit, Output, ViewChild } from '@angular/core' 2import { Component, ElementRef, EventEmitter, OnDestroy, OnInit, Output, ViewChild } from '@angular/core'
3import { Router } from '@angular/router' 3import { Router } from '@angular/router'
4import { LoadingBarService } from '@ngx-loading-bar/core' 4import { LoadingBarService } from '@ngx-loading-bar/core'
5import { NotificationsService } from 'angular2-notifications'
6import { BytesPipe } from 'ngx-pipes' 5import { BytesPipe } from 'ngx-pipes'
7import { Subscription } from 'rxjs' 6import { Subscription } from 'rxjs'
8import { VideoPrivacy } from '../../../../../../shared/models/videos' 7import { VideoPrivacy } from '../../../../../../shared/models/videos'
9import { AuthService, ServerService } from '../../../core' 8import { AuthService, Notifier, ServerService } from '../../../core'
10import { VideoEdit } from '../../../shared/video/video-edit.model' 9import { VideoEdit } from '../../../shared/video/video-edit.model'
11import { VideoService } from '../../../shared/video/video.service' 10import { VideoService } from '../../../shared/video/video.service'
12import { I18n } from '@ngx-translate/i18n-polyfill' 11import { I18n } from '@ngx-translate/i18n-polyfill'
@@ -53,7 +52,7 @@ export class VideoUploadComponent extends VideoSend implements OnInit, OnDestroy
53 constructor ( 52 constructor (
54 protected formValidatorService: FormValidatorService, 53 protected formValidatorService: FormValidatorService,
55 protected loadingBar: LoadingBarService, 54 protected loadingBar: LoadingBarService,
56 protected notificationsService: NotificationsService, 55 protected notifier: Notifier,
57 protected authService: AuthService, 56 protected authService: AuthService,
58 protected serverService: ServerService, 57 protected serverService: ServerService,
59 protected videoService: VideoService, 58 protected videoService: VideoService,
@@ -110,7 +109,7 @@ export class VideoUploadComponent extends VideoSend implements OnInit, OnDestroy
110 this.isUploadingVideo = false 109 this.isUploadingVideo = false
111 this.videoUploadPercents = 0 110 this.videoUploadPercents = 0
112 this.videoUploadObservable = null 111 this.videoUploadObservable = null
113 this.notificationsService.info(this.i18n('Info'), this.i18n('Upload cancelled')) 112 this.notifier.info(this.i18n('Upload cancelled'))
114 } 113 }
115 } 114 }
116 115
@@ -130,7 +129,7 @@ export class VideoUploadComponent extends VideoSend implements OnInit, OnDestroy
130 videoQuota: bytePipes.transform(videoQuota, 0) 129 videoQuota: bytePipes.transform(videoQuota, 0)
131 } 130 }
132 ) 131 )
133 this.notificationsService.error(this.i18n('Error'), msg) 132 this.notifier.error(msg)
134 return 133 return
135 } 134 }
136 135
@@ -145,7 +144,7 @@ export class VideoUploadComponent extends VideoSend implements OnInit, OnDestroy
145 quotaDaily: bytePipes.transform(videoQuotaDaily, 0) 144 quotaDaily: bytePipes.transform(videoQuotaDaily, 0)
146 } 145 }
147 ) 146 )
148 this.notificationsService.error(this.i18n('Error'), msg) 147 this.notifier.error(msg)
149 return 148 return
150 } 149 }
151 150
@@ -209,7 +208,7 @@ export class VideoUploadComponent extends VideoSend implements OnInit, OnDestroy
209 this.videoUploadPercents = 0 208 this.videoUploadPercents = 0
210 this.videoUploadObservable = null 209 this.videoUploadObservable = null
211 this.firstStepError.emit() 210 this.firstStepError.emit()
212 this.notificationsService.error(this.i18n('Error'), err.message) 211 this.notifier.error(err.message)
213 } 212 }
214 ) 213 )
215 } 214 }
@@ -238,7 +237,7 @@ export class VideoUploadComponent extends VideoSend implements OnInit, OnDestroy
238 this.isUpdatingVideo = false 237 this.isUpdatingVideo = false
239 this.isUploadingVideo = false 238 this.isUploadingVideo = false
240 239
241 this.notificationsService.success(this.i18n('Success'), this.i18n('Video published.')) 240 this.notifier.success(this.i18n('Video published.'))
242 this.router.navigate([ '/videos/watch', video.uuid ]) 241 this.router.navigate([ '/videos/watch', video.uuid ])
243 }, 242 },
244 243