From: Chocobozzz Date: Fri, 21 Aug 2020 12:45:57 +0000 (+0200) Subject: Add ability to set a description to dynamic fields X-Git-Tag: v2.4.0-rc.1~45 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=781ba981263ee6524fea1a95836108d252a124f4;hp=365783532ea7942b96f5e83f4a4dc8f433a07603;p=github%2FChocobozzz%2FPeerTube.git Add ability to set a description to dynamic fields --- 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 0a61227a8..1b2820810 100644 --- a/client/src/app/+videos/+video-watch/video-watch.component.ts +++ b/client/src/app/+videos/+video-watch/video-watch.component.ts @@ -548,7 +548,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy { this.zone.run(() => this.theaterEnabled = enabled) }) - this.hooks.runAction('action:video-watch.player.loaded', 'video-watch', { player: this.player, videojs }) + this.hooks.runAction('action:video-watch.player.loaded', 'video-watch', { player: this.player, videojs, video: this.video }) }) this.setVideoDescriptionHTML() diff --git a/client/src/app/shared/shared-forms/dynamic-form-field.component.html b/client/src/app/shared/shared-forms/dynamic-form-field.component.html index c111ea7df..17b4a134f 100644 --- a/client/src/app/shared/shared-forms/dynamic-form-field.component.html +++ b/client/src/app/shared/shared-forms/dynamic-form-field.component.html @@ -1,6 +1,8 @@
+
+ diff --git a/client/src/app/shared/shared-forms/dynamic-form-field.component.scss b/client/src/app/shared/shared-forms/dynamic-form-field.component.scss index 70b3cf6c3..89193ed85 100644 --- a/client/src/app/shared/shared-forms/dynamic-form-field.component.scss +++ b/client/src/app/shared/shared-forms/dynamic-form-field.component.scss @@ -16,3 +16,9 @@ textarea { .peertube-select-container { @include peertube-select-container(340px); } + +.label-small-info { + font-style: italic; + margin-bottom: 10px; + font-size: 13px; +} diff --git a/client/src/standalone/videos/embed.ts b/client/src/standalone/videos/embed.ts index af98a1561..995e8c277 100644 --- a/client/src/standalone/videos/embed.ts +++ b/client/src/standalone/videos/embed.ts @@ -588,7 +588,7 @@ export class PeerTubeEmbed { }) } - this.runHook('action:embed.player.loaded', undefined, { player: this.player, videojs }) + this.runHook('action:embed.player.loaded', undefined, { player: this.player, videojs, video: videoInfo }) } private async initCore () { diff --git a/shared/models/plugins/register-client-form-field.model.ts b/shared/models/plugins/register-client-form-field.model.ts index df24339c6..ec333e8d6 100644 --- a/shared/models/plugins/register-client-form-field.model.ts +++ b/shared/models/plugins/register-client-form-field.model.ts @@ -3,6 +3,8 @@ export interface RegisterClientFormFieldOptions { label: string type: 'input' | 'input-checkbox' | 'input-textarea' | 'markdown-text' | 'markdown-enhanced' + descriptionHTML?: string + // Default setting value default?: string | boolean }