diff options
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.ts | 15 |
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' | |||
2 | import { Component, ElementRef, EventEmitter, OnDestroy, OnInit, Output, ViewChild } from '@angular/core' | 2 | import { Component, ElementRef, EventEmitter, OnDestroy, OnInit, Output, ViewChild } from '@angular/core' |
3 | import { Router } from '@angular/router' | 3 | import { Router } from '@angular/router' |
4 | import { LoadingBarService } from '@ngx-loading-bar/core' | 4 | import { LoadingBarService } from '@ngx-loading-bar/core' |
5 | import { NotificationsService } from 'angular2-notifications' | ||
6 | import { BytesPipe } from 'ngx-pipes' | 5 | import { BytesPipe } from 'ngx-pipes' |
7 | import { Subscription } from 'rxjs' | 6 | import { Subscription } from 'rxjs' |
8 | import { VideoPrivacy } from '../../../../../../shared/models/videos' | 7 | import { VideoPrivacy } from '../../../../../../shared/models/videos' |
9 | import { AuthService, ServerService } from '../../../core' | 8 | import { AuthService, Notifier, ServerService } from '../../../core' |
10 | import { VideoEdit } from '../../../shared/video/video-edit.model' | 9 | import { VideoEdit } from '../../../shared/video/video-edit.model' |
11 | import { VideoService } from '../../../shared/video/video.service' | 10 | import { VideoService } from '../../../shared/video/video.service' |
12 | import { I18n } from '@ngx-translate/i18n-polyfill' | 11 | import { 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 | ||