aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/+video-watch/comment/video-comments.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-watch/comment/video-comments.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-watch/comment/video-comments.component.ts')
-rw-r--r--client/src/app/videos/+video-watch/comment/video-comments.component.ts13
1 files changed, 6 insertions, 7 deletions
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 @@
1import { Component, Input, OnChanges, OnDestroy, OnInit, SimpleChanges, ViewChild, ElementRef } from '@angular/core' 1import { Component, ElementRef, Input, OnChanges, OnDestroy, OnInit, SimpleChanges, ViewChild } from '@angular/core'
2import { ActivatedRoute } from '@angular/router' 2import { ActivatedRoute } from '@angular/router'
3import { ConfirmService } from '@app/core' 3import { ConfirmService, Notifier } from '@app/core'
4import { NotificationsService } from 'angular2-notifications'
5import { Subscription } from 'rxjs' 4import { Subscription } from 'rxjs'
6import { VideoCommentThreadTree } from '../../../../../../shared/models/videos/video-comment.model' 5import { VideoCommentThreadTree } from '../../../../../../shared/models/videos/video-comment.model'
7import { AuthService } from '../../../core/auth' 6import { 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