1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 10:49:28 +02:00

Refactor video links building

This commit is contained in:
Chocobozzz 2021-07-26 14:12:39 +02:00
parent 764b1a14fc
commit 9162fdd363
No known key found for this signature in database
GPG key ID: 583A612D890159BE
22 changed files with 136 additions and 67 deletions

View file

@ -6,6 +6,7 @@ import { Component, ElementRef, forwardRef, Input, OnInit, ViewChild } from '@an
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'
import { SafeHtml } from '@angular/platform-browser'
import { MarkdownService, ScreenService } from '@app/core'
import { Video } from '@shared/models'
@Component({
selector: 'my-markdown-textarea',
@ -33,7 +34,7 @@ export class MarkdownTextareaComponent implements ControlValueAccessor, OnInit {
@Input() markdownType: 'text' | 'enhanced' = 'text'
@Input() customMarkdownRenderer?: (text: string) => Promise<string | HTMLElement>
@Input() markdownVideo = false
@Input() markdownVideo: Video
@Input() name = 'description'
@ -147,7 +148,7 @@ export class MarkdownTextareaComponent implements ControlValueAccessor, OnInit {
}
if (this.markdownVideo) {
html = this.markdownService.processVideoTimestamps(html)
html = this.markdownService.processVideoTimestamps(this.markdownVideo.shortUUID, html)
}
return html