diff options
Diffstat (limited to 'client/src/app/videos')
18 files changed, 70 insertions, 87 deletions
diff --git a/client/src/app/videos/+video-edit/shared/video-edit.component.ts b/client/src/app/videos/+video-edit/shared/video-edit.component.ts index 1d35b4ba8..85e015901 100644 --- a/client/src/app/videos/+video-edit/shared/video-edit.component.ts +++ b/client/src/app/videos/+video-edit/shared/video-edit.component.ts | |||
@@ -2,7 +2,7 @@ import { Component, Input, OnDestroy, OnInit, ViewChild } from '@angular/core' | |||
2 | import { FormArray, FormControl, FormGroup, ValidatorFn, Validators } from '@angular/forms' | 2 | import { FormArray, FormControl, FormGroup, ValidatorFn, Validators } from '@angular/forms' |
3 | import { ActivatedRoute, Router } from '@angular/router' | 3 | import { ActivatedRoute, Router } from '@angular/router' |
4 | import { FormReactiveValidationMessages, VideoValidatorsService } from '@app/shared' | 4 | import { FormReactiveValidationMessages, VideoValidatorsService } from '@app/shared' |
5 | import { NotificationsService } from 'angular2-notifications' | 5 | import { Notifier } from '@app/core' |
6 | import { ServerService } from '../../../core/server' | 6 | import { ServerService } from '../../../core/server' |
7 | import { VideoEdit } from '../../../shared/video/video-edit.model' | 7 | import { VideoEdit } from '../../../shared/video/video-edit.model' |
8 | import { map } from 'rxjs/operators' | 8 | import { map } from 'rxjs/operators' |
@@ -59,7 +59,7 @@ export class VideoEditComponent implements OnInit, OnDestroy { | |||
59 | private videoCaptionService: VideoCaptionService, | 59 | private videoCaptionService: VideoCaptionService, |
60 | private route: ActivatedRoute, | 60 | private route: ActivatedRoute, |
61 | private router: Router, | 61 | private router: Router, |
62 | private notificationsService: NotificationsService, | 62 | private notifier: Notifier, |
63 | private serverService: ServerService, | 63 | private serverService: ServerService, |
64 | private i18nPrimengCalendarService: I18nPrimengCalendarService | 64 | private i18nPrimengCalendarService: I18nPrimengCalendarService |
65 | ) { | 65 | ) { |
diff --git a/client/src/app/videos/+video-edit/video-add-components/video-import-torrent.component.ts b/client/src/app/videos/+video-edit/video-add-components/video-import-torrent.component.ts index 13776ae36..63db06919 100644 --- a/client/src/app/videos/+video-edit/video-add-components/video-import-torrent.component.ts +++ b/client/src/app/videos/+video-edit/video-add-components/video-import-torrent.component.ts | |||
@@ -1,8 +1,7 @@ | |||
1 | import { Component, ElementRef, EventEmitter, OnInit, Output, ViewChild } from '@angular/core' | 1 | import { Component, ElementRef, EventEmitter, OnInit, Output, ViewChild } from '@angular/core' |
2 | import { Router } from '@angular/router' | 2 | import { Router } from '@angular/router' |
3 | import { NotificationsService } from 'angular2-notifications' | ||
4 | import { VideoPrivacy, VideoUpdate } from '../../../../../../shared/models/videos' | 3 | import { VideoPrivacy, VideoUpdate } from '../../../../../../shared/models/videos' |
5 | import { AuthService, ServerService } from '../../../core' | 4 | import { AuthService, Notifier, ServerService } from '../../../core' |
6 | import { VideoService } from '../../../shared/video/video.service' | 5 | import { VideoService } from '../../../shared/video/video.service' |
7 | import { I18n } from '@ngx-translate/i18n-polyfill' | 6 | import { I18n } from '@ngx-translate/i18n-polyfill' |
8 | import { LoadingBarService } from '@ngx-loading-bar/core' | 7 | import { LoadingBarService } from '@ngx-loading-bar/core' |
@@ -41,7 +40,7 @@ export class VideoImportTorrentComponent extends VideoSend implements OnInit, Ca | |||
41 | constructor ( | 40 | constructor ( |
42 | protected formValidatorService: FormValidatorService, | 41 | protected formValidatorService: FormValidatorService, |
43 | protected loadingBar: LoadingBarService, | 42 | protected loadingBar: LoadingBarService, |
44 | protected notificationsService: NotificationsService, | 43 | protected notifier: Notifier, |
45 | protected authService: AuthService, | 44 | protected authService: AuthService, |
46 | protected serverService: ServerService, | 45 | protected serverService: ServerService, |
47 | protected videoService: VideoService, | 46 | protected videoService: VideoService, |
@@ -107,7 +106,7 @@ export class VideoImportTorrentComponent extends VideoSend implements OnInit, Ca | |||
107 | this.loadingBar.complete() | 106 | this.loadingBar.complete() |
108 | this.isImportingVideo = false | 107 | this.isImportingVideo = false |
109 | this.firstStepError.emit() | 108 | this.firstStepError.emit() |
110 | this.notificationsService.error(this.i18n('Error'), err.message) | 109 | this.notifier.error(err.message) |
111 | } | 110 | } |
112 | ) | 111 | ) |
113 | } | 112 | } |
@@ -126,7 +125,7 @@ export class VideoImportTorrentComponent extends VideoSend implements OnInit, Ca | |||
126 | .subscribe( | 125 | .subscribe( |
127 | () => { | 126 | () => { |
128 | this.isUpdatingVideo = false | 127 | this.isUpdatingVideo = false |
129 | this.notificationsService.success(this.i18n('Success'), this.i18n('Video to import updated.')) | 128 | this.notifier.success(this.i18n('Video to import updated.')) |
130 | 129 | ||
131 | this.router.navigate([ '/my-account', 'video-imports' ]) | 130 | this.router.navigate([ '/my-account', 'video-imports' ]) |
132 | }, | 131 | }, |
diff --git a/client/src/app/videos/+video-edit/video-add-components/video-import-url.component.ts b/client/src/app/videos/+video-edit/video-add-components/video-import-url.component.ts index 9cdface75..a1810b7a0 100644 --- a/client/src/app/videos/+video-edit/video-add-components/video-import-url.component.ts +++ b/client/src/app/videos/+video-edit/video-add-components/video-import-url.component.ts | |||
@@ -1,8 +1,7 @@ | |||
1 | import { Component, EventEmitter, OnInit, Output } from '@angular/core' | 1 | import { Component, EventEmitter, OnInit, Output } from '@angular/core' |
2 | import { Router } from '@angular/router' | 2 | import { Router } from '@angular/router' |
3 | import { NotificationsService } from 'angular2-notifications' | ||
4 | import { VideoPrivacy, VideoUpdate } from '../../../../../../shared/models/videos' | 3 | import { VideoPrivacy, VideoUpdate } from '../../../../../../shared/models/videos' |
5 | import { AuthService, ServerService } from '../../../core' | 4 | import { AuthService, Notifier, ServerService } from '../../../core' |
6 | import { VideoService } from '../../../shared/video/video.service' | 5 | import { VideoService } from '../../../shared/video/video.service' |
7 | import { I18n } from '@ngx-translate/i18n-polyfill' | 6 | import { I18n } from '@ngx-translate/i18n-polyfill' |
8 | import { LoadingBarService } from '@ngx-loading-bar/core' | 7 | import { LoadingBarService } from '@ngx-loading-bar/core' |
@@ -40,7 +39,7 @@ export class VideoImportUrlComponent extends VideoSend implements OnInit, CanCom | |||
40 | constructor ( | 39 | constructor ( |
41 | protected formValidatorService: FormValidatorService, | 40 | protected formValidatorService: FormValidatorService, |
42 | protected loadingBar: LoadingBarService, | 41 | protected loadingBar: LoadingBarService, |
43 | protected notificationsService: NotificationsService, | 42 | protected notifier: Notifier, |
44 | protected authService: AuthService, | 43 | protected authService: AuthService, |
45 | protected serverService: ServerService, | 44 | protected serverService: ServerService, |
46 | protected videoService: VideoService, | 45 | protected videoService: VideoService, |
@@ -99,7 +98,7 @@ export class VideoImportUrlComponent extends VideoSend implements OnInit, CanCom | |||
99 | this.loadingBar.complete() | 98 | this.loadingBar.complete() |
100 | this.isImportingVideo = false | 99 | this.isImportingVideo = false |
101 | this.firstStepError.emit() | 100 | this.firstStepError.emit() |
102 | this.notificationsService.error(this.i18n('Error'), err.message) | 101 | this.notifier.error(err.message) |
103 | } | 102 | } |
104 | ) | 103 | ) |
105 | } | 104 | } |
@@ -118,7 +117,7 @@ export class VideoImportUrlComponent extends VideoSend implements OnInit, CanCom | |||
118 | .subscribe( | 117 | .subscribe( |
119 | () => { | 118 | () => { |
120 | this.isUpdatingVideo = false | 119 | this.isUpdatingVideo = false |
121 | this.notificationsService.success(this.i18n('Success'), this.i18n('Video to import updated.')) | 120 | this.notifier.success(this.i18n('Video to import updated.')) |
122 | 121 | ||
123 | this.router.navigate([ '/my-account', 'video-imports' ]) | 122 | this.router.navigate([ '/my-account', 'video-imports' ]) |
124 | }, | 123 | }, |
diff --git a/client/src/app/videos/+video-edit/video-add-components/video-send.ts b/client/src/app/videos/+video-edit/video-add-components/video-send.ts index 71d2544d8..580c123a0 100644 --- a/client/src/app/videos/+video-edit/video-add-components/video-send.ts +++ b/client/src/app/videos/+video-edit/video-add-components/video-send.ts | |||
@@ -1,10 +1,9 @@ | |||
1 | import { EventEmitter, OnInit } from '@angular/core' | 1 | import { EventEmitter, OnInit } from '@angular/core' |
2 | import { LoadingBarService } from '@ngx-loading-bar/core' | 2 | import { LoadingBarService } from '@ngx-loading-bar/core' |
3 | import { NotificationsService } from 'angular2-notifications' | 3 | import { AuthService, Notifier, ServerService } from '@app/core' |
4 | import { catchError, switchMap, tap } from 'rxjs/operators' | 4 | import { catchError, switchMap, tap } from 'rxjs/operators' |
5 | import { FormReactive } from '@app/shared' | 5 | import { FormReactive } from '@app/shared' |
6 | import { VideoConstant, VideoPrivacy } from '../../../../../../shared' | 6 | import { VideoConstant, VideoPrivacy } from '../../../../../../shared' |
7 | import { AuthService, ServerService } from '@app/core' | ||
8 | import { VideoService } from '@app/shared/video/video.service' | 7 | import { VideoService } from '@app/shared/video/video.service' |
9 | import { VideoCaptionEdit } from '@app/shared/video-caption/video-caption-edit.model' | 8 | import { VideoCaptionEdit } from '@app/shared/video-caption/video-caption-edit.model' |
10 | import { VideoCaptionService } from '@app/shared/video-caption' | 9 | import { VideoCaptionService } from '@app/shared/video-caption' |
@@ -25,7 +24,7 @@ export abstract class VideoSend extends FormReactive implements OnInit { | |||
25 | protected abstract readonly DEFAULT_VIDEO_PRIVACY: VideoPrivacy | 24 | protected abstract readonly DEFAULT_VIDEO_PRIVACY: VideoPrivacy |
26 | 25 | ||
27 | protected loadingBar: LoadingBarService | 26 | protected loadingBar: LoadingBarService |
28 | protected notificationsService: NotificationsService | 27 | protected notifier: Notifier |
29 | protected authService: AuthService | 28 | protected authService: AuthService |
30 | protected serverService: ServerService | 29 | protected serverService: ServerService |
31 | protected videoService: VideoService | 30 | protected videoService: VideoService |
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 | ||
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' | |||
2 | import { Component, OnInit } from '@angular/core' | 2 | import { Component, OnInit } from '@angular/core' |
3 | import { ActivatedRoute, Router } from '@angular/router' | 3 | import { ActivatedRoute, 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' | 5 | import { Notifier } from '@app/core' |
6 | import { VideoConstant, VideoPrivacy } from '../../../../../shared/models/videos' | 6 | import { VideoConstant, VideoPrivacy } from '../../../../../shared/models/videos' |
7 | import { ServerService } from '../../core' | 7 | import { ServerService } from '../../core' |
8 | import { FormReactive } from '../../shared' | 8 | import { 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 | ) |
diff --git a/client/src/app/videos/+video-watch/comment/video-comment-add.component.ts b/client/src/app/videos/+video-watch/comment/video-comment-add.component.ts index 7f582c950..6b7e62042 100644 --- a/client/src/app/videos/+video-watch/comment/video-comment-add.component.ts +++ b/client/src/app/videos/+video-watch/comment/video-comment-add.component.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { Component, ElementRef, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core' | 1 | import { Component, ElementRef, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core' |
2 | import { Router } from '@angular/router' | 2 | import { Router } from '@angular/router' |
3 | import { NotificationsService } from 'angular2-notifications' | 3 | import { Notifier } from '@app/core' |
4 | import { Observable } from 'rxjs' | 4 | import { Observable } from 'rxjs' |
5 | import { VideoCommentCreate } from '../../../../../../shared/models/videos/video-comment.model' | 5 | import { VideoCommentCreate } from '../../../../../../shared/models/videos/video-comment.model' |
6 | import { FormReactive } from '../../../shared' | 6 | import { FormReactive } from '../../../shared' |
@@ -36,7 +36,7 @@ export class VideoCommentAddComponent extends FormReactive implements OnInit { | |||
36 | constructor ( | 36 | constructor ( |
37 | protected formValidatorService: FormValidatorService, | 37 | protected formValidatorService: FormValidatorService, |
38 | private videoCommentValidatorsService: VideoCommentValidatorsService, | 38 | private videoCommentValidatorsService: VideoCommentValidatorsService, |
39 | private notificationsService: NotificationsService, | 39 | private notifier: Notifier, |
40 | private videoCommentService: VideoCommentService, | 40 | private videoCommentService: VideoCommentService, |
41 | private authService: AuthService, | 41 | private authService: AuthService, |
42 | private modalService: NgbModal, | 42 | private modalService: NgbModal, |
@@ -115,7 +115,7 @@ export class VideoCommentAddComponent extends FormReactive implements OnInit { | |||
115 | err => { | 115 | err => { |
116 | this.addingComment = false | 116 | this.addingComment = false |
117 | 117 | ||
118 | this.notificationsService.error(this.i18n('Error'), err.text) | 118 | this.notifier.error(err.text) |
119 | } | 119 | } |
120 | ) | 120 | ) |
121 | } | 121 | } |
diff --git a/client/src/app/videos/+video-watch/comment/video-comments.component.ts b/client/src/app/videos/+video-watch/comment/video-comments.component.ts index 8850eccd8..957c17bbf 100644 --- a/client/src/app/videos/+video-watch/comment/video-comments.component.ts +++ b/client/src/app/videos/+video-watch/comment/video-comments.component.ts | |||
@@ -1,7 +1,6 @@ | |||
1 | import { Component, Input, OnChanges, OnDestroy, OnInit, SimpleChanges, ViewChild, ElementRef } from '@angular/core' | 1 | import { Component, ElementRef, Input, OnChanges, OnDestroy, OnInit, SimpleChanges, ViewChild } from '@angular/core' |
2 | import { ActivatedRoute } from '@angular/router' | 2 | import { ActivatedRoute } from '@angular/router' |
3 | import { ConfirmService } from '@app/core' | 3 | import { ConfirmService, Notifier } from '@app/core' |
4 | import { NotificationsService } from 'angular2-notifications' | ||
5 | import { Subscription } from 'rxjs' | 4 | import { Subscription } from 'rxjs' |
6 | import { VideoCommentThreadTree } from '../../../../../../shared/models/videos/video-comment.model' | 5 | import { VideoCommentThreadTree } from '../../../../../../shared/models/videos/video-comment.model' |
7 | import { AuthService } from '../../../core/auth' | 6 | import { AuthService } from '../../../core/auth' |
@@ -42,7 +41,7 @@ export class VideoCommentsComponent implements OnInit, OnChanges, OnDestroy { | |||
42 | 41 | ||
43 | constructor ( | 42 | constructor ( |
44 | private authService: AuthService, | 43 | private authService: AuthService, |
45 | private notificationsService: NotificationsService, | 44 | private notifier: Notifier, |
46 | private confirmService: ConfirmService, | 45 | private confirmService: ConfirmService, |
47 | private videoCommentService: VideoCommentService, | 46 | private videoCommentService: VideoCommentService, |
48 | private activatedRoute: ActivatedRoute, | 47 | private activatedRoute: ActivatedRoute, |
@@ -92,7 +91,7 @@ export class VideoCommentsComponent implements OnInit, OnChanges, OnDestroy { | |||
92 | } | 91 | } |
93 | }, | 92 | }, |
94 | 93 | ||
95 | err => this.notificationsService.error(this.i18n('Error'), err.message) | 94 | err => this.notifier.error(err.message) |
96 | ) | 95 | ) |
97 | } | 96 | } |
98 | 97 | ||
@@ -104,7 +103,7 @@ export class VideoCommentsComponent implements OnInit, OnChanges, OnDestroy { | |||
104 | this.componentPagination.totalItems = res.totalComments | 103 | this.componentPagination.totalItems = res.totalComments |
105 | }, | 104 | }, |
106 | 105 | ||
107 | err => this.notificationsService.error(this.i18n('Error'), err.message) | 106 | err => this.notifier.error(err.message) |
108 | ) | 107 | ) |
109 | } | 108 | } |
110 | 109 | ||
@@ -155,7 +154,7 @@ export class VideoCommentsComponent implements OnInit, OnChanges, OnDestroy { | |||
155 | if (this.highlightedThread.id === commentToDelete.id) this.highlightedThread = undefined | 154 | if (this.highlightedThread.id === commentToDelete.id) this.highlightedThread = undefined |
156 | }, | 155 | }, |
157 | 156 | ||
158 | err => this.notificationsService.error(this.i18n('Error'), err.message) | 157 | err => this.notifier.error(err.message) |
159 | ) | 158 | ) |
160 | } | 159 | } |
161 | 160 | ||
diff --git a/client/src/app/videos/+video-watch/modal/video-blacklist.component.ts b/client/src/app/videos/+video-watch/modal/video-blacklist.component.ts index 2c123ebed..357ce39ce 100644 --- a/client/src/app/videos/+video-watch/modal/video-blacklist.component.ts +++ b/client/src/app/videos/+video-watch/modal/video-blacklist.component.ts | |||
@@ -1,12 +1,11 @@ | |||
1 | import { Component, Input, OnInit, ViewChild } from '@angular/core' | 1 | import { Component, Input, OnInit, ViewChild } from '@angular/core' |
2 | import { NotificationsService } from 'angular2-notifications' | 2 | import { Notifier, RedirectService } from '@app/core' |
3 | import { FormReactive, VideoBlacklistService, VideoBlacklistValidatorsService } from '../../../shared/index' | 3 | import { FormReactive, VideoBlacklistService, VideoBlacklistValidatorsService } from '../../../shared/index' |
4 | import { VideoDetails } from '../../../shared/video/video-details.model' | 4 | import { VideoDetails } from '../../../shared/video/video-details.model' |
5 | import { I18n } from '@ngx-translate/i18n-polyfill' | 5 | import { I18n } from '@ngx-translate/i18n-polyfill' |
6 | import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service' | 6 | import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service' |
7 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' | 7 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' |
8 | import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref' | 8 | import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref' |
9 | import { RedirectService } from '@app/core' | ||
10 | 9 | ||
11 | @Component({ | 10 | @Component({ |
12 | selector: 'my-video-blacklist', | 11 | selector: 'my-video-blacklist', |
@@ -27,7 +26,7 @@ export class VideoBlacklistComponent extends FormReactive implements OnInit { | |||
27 | private modalService: NgbModal, | 26 | private modalService: NgbModal, |
28 | private videoBlacklistValidatorsService: VideoBlacklistValidatorsService, | 27 | private videoBlacklistValidatorsService: VideoBlacklistValidatorsService, |
29 | private videoBlacklistService: VideoBlacklistService, | 28 | private videoBlacklistService: VideoBlacklistService, |
30 | private notificationsService: NotificationsService, | 29 | private notifier: Notifier, |
31 | private redirectService: RedirectService, | 30 | private redirectService: RedirectService, |
32 | private i18n: I18n | 31 | private i18n: I18n |
33 | ) { | 32 | ) { |
@@ -55,12 +54,12 @@ export class VideoBlacklistComponent extends FormReactive implements OnInit { | |||
55 | this.videoBlacklistService.blacklistVideo(this.video.id, reason) | 54 | this.videoBlacklistService.blacklistVideo(this.video.id, reason) |
56 | .subscribe( | 55 | .subscribe( |
57 | () => { | 56 | () => { |
58 | this.notificationsService.success(this.i18n('Success'), this.i18n('Video blacklisted.')) | 57 | this.notifier.success(this.i18n('Video blacklisted.')) |
59 | this.hide() | 58 | this.hide() |
60 | this.redirectService.redirectToHomepage() | 59 | this.redirectService.redirectToHomepage() |
61 | }, | 60 | }, |
62 | 61 | ||
63 | err => this.notificationsService.error(this.i18n('Error'), err.message) | 62 | err => this.notifier.error(err.message) |
64 | ) | 63 | ) |
65 | } | 64 | } |
66 | } | 65 | } |
diff --git a/client/src/app/videos/+video-watch/modal/video-download.component.ts b/client/src/app/videos/+video-watch/modal/video-download.component.ts index b1b2c0623..834385771 100644 --- a/client/src/app/videos/+video-watch/modal/video-download.component.ts +++ b/client/src/app/videos/+video-watch/modal/video-download.component.ts | |||
@@ -2,7 +2,7 @@ import { Component, ElementRef, Input, OnInit, ViewChild } from '@angular/core' | |||
2 | import { VideoDetails } from '../../../shared/video/video-details.model' | 2 | import { VideoDetails } from '../../../shared/video/video-details.model' |
3 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' | 3 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' |
4 | import { I18n } from '@ngx-translate/i18n-polyfill' | 4 | import { I18n } from '@ngx-translate/i18n-polyfill' |
5 | import { NotificationsService } from 'angular2-notifications' | 5 | import { Notifier } from '@app/core' |
6 | 6 | ||
7 | @Component({ | 7 | @Component({ |
8 | selector: 'my-video-download', | 8 | selector: 'my-video-download', |
@@ -18,7 +18,7 @@ export class VideoDownloadComponent implements OnInit { | |||
18 | resolutionId: number | string = -1 | 18 | resolutionId: number | string = -1 |
19 | 19 | ||
20 | constructor ( | 20 | constructor ( |
21 | private notificationsService: NotificationsService, | 21 | private notifier: Notifier, |
22 | private modalService: NgbModal, | 22 | private modalService: NgbModal, |
23 | private i18n: I18n | 23 | private i18n: I18n |
24 | ) { } | 24 | ) { } |
@@ -63,6 +63,6 @@ export class VideoDownloadComponent implements OnInit { | |||
63 | } | 63 | } |
64 | 64 | ||
65 | activateCopiedMessage () { | 65 | activateCopiedMessage () { |
66 | this.notificationsService.success(this.i18n('Success'), this.i18n('Copied')) | 66 | this.notifier.success(this.i18n('Copied')) |
67 | } | 67 | } |
68 | } | 68 | } |
diff --git a/client/src/app/videos/+video-watch/modal/video-report.component.ts b/client/src/app/videos/+video-watch/modal/video-report.component.ts index 023387984..911f3b447 100644 --- a/client/src/app/videos/+video-watch/modal/video-report.component.ts +++ b/client/src/app/videos/+video-watch/modal/video-report.component.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { Component, Input, OnInit, ViewChild } from '@angular/core' | 1 | import { Component, Input, OnInit, ViewChild } from '@angular/core' |
2 | import { NotificationsService } from 'angular2-notifications' | 2 | import { Notifier } from '@app/core' |
3 | import { FormReactive, VideoAbuseService } from '../../../shared/index' | 3 | import { FormReactive, VideoAbuseService } from '../../../shared/index' |
4 | import { VideoDetails } from '../../../shared/video/video-details.model' | 4 | import { VideoDetails } from '../../../shared/video/video-details.model' |
5 | import { I18n } from '@ngx-translate/i18n-polyfill' | 5 | import { I18n } from '@ngx-translate/i18n-polyfill' |
@@ -27,7 +27,7 @@ export class VideoReportComponent extends FormReactive implements OnInit { | |||
27 | private modalService: NgbModal, | 27 | private modalService: NgbModal, |
28 | private videoAbuseValidatorsService: VideoAbuseValidatorsService, | 28 | private videoAbuseValidatorsService: VideoAbuseValidatorsService, |
29 | private videoAbuseService: VideoAbuseService, | 29 | private videoAbuseService: VideoAbuseService, |
30 | private notificationsService: NotificationsService, | 30 | private notifier: Notifier, |
31 | private i18n: I18n | 31 | private i18n: I18n |
32 | ) { | 32 | ) { |
33 | super() | 33 | super() |
@@ -66,11 +66,11 @@ export class VideoReportComponent extends FormReactive implements OnInit { | |||
66 | this.videoAbuseService.reportVideo(this.video.id, reason) | 66 | this.videoAbuseService.reportVideo(this.video.id, reason) |
67 | .subscribe( | 67 | .subscribe( |
68 | () => { | 68 | () => { |
69 | this.notificationsService.success(this.i18n('Success'), this.i18n('Video reported.')) | 69 | this.notifier.success(this.i18n('Video reported.')) |
70 | this.hide() | 70 | this.hide() |
71 | }, | 71 | }, |
72 | 72 | ||
73 | err => this.notificationsService.error(this.i18n('Error'), err.message) | 73 | err => this.notifier.error(err.message) |
74 | ) | 74 | ) |
75 | } | 75 | } |
76 | 76 | ||
diff --git a/client/src/app/videos/+video-watch/modal/video-share.component.ts b/client/src/app/videos/+video-watch/modal/video-share.component.ts index 17e2b31e1..c6205e355 100644 --- a/client/src/app/videos/+video-watch/modal/video-share.component.ts +++ b/client/src/app/videos/+video-watch/modal/video-share.component.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { Component, ElementRef, Input, ViewChild } from '@angular/core' | 1 | import { Component, ElementRef, Input, ViewChild } from '@angular/core' |
2 | import { NotificationsService } from 'angular2-notifications' | 2 | import { Notifier } from '@app/core' |
3 | import { VideoDetails } from '../../../shared/video/video-details.model' | 3 | import { VideoDetails } from '../../../shared/video/video-details.model' |
4 | import { buildVideoEmbed, buildVideoLink } from '../../../../assets/player/utils' | 4 | import { buildVideoEmbed, buildVideoLink } from '../../../../assets/player/utils' |
5 | import { I18n } from '@ngx-translate/i18n-polyfill' | 5 | import { I18n } from '@ngx-translate/i18n-polyfill' |
@@ -23,7 +23,7 @@ export class VideoShareComponent { | |||
23 | 23 | ||
24 | constructor ( | 24 | constructor ( |
25 | private modalService: NgbModal, | 25 | private modalService: NgbModal, |
26 | private notificationsService: NotificationsService, | 26 | private notifier: Notifier, |
27 | private i18n: I18n | 27 | private i18n: I18n |
28 | ) { } | 28 | ) { } |
29 | 29 | ||
@@ -49,7 +49,7 @@ export class VideoShareComponent { | |||
49 | } | 49 | } |
50 | 50 | ||
51 | activateCopiedMessage () { | 51 | activateCopiedMessage () { |
52 | this.notificationsService.success(this.i18n('Success'), this.i18n('Copied')) | 52 | this.notifier.success(this.i18n('Copied')) |
53 | } | 53 | } |
54 | 54 | ||
55 | getStartCheckboxLabel () { | 55 | getStartCheckboxLabel () { |
diff --git a/client/src/app/videos/+video-watch/video-watch.component.ts b/client/src/app/videos/+video-watch/video-watch.component.ts index ef0f685c6..7765c4660 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.ts +++ b/client/src/app/videos/+video-watch/video-watch.component.ts | |||
@@ -5,7 +5,7 @@ import { RedirectService } from '@app/core/routing/redirect.service' | |||
5 | import { peertubeLocalStorage } from '@app/shared/misc/peertube-local-storage' | 5 | import { peertubeLocalStorage } from '@app/shared/misc/peertube-local-storage' |
6 | import { VideoSupportComponent } from '@app/videos/+video-watch/modal/video-support.component' | 6 | import { VideoSupportComponent } from '@app/videos/+video-watch/modal/video-support.component' |
7 | import { MetaService } from '@ngx-meta/core' | 7 | import { MetaService } from '@ngx-meta/core' |
8 | import { NotificationsService } from 'angular2-notifications' | 8 | import { Notifier, ServerService } from '@app/core' |
9 | import { forkJoin, Subscription } from 'rxjs' | 9 | import { forkJoin, Subscription } from 'rxjs' |
10 | // FIXME: something weird with our path definition in tsconfig and typings | 10 | // FIXME: something weird with our path definition in tsconfig and typings |
11 | // @ts-ignore | 11 | // @ts-ignore |
@@ -13,7 +13,7 @@ import videojs from 'video.js' | |||
13 | import 'videojs-hotkeys' | 13 | import 'videojs-hotkeys' |
14 | import { Hotkey, HotkeysService } from 'angular2-hotkeys' | 14 | import { Hotkey, HotkeysService } from 'angular2-hotkeys' |
15 | import * as WebTorrent from 'webtorrent' | 15 | import * as WebTorrent from 'webtorrent' |
16 | import { UserVideoRateType, VideoCaption, VideoPrivacy, VideoRateType, VideoState } from '../../../../../shared' | 16 | import { UserVideoRateType, VideoCaption, VideoPrivacy, VideoState } from '../../../../../shared' |
17 | import '../../../assets/player/peertube-videojs-plugin' | 17 | import '../../../assets/player/peertube-videojs-plugin' |
18 | import { AuthService, ConfirmService } from '../../core' | 18 | import { AuthService, ConfirmService } from '../../core' |
19 | import { RestExtractor, VideoBlacklistService } from '../../shared' | 19 | import { RestExtractor, VideoBlacklistService } from '../../shared' |
@@ -26,7 +26,6 @@ import { VideoShareComponent } from './modal/video-share.component' | |||
26 | import { VideoBlacklistComponent } from './modal/video-blacklist.component' | 26 | import { VideoBlacklistComponent } from './modal/video-blacklist.component' |
27 | import { SubscribeButtonComponent } from '@app/shared/user-subscription/subscribe-button.component' | 27 | import { SubscribeButtonComponent } from '@app/shared/user-subscription/subscribe-button.component' |
28 | import { addContextMenu, getVideojsOptions, loadLocaleInVideoJS } from '../../../assets/player/peertube-player' | 28 | import { addContextMenu, getVideojsOptions, loadLocaleInVideoJS } from '../../../assets/player/peertube-player' |
29 | import { ServerService } from '@app/core' | ||
30 | import { I18n } from '@ngx-translate/i18n-polyfill' | 29 | import { I18n } from '@ngx-translate/i18n-polyfill' |
31 | import { environment } from '../../../environments/environment' | 30 | import { environment } from '../../../environments/environment' |
32 | import { getDevLocale, isOnDevLocale } from '@app/shared/i18n/i18n-utils' | 31 | import { getDevLocale, isOnDevLocale } from '@app/shared/i18n/i18n-utils' |
@@ -77,7 +76,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
77 | private authService: AuthService, | 76 | private authService: AuthService, |
78 | private serverService: ServerService, | 77 | private serverService: ServerService, |
79 | private restExtractor: RestExtractor, | 78 | private restExtractor: RestExtractor, |
80 | private notificationsService: NotificationsService, | 79 | private notifier: Notifier, |
81 | private markdownService: MarkdownService, | 80 | private markdownService: MarkdownService, |
82 | private zone: NgZone, | 81 | private zone: NgZone, |
83 | private redirectService: RedirectService, | 82 | private redirectService: RedirectService, |
@@ -205,7 +204,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
205 | 204 | ||
206 | error => { | 205 | error => { |
207 | this.descriptionLoading = false | 206 | this.descriptionLoading = false |
208 | this.notificationsService.error(this.i18n('Error'), error.message) | 207 | this.notifier.error(error.message) |
209 | } | 208 | } |
210 | ) | 209 | ) |
211 | } | 210 | } |
@@ -247,16 +246,13 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
247 | 246 | ||
248 | this.videoBlacklistService.removeVideoFromBlacklist(this.video.id).subscribe( | 247 | this.videoBlacklistService.removeVideoFromBlacklist(this.video.id).subscribe( |
249 | () => { | 248 | () => { |
250 | this.notificationsService.success( | 249 | this.notifier.success(this.i18n('Video {{name}} removed from the blacklist.', { name: this.video.name })) |
251 | this.i18n('Success'), | ||
252 | this.i18n('Video {{name}} removed from the blacklist.', { name: this.video.name }) | ||
253 | ) | ||
254 | 250 | ||
255 | this.video.blacklisted = false | 251 | this.video.blacklisted = false |
256 | this.video.blacklistedReason = null | 252 | this.video.blacklistedReason = null |
257 | }, | 253 | }, |
258 | 254 | ||
259 | err => this.notificationsService.error(this.i18n('Error'), err.message) | 255 | err => this.notifier.error(err.message) |
260 | ) | 256 | ) |
261 | } | 257 | } |
262 | 258 | ||
@@ -294,17 +290,14 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
294 | 290 | ||
295 | this.videoService.removeVideo(this.video.id) | 291 | this.videoService.removeVideo(this.video.id) |
296 | .subscribe( | 292 | .subscribe( |
297 | status => { | 293 | () => { |
298 | this.notificationsService.success( | 294 | this.notifier.success(this.i18n('Video {{videoName}} deleted.', { videoName: this.video.name })) |
299 | this.i18n('Success'), | ||
300 | this.i18n('Video {{videoName}} deleted.', { videoName: this.video.name }) | ||
301 | ) | ||
302 | 295 | ||
303 | // Go back to the video-list. | 296 | // Go back to the video-list. |
304 | this.redirectService.redirectToHomepage() | 297 | this.redirectService.redirectToHomepage() |
305 | }, | 298 | }, |
306 | 299 | ||
307 | error => this.notificationsService.error(this.i18n('Error'), error.message) | 300 | error => this.notifier.error(error.message) |
308 | ) | 301 | ) |
309 | } | 302 | } |
310 | 303 | ||
@@ -354,7 +347,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
354 | return | 347 | return |
355 | } | 348 | } |
356 | 349 | ||
357 | this.notificationsService.error(this.i18n('Error'), errorMessage) | 350 | this.notifier.error(errorMessage) |
358 | } | 351 | } |
359 | 352 | ||
360 | private checkUserRating () { | 353 | private checkUserRating () { |
@@ -369,7 +362,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
369 | } | 362 | } |
370 | }, | 363 | }, |
371 | 364 | ||
372 | err => this.notificationsService.error(this.i18n('Error'), err.message) | 365 | err => this.notifier.error(err.message) |
373 | ) | 366 | ) |
374 | } | 367 | } |
375 | 368 | ||
@@ -475,7 +468,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
475 | this.userRating = nextRating | 468 | this.userRating = nextRating |
476 | }, | 469 | }, |
477 | 470 | ||
478 | (err: { message: string }) => this.notificationsService.error(this.i18n('Error'), err.message) | 471 | (err: { message: string }) => this.notifier.error(err.message) |
479 | ) | 472 | ) |
480 | } | 473 | } |
481 | 474 | ||
diff --git a/client/src/app/videos/video-list/video-local.component.ts b/client/src/app/videos/video-list/video-local.component.ts index 9d000cf2e..c0be4b885 100644 --- a/client/src/app/videos/video-list/video-local.component.ts +++ b/client/src/app/videos/video-list/video-local.component.ts | |||
@@ -2,7 +2,6 @@ import { Component, OnDestroy, OnInit } from '@angular/core' | |||
2 | import { ActivatedRoute, Router } from '@angular/router' | 2 | import { ActivatedRoute, Router } from '@angular/router' |
3 | import { immutableAssign } from '@app/shared/misc/utils' | 3 | import { immutableAssign } from '@app/shared/misc/utils' |
4 | import { Location } from '@angular/common' | 4 | import { Location } from '@angular/common' |
5 | import { NotificationsService } from 'angular2-notifications' | ||
6 | import { AuthService } from '../../core/auth' | 5 | import { AuthService } from '../../core/auth' |
7 | import { AbstractVideoList } from '../../shared/video/abstract-video-list' | 6 | import { AbstractVideoList } from '../../shared/video/abstract-video-list' |
8 | import { VideoSortField } from '../../shared/video/sort-field.type' | 7 | import { VideoSortField } from '../../shared/video/sort-field.type' |
@@ -11,6 +10,7 @@ import { VideoFilter } from '../../../../../shared/models/videos/video-query.typ | |||
11 | import { I18n } from '@ngx-translate/i18n-polyfill' | 10 | import { I18n } from '@ngx-translate/i18n-polyfill' |
12 | import { ScreenService } from '@app/shared/misc/screen.service' | 11 | import { ScreenService } from '@app/shared/misc/screen.service' |
13 | import { UserRight } from '../../../../../shared/models/users' | 12 | import { UserRight } from '../../../../../shared/models/users' |
13 | import { Notifier } from '@app/core' | ||
14 | 14 | ||
15 | @Component({ | 15 | @Component({ |
16 | selector: 'my-videos-local', | 16 | selector: 'my-videos-local', |
@@ -26,7 +26,7 @@ export class VideoLocalComponent extends AbstractVideoList implements OnInit, On | |||
26 | constructor ( | 26 | constructor ( |
27 | protected router: Router, | 27 | protected router: Router, |
28 | protected route: ActivatedRoute, | 28 | protected route: ActivatedRoute, |
29 | protected notificationsService: NotificationsService, | 29 | protected notifier: Notifier, |
30 | protected authService: AuthService, | 30 | protected authService: AuthService, |
31 | protected location: Location, | 31 | protected location: Location, |
32 | protected i18n: I18n, | 32 | protected i18n: I18n, |
diff --git a/client/src/app/videos/video-list/video-overview.component.ts b/client/src/app/videos/video-list/video-overview.component.ts index 2c6054721..7ff52b259 100644 --- a/client/src/app/videos/video-list/video-overview.component.ts +++ b/client/src/app/videos/video-list/video-overview.component.ts | |||
@@ -1,6 +1,5 @@ | |||
1 | import { Component, OnInit } from '@angular/core' | 1 | import { Component, OnInit } from '@angular/core' |
2 | import { AuthService } from '@app/core' | 2 | import { AuthService, Notifier } from '@app/core' |
3 | import { NotificationsService } from 'angular2-notifications' | ||
4 | import { I18n } from '@ngx-translate/i18n-polyfill' | 3 | import { I18n } from '@ngx-translate/i18n-polyfill' |
5 | import { VideosOverview } from '@app/shared/overview/videos-overview.model' | 4 | import { VideosOverview } from '@app/shared/overview/videos-overview.model' |
6 | import { OverviewService } from '@app/shared/overview' | 5 | import { OverviewService } from '@app/shared/overview' |
@@ -21,7 +20,7 @@ export class VideoOverviewComponent implements OnInit { | |||
21 | 20 | ||
22 | constructor ( | 21 | constructor ( |
23 | private i18n: I18n, | 22 | private i18n: I18n, |
24 | private notificationsService: NotificationsService, | 23 | private notifier: Notifier, |
25 | private authService: AuthService, | 24 | private authService: AuthService, |
26 | private overviewService: OverviewService | 25 | private overviewService: OverviewService |
27 | ) { } | 26 | ) { } |
@@ -43,10 +42,7 @@ export class VideoOverviewComponent implements OnInit { | |||
43 | ) this.notResults = true | 42 | ) this.notResults = true |
44 | }, | 43 | }, |
45 | 44 | ||
46 | err => { | 45 | err => this.notifier.error(err.message) |
47 | console.log(err) | ||
48 | this.notificationsService.error('Error', err.text) | ||
49 | } | ||
50 | ) | 46 | ) |
51 | } | 47 | } |
52 | 48 | ||
diff --git a/client/src/app/videos/video-list/video-recently-added.component.ts b/client/src/app/videos/video-list/video-recently-added.component.ts index ac1fcfff3..f99c8abb6 100644 --- a/client/src/app/videos/video-list/video-recently-added.component.ts +++ b/client/src/app/videos/video-list/video-recently-added.component.ts | |||
@@ -2,13 +2,13 @@ import { Component, OnDestroy, OnInit } from '@angular/core' | |||
2 | import { ActivatedRoute, Router } from '@angular/router' | 2 | import { ActivatedRoute, Router } from '@angular/router' |
3 | import { Location } from '@angular/common' | 3 | import { Location } from '@angular/common' |
4 | import { immutableAssign } from '@app/shared/misc/utils' | 4 | import { immutableAssign } from '@app/shared/misc/utils' |
5 | import { NotificationsService } from 'angular2-notifications' | ||
6 | import { AuthService } from '../../core/auth' | 5 | import { AuthService } from '../../core/auth' |
7 | import { AbstractVideoList } from '../../shared/video/abstract-video-list' | 6 | import { AbstractVideoList } from '../../shared/video/abstract-video-list' |
8 | import { VideoSortField } from '../../shared/video/sort-field.type' | 7 | import { VideoSortField } from '../../shared/video/sort-field.type' |
9 | import { VideoService } from '../../shared/video/video.service' | 8 | import { VideoService } from '../../shared/video/video.service' |
10 | import { I18n } from '@ngx-translate/i18n-polyfill' | 9 | import { I18n } from '@ngx-translate/i18n-polyfill' |
11 | import { ScreenService } from '@app/shared/misc/screen.service' | 10 | import { ScreenService } from '@app/shared/misc/screen.service' |
11 | import { Notifier } from '@app/core' | ||
12 | 12 | ||
13 | @Component({ | 13 | @Component({ |
14 | selector: 'my-videos-recently-added', | 14 | selector: 'my-videos-recently-added', |
@@ -24,7 +24,7 @@ export class VideoRecentlyAddedComponent extends AbstractVideoList implements On | |||
24 | protected router: Router, | 24 | protected router: Router, |
25 | protected route: ActivatedRoute, | 25 | protected route: ActivatedRoute, |
26 | protected location: Location, | 26 | protected location: Location, |
27 | protected notificationsService: NotificationsService, | 27 | protected notifier: Notifier, |
28 | protected authService: AuthService, | 28 | protected authService: AuthService, |
29 | protected i18n: I18n, | 29 | protected i18n: I18n, |
30 | protected screenService: ScreenService, | 30 | protected screenService: ScreenService, |
diff --git a/client/src/app/videos/video-list/video-trending.component.ts b/client/src/app/videos/video-list/video-trending.component.ts index 8f3d3842b..accc5bfe5 100644 --- a/client/src/app/videos/video-list/video-trending.component.ts +++ b/client/src/app/videos/video-list/video-trending.component.ts | |||
@@ -2,13 +2,13 @@ import { Component, OnDestroy, OnInit } from '@angular/core' | |||
2 | import { ActivatedRoute, Router } from '@angular/router' | 2 | import { ActivatedRoute, Router } from '@angular/router' |
3 | import { Location } from '@angular/common' | 3 | import { Location } from '@angular/common' |
4 | import { immutableAssign } from '@app/shared/misc/utils' | 4 | import { immutableAssign } from '@app/shared/misc/utils' |
5 | import { NotificationsService } from 'angular2-notifications' | ||
6 | import { AuthService } from '../../core/auth' | 5 | import { AuthService } from '../../core/auth' |
7 | import { AbstractVideoList } from '../../shared/video/abstract-video-list' | 6 | import { AbstractVideoList } from '../../shared/video/abstract-video-list' |
8 | import { VideoSortField } from '../../shared/video/sort-field.type' | 7 | import { VideoSortField } from '../../shared/video/sort-field.type' |
9 | import { VideoService } from '../../shared/video/video.service' | 8 | import { VideoService } from '../../shared/video/video.service' |
10 | import { I18n } from '@ngx-translate/i18n-polyfill' | 9 | import { I18n } from '@ngx-translate/i18n-polyfill' |
11 | import { ScreenService } from '@app/shared/misc/screen.service' | 10 | import { ScreenService } from '@app/shared/misc/screen.service' |
11 | import { Notifier } from '@app/core' | ||
12 | 12 | ||
13 | @Component({ | 13 | @Component({ |
14 | selector: 'my-videos-trending', | 14 | selector: 'my-videos-trending', |
@@ -23,7 +23,7 @@ export class VideoTrendingComponent extends AbstractVideoList implements OnInit, | |||
23 | constructor ( | 23 | constructor ( |
24 | protected router: Router, | 24 | protected router: Router, |
25 | protected route: ActivatedRoute, | 25 | protected route: ActivatedRoute, |
26 | protected notificationsService: NotificationsService, | 26 | protected notifier: Notifier, |
27 | protected authService: AuthService, | 27 | protected authService: AuthService, |
28 | protected location: Location, | 28 | protected location: Location, |
29 | protected screenService: ScreenService, | 29 | protected screenService: ScreenService, |
diff --git a/client/src/app/videos/video-list/video-user-subscriptions.component.ts b/client/src/app/videos/video-list/video-user-subscriptions.component.ts index 6e8959c54..bee828e12 100644 --- a/client/src/app/videos/video-list/video-user-subscriptions.component.ts +++ b/client/src/app/videos/video-list/video-user-subscriptions.component.ts | |||
@@ -2,7 +2,6 @@ import { Component, OnDestroy, OnInit } from '@angular/core' | |||
2 | import { ActivatedRoute, Router } from '@angular/router' | 2 | import { ActivatedRoute, Router } from '@angular/router' |
3 | import { immutableAssign } from '@app/shared/misc/utils' | 3 | import { immutableAssign } from '@app/shared/misc/utils' |
4 | import { Location } from '@angular/common' | 4 | import { Location } from '@angular/common' |
5 | import { NotificationsService } from 'angular2-notifications' | ||
6 | import { AuthService } from '../../core/auth' | 5 | import { AuthService } from '../../core/auth' |
7 | import { AbstractVideoList } from '../../shared/video/abstract-video-list' | 6 | import { AbstractVideoList } from '../../shared/video/abstract-video-list' |
8 | import { VideoSortField } from '../../shared/video/sort-field.type' | 7 | import { VideoSortField } from '../../shared/video/sort-field.type' |
@@ -10,6 +9,7 @@ import { VideoService } from '../../shared/video/video.service' | |||
10 | import { I18n } from '@ngx-translate/i18n-polyfill' | 9 | import { I18n } from '@ngx-translate/i18n-polyfill' |
11 | import { ScreenService } from '@app/shared/misc/screen.service' | 10 | import { ScreenService } from '@app/shared/misc/screen.service' |
12 | import { OwnerDisplayType } from '@app/shared/video/video-miniature.component' | 11 | import { OwnerDisplayType } from '@app/shared/video/video-miniature.component' |
12 | import { Notifier } from '@app/core' | ||
13 | 13 | ||
14 | @Component({ | 14 | @Component({ |
15 | selector: 'my-videos-user-subscriptions', | 15 | selector: 'my-videos-user-subscriptions', |
@@ -25,7 +25,7 @@ export class VideoUserSubscriptionsComponent extends AbstractVideoList implement | |||
25 | constructor ( | 25 | constructor ( |
26 | protected router: Router, | 26 | protected router: Router, |
27 | protected route: ActivatedRoute, | 27 | protected route: ActivatedRoute, |
28 | protected notificationsService: NotificationsService, | 28 | protected notifier: Notifier, |
29 | protected authService: AuthService, | 29 | protected authService: AuthService, |
30 | protected location: Location, | 30 | protected location: Location, |
31 | protected i18n: I18n, | 31 | protected i18n: I18n, |