X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fvideos%2F%2Bvideo-watch%2Fcomment%2Fvideo-comment-add.component.ts;h=6b7e62042b4608e6e37dfbe91aff1605f6ef819d;hb=f8b2c1b4f509c037b9650cca2c5befd21f056df3;hp=ba3c0398ec3710c4eb37276991356738bdfd67ec;hpb=be0f59b4eec3c2c4dcd151e2b174be39dff1568e;p=github%2FChocobozzz%2FPeerTube.git 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 ba3c0398e..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 @@ import { Component, ElementRef, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core' import { Router } from '@angular/router' -import { NotificationsService } from 'angular2-notifications' +import { Notifier } from '@app/core' import { Observable } from 'rxjs' import { VideoCommentCreate } from '../../../../../../shared/models/videos/video-comment.model' import { FormReactive } from '../../../shared' @@ -29,14 +29,14 @@ export class VideoCommentAddComponent extends FormReactive implements OnInit { @Output() commentCreated = new EventEmitter() @ViewChild('visitorModal') visitorModal: NgbModal - @ViewChild('textarea') private textareaElement: ElementRef + @ViewChild('textarea') textareaElement: ElementRef - private addingComment = false + addingComment = false constructor ( protected formValidatorService: FormValidatorService, private videoCommentValidatorsService: VideoCommentValidatorsService, - private notificationsService: NotificationsService, + private notifier: Notifier, private videoCommentService: VideoCommentService, private authService: AuthService, private modalService: NgbModal, @@ -115,7 +115,7 @@ export class VideoCommentAddComponent extends FormReactive implements OnInit { err => { this.addingComment = false - this.notificationsService.error(this.i18n('Error'), err.text) + this.notifier.error(err.text) } ) } @@ -135,7 +135,6 @@ export class VideoCommentAddComponent extends FormReactive implements OnInit { gotoLogin () { this.hideVisitorModal() - this.authService.redirectUrl = this.router.url this.router.navigate([ '/login' ]) }