ActivityPub-federated video streaming platform using P2P directly in your web browser
Add ability to set a description to dynamic fields
Chocobozzz781ba981263e
diff --git a/client/src/app/+videos/+video-watch/video-watch.component.ts b/client/src/app/+videos/+video-watch/video-watch.component.tsindex 0a61227a89..1b28208105 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.htmlindex c111ea7df3..17b4a134fe 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 @@<div [formGroup]="form"><label *ngIf="setting.type !== 'input-checkbox'" [attr.for]="setting.name" [innerHTML]="setting.label"></label>+ <div *ngIf="setting.descriptionHTML" class="label-small-info" [innerHTML]="setting.descriptionHTML"></div>+<input *ngIf="setting.type === 'input'" type="text" [id]="setting.name" [formControlName]="setting.name" /><textarea *ngIf="setting.type === 'input-textarea'" type="text" [id]="setting.name" [formControlName]="setting.name"></textarea>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.scssindex 70b3cf6c33..89193ed858 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.tsindex af98a1561d..995e8c2778 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.tsindex df24339c6d..ec333e8d69 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: stringtype: 'input' | 'input-checkbox' | 'input-textarea' | 'markdown-text' | 'markdown-enhanced'+ descriptionHTML?: string+// Default setting valuedefault?: string | boolean}