aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-03-10 10:34:25 +0100
committerChocobozzz <me@florianbigard.com>2023-03-10 15:45:52 +0100
commit085aba61c35ad63155a46453dff7752840e82146 (patch)
tree72432a9c3d621222edd463c4437cc660fd216638 /client/src
parent3b2844f80324bc5281f3c0269dc2dad019dd96f1 (diff)
downloadPeerTube-085aba61c35ad63155a46453dff7752840e82146.tar.gz
PeerTube-085aba61c35ad63155a46453dff7752840e82146.tar.zst
PeerTube-085aba61c35ad63155a46453dff7752840e82146.zip
Add action:video-edit.form.updated hook
Diffstat (limited to 'client/src')
-rw-r--r--client/src/app/+videos/+video-edit/shared/video-edit.component.ts10
1 files changed, 9 insertions, 1 deletions
diff --git a/client/src/app/+videos/+video-edit/shared/video-edit.component.ts b/client/src/app/+videos/+video-edit/shared/video-edit.component.ts
index 13359a4d1..e3bd5fe71 100644
--- a/client/src/app/+videos/+video-edit/shared/video-edit.component.ts
+++ b/client/src/app/+videos/+video-edit/shared/video-edit.component.ts
@@ -240,7 +240,15 @@ export class VideoEditComponent implements OnInit, OnDestroy {
240 this.schedulerInterval = setInterval(() => this.minScheduledDate = new Date(), 1000 * 60) // Update every minute 240 this.schedulerInterval = setInterval(() => this.minScheduledDate = new Date(), 1000 * 60) // Update every minute
241 }) 241 })
242 242
243 this.hooks.runAction('action:video-edit.init', 'video-edit', { type: this.type }) 243 const updateForm = (values: any) => {
244 this.form.patchValue(values)
245 this.cd.detectChanges()
246 }
247 this.hooks.runAction('action:video-edit.init', 'video-edit', { type: this.type, updateForm })
248
249 this.form.valueChanges.subscribe(() => {
250 this.hooks.runAction('action:video-edit.form.updated', 'video-edit', { type: this.type, formValues: this.form.value })
251 })
244 } 252 }
245 253
246 ngOnDestroy () { 254 ngOnDestroy () {