aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/+video-watch/comment/video-comments.component.ts
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2019-12-16 16:21:42 +0100
committerChocobozzz <chocobozzz@cpy.re>2019-12-17 09:45:02 +0100
commitb29bf61dbd518e5cef0b2f564ddc8f8a0657d089 (patch)
tree86d41fb765ea529095d757e292213156cef7d899 /client/src/app/videos/+video-watch/comment/video-comments.component.ts
parentd68ebf0b4a40f88e53a78de6b3109a41466fa7c6 (diff)
downloadPeerTube-b29bf61dbd518e5cef0b2f564ddc8f8a0657d089.tar.gz
PeerTube-b29bf61dbd518e5cef0b2f564ddc8f8a0657d089.tar.zst
PeerTube-b29bf61dbd518e5cef0b2f564ddc8f8a0657d089.zip
Provide native links for description timestamps, and re-clickability for these
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.ts8
1 files changed, 7 insertions, 1 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 cc8b98b4e..e81401553 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,4 +1,4 @@
1import { Component, ElementRef, Input, OnChanges, OnDestroy, OnInit, SimpleChanges, ViewChild } from '@angular/core' 1import { Component, ElementRef, Input, OnChanges, OnDestroy, OnInit, SimpleChanges, ViewChild, Output, EventEmitter } from '@angular/core'
2import { ActivatedRoute } from '@angular/router' 2import { ActivatedRoute } from '@angular/router'
3import { ConfirmService, Notifier } from '@app/core' 3import { ConfirmService, Notifier } from '@app/core'
4import { Subject, Subscription } from 'rxjs' 4import { Subject, Subscription } from 'rxjs'
@@ -24,6 +24,8 @@ export class VideoCommentsComponent implements OnInit, OnChanges, OnDestroy {
24 @Input() video: VideoDetails 24 @Input() video: VideoDetails
25 @Input() user: User 25 @Input() user: User
26 26
27 @Output() timestampClicked = new EventEmitter<number>()
28
27 comments: VideoComment[] = [] 29 comments: VideoComment[] = []
28 highlightedThread: VideoComment 30 highlightedThread: VideoComment
29 sort: VideoSortField = '-createdAt' 31 sort: VideoSortField = '-createdAt'
@@ -150,6 +152,10 @@ export class VideoCommentsComponent implements OnInit, OnChanges, OnDestroy {
150 this.viewReplies(commentTree.comment.id) 152 this.viewReplies(commentTree.comment.id)
151 } 153 }
152 154
155 handleTimestampClicked (timestamp: number) {
156 this.timestampClicked.emit(timestamp)
157 }
158
153 async onWantedToDelete (commentToDelete: VideoComment) { 159 async onWantedToDelete (commentToDelete: VideoComment) {
154 let message = 'Do you really want to delete this comment?' 160 let message = 'Do you really want to delete this comment?'
155 161