]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/videos/+video-watch/comment/video-comment-add.component.ts
autoplay next video switch for both user and visitors
[github/Chocobozzz/PeerTube.git] / client / src / app / videos / +video-watch / comment / video-comment-add.component.ts
index fd85c28f2cb77c1af01ed456fa3ac8149b3e7eee..8cdd37680b35cf68cad97d6b18efc3e7dc3c63cd 100644 (file)
@@ -8,7 +8,6 @@ import { User } from '../../../shared/users'
 import { Video } from '../../../shared/video/video.model'
 import { VideoComment } from './video-comment.model'
 import { VideoCommentService } from './video-comment.service'
-import { I18n } from '@ngx-translate/i18n-polyfill'
 import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service'
 import { VideoCommentValidatorsService } from '@app/shared/forms/form-validators/video-comment-validators.service'
 import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
@@ -28,8 +27,8 @@ export class VideoCommentAddComponent extends FormReactive implements OnInit {
 
   @Output() commentCreated = new EventEmitter<VideoCommentCreate>()
 
-  @ViewChild('visitorModal') visitorModal: NgbModal
-  @ViewChild('textarea') textareaElement: ElementRef
+  @ViewChild('visitorModal', { static: true }) visitorModal: NgbModal
+  @ViewChild('textarea', { static: true }) textareaElement: ElementRef
 
   addingComment = false
 
@@ -40,8 +39,7 @@ export class VideoCommentAddComponent extends FormReactive implements OnInit {
     private videoCommentService: VideoCommentService,
     private authService: AuthService,
     private modalService: NgbModal,
-    private router: Router,
-    private i18n: I18n
+    private router: Router
   ) {
     super()
   }
@@ -124,7 +122,7 @@ export class VideoCommentAddComponent extends FormReactive implements OnInit {
     return this.form.value['text']
   }
 
-  getUrl () {
+  getUri () {
     return window.location.href
   }