Add ability to set a description to dynamic fields
This commit is contained in:
parent
365783532e
commit
781ba98126
|
@ -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()
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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 () {
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue