]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/videos/+video-watch/comment/video-comment-add.component.ts
Fix transcoding
[github/Chocobozzz/PeerTube.git] / client / src / app / videos / +video-watch / comment / video-comment-add.component.ts
index 91af113d243a30d0bea9fb53b20bca2411efa173..ba3c0398ec3710c4eb37276991356738bdfd67ec 100644 (file)
@@ -32,7 +32,6 @@ export class VideoCommentAddComponent extends FormReactive implements OnInit {
   @ViewChild('textarea') private textareaElement: ElementRef
 
   private addingComment = false
-  private uri: string
 
   constructor (
     protected formValidatorService: FormValidatorService,
@@ -52,8 +51,6 @@ export class VideoCommentAddComponent extends FormReactive implements OnInit {
       text: this.videoCommentValidatorsService.VIDEO_COMMENT_TEXT
     })
 
-    this.uri = this.router.url
-
     if (this.user) {
       if (this.focusOnInit === true) {
         this.textareaElement.nativeElement.focus()
@@ -79,7 +76,7 @@ export class VideoCommentAddComponent extends FormReactive implements OnInit {
     this.formValidated()
   }
 
-  openVisitorModal (event) {
+  openVisitorModal (event: any) {
     if (this.user === null) { // we only open it for visitors
       // fixing ng-bootstrap ModalService and the "Expression Changed After It Has Been Checked" Error
       event.srcElement.blur()
@@ -127,6 +124,10 @@ export class VideoCommentAddComponent extends FormReactive implements OnInit {
     return this.form.value['text']
   }
 
+  getUrl () {
+    return window.location.href
+  }
+
   getAvatarUrl () {
     if (this.user) return this.user.accountAvatarUrl
     return window.location.origin + '/client/assets/images/default-avatar.png'