diff options
author | Chocobozzz <me@florianbigard.com> | 2021-07-26 14:12:39 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-07-26 14:12:50 +0200 |
commit | 9162fdd36300d2478f13d6ad346ec2c323f40faa (patch) | |
tree | dea0ca43f3ea2fb72a73ca77338f5b7c990acdd7 /client/src/app/+videos | |
parent | 764b1a14fc494f2cfd7ea590d2f07b01df65c7ad (diff) | |
download | PeerTube-9162fdd36300d2478f13d6ad346ec2c323f40faa.tar.gz PeerTube-9162fdd36300d2478f13d6ad346ec2c323f40faa.tar.zst PeerTube-9162fdd36300d2478f13d6ad346ec2c323f40faa.zip |
Refactor video links building
Diffstat (limited to 'client/src/app/+videos')
4 files changed, 5 insertions, 3 deletions
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 @@ | |||
45 | </ng-template> | 45 | </ng-template> |
46 | </my-help> | 46 | </my-help> |
47 | 47 | ||
48 | <my-markdown-textarea [truncate]="250" formControlName="description" [markdownVideo]="true"></my-markdown-textarea> | 48 | <my-markdown-textarea [truncate]="250" formControlName="description" [markdownVideo]="videoToUpdate"></my-markdown-textarea> |
49 | 49 | ||
50 | <div *ngIf="formErrors.description" class="form-error"> | 50 | <div *ngIf="formErrors.description" class="form-error"> |
51 | {{ formErrors.description }} | 51 | {{ 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 { | |||
161 | // Before HTML rendering restore line feed for markdown list compatibility | 161 | // Before HTML rendering restore line feed for markdown list compatibility |
162 | const commentText = this.comment.text.replace(/<br.?\/?>/g, '\r\n') | 162 | const commentText = this.comment.text.replace(/<br.?\/?>/g, '\r\n') |
163 | const html = await this.markdownService.textMarkdownToHTML(commentText, true, true) | 163 | const html = await this.markdownService.textMarkdownToHTML(commentText, true, true) |
164 | this.sanitizedCommentHTML = this.markdownService.processVideoTimestamps(html) | 164 | this.sanitizedCommentHTML = this.markdownService.processVideoTimestamps(this.video.shortUUID, html) |
165 | this.newParentComments = this.parentComments.concat([ this.comment ]) | 165 | this.newParentComments = this.parentComments.concat([ this.comment ]) |
166 | 166 | ||
167 | if (this.comment.account) { | 167 | 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 { | |||
80 | 80 | ||
81 | private async setVideoDescriptionHTML () { | 81 | private async setVideoDescriptionHTML () { |
82 | const html = await this.markdownService.textMarkdownToHTML(this.video.description) | 82 | const html = await this.markdownService.textMarkdownToHTML(this.video.description) |
83 | this.videoHTMLDescription = this.markdownService.processVideoTimestamps(html) | 83 | |
84 | this.videoHTMLDescription = this.markdownService.processVideoTimestamps(this.video.shortUUID, html) | ||
84 | } | 85 | } |
85 | } | 86 | } |
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 { | |||
582 | 582 | ||
583 | videoCaptions: playerCaptions, | 583 | videoCaptions: playerCaptions, |
584 | 584 | ||
585 | videoShortUUID: video.shortUUID, | ||
585 | videoUUID: video.uuid | 586 | videoUUID: video.uuid |
586 | }, | 587 | }, |
587 | 588 | ||