diff options
author | Chocobozzz <me@florianbigard.com> | 2018-12-19 16:04:34 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-12-19 17:26:52 +0100 |
commit | f8b2c1b4f509c037b9650cca2c5befd21f056df3 (patch) | |
tree | 89d278f9628d657e6aad1b1e15febaf8ff9fcfa9 /client/src/app/videos/+video-watch/comment/video-comments.component.ts | |
parent | e0e665f0efa98f2701dd9f5529e99989680481ae (diff) | |
download | PeerTube-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.ts | 13 |
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 @@ | |||
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 | ||