aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/+video-edit/video-add-components/video-import-torrent.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-add-components/video-import-torrent.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-add-components/video-import-torrent.component.ts')
-rw-r--r--client/src/app/videos/+video-edit/video-add-components/video-import-torrent.component.ts9
1 files changed, 4 insertions, 5 deletions
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 @@
1import { Component, ElementRef, EventEmitter, OnInit, Output, ViewChild } from '@angular/core' 1import { Component, ElementRef, EventEmitter, OnInit, Output, ViewChild } from '@angular/core'
2import { Router } from '@angular/router' 2import { Router } from '@angular/router'
3import { NotificationsService } from 'angular2-notifications'
4import { VideoPrivacy, VideoUpdate } from '../../../../../../shared/models/videos' 3import { VideoPrivacy, VideoUpdate } from '../../../../../../shared/models/videos'
5import { AuthService, ServerService } from '../../../core' 4import { AuthService, Notifier, ServerService } from '../../../core'
6import { VideoService } from '../../../shared/video/video.service' 5import { VideoService } from '../../../shared/video/video.service'
7import { I18n } from '@ngx-translate/i18n-polyfill' 6import { I18n } from '@ngx-translate/i18n-polyfill'
8import { LoadingBarService } from '@ngx-loading-bar/core' 7import { 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 },