From 9162fdd36300d2478f13d6ad346ec2c323f40faa Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 26 Jul 2021 14:12:39 +0200 Subject: Refactor video links building --- client/src/app/+videos/+video-edit/shared/video-edit.component.html | 2 +- .../app/+videos/+video-watch/shared/comment/video-comment.component.ts | 2 +- .../+video-watch/shared/metadata/video-description.component.ts | 3 ++- client/src/app/+videos/+video-watch/video-watch.component.ts | 1 + 4 files changed, 5 insertions(+), 3 deletions(-) (limited to 'client/src/app/+videos') diff --git a/client/src/app/+videos/+video-edit/shared/video-edit.component.html b/client/src/app/+videos/+video-edit/shared/video-edit.component.html index 50d030ac9..ee5a50611 100644 --- a/client/src/app/+videos/+video-edit/shared/video-edit.component.html +++ b/client/src/app/+videos/+video-edit/shared/video-edit.component.html @@ -45,7 +45,7 @@ - +
{{ formErrors.description }} diff --git a/client/src/app/+videos/+video-watch/shared/comment/video-comment.component.ts b/client/src/app/+videos/+video-watch/shared/comment/video-comment.component.ts index 04f8f0d58..0e1c4c207 100644 --- a/client/src/app/+videos/+video-watch/shared/comment/video-comment.component.ts +++ b/client/src/app/+videos/+video-watch/shared/comment/video-comment.component.ts @@ -161,7 +161,7 @@ export class VideoCommentComponent implements OnInit, OnChanges { // Before HTML rendering restore line feed for markdown list compatibility const commentText = this.comment.text.replace(//g, '\r\n') const html = await this.markdownService.textMarkdownToHTML(commentText, true, true) - this.sanitizedCommentHTML = this.markdownService.processVideoTimestamps(html) + this.sanitizedCommentHTML = this.markdownService.processVideoTimestamps(this.video.shortUUID, html) this.newParentComments = this.parentComments.concat([ this.comment ]) if (this.comment.account) { diff --git a/client/src/app/+videos/+video-watch/shared/metadata/video-description.component.ts b/client/src/app/+videos/+video-watch/shared/metadata/video-description.component.ts index 23d00d31a..870c7ae3f 100644 --- a/client/src/app/+videos/+video-watch/shared/metadata/video-description.component.ts +++ b/client/src/app/+videos/+video-watch/shared/metadata/video-description.component.ts @@ -80,6 +80,7 @@ export class VideoDescriptionComponent implements OnChanges { private async setVideoDescriptionHTML () { const html = await this.markdownService.textMarkdownToHTML(this.video.description) - this.videoHTMLDescription = this.markdownService.processVideoTimestamps(html) + + this.videoHTMLDescription = this.markdownService.processVideoTimestamps(this.video.shortUUID, html) } } diff --git a/client/src/app/+videos/+video-watch/video-watch.component.ts b/client/src/app/+videos/+video-watch/video-watch.component.ts index 7460ae3fc..9212b78be 100644 --- a/client/src/app/+videos/+video-watch/video-watch.component.ts +++ b/client/src/app/+videos/+video-watch/video-watch.component.ts @@ -582,6 +582,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy { videoCaptions: playerCaptions, + videoShortUUID: video.shortUUID, videoUUID: video.uuid }, -- cgit v1.2.3