aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+videos/+video-edit/shared
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-12-14 17:17:01 +0100
committerChocobozzz <me@florianbigard.com>2021-12-14 17:17:01 +0100
commit3cf68b869decf07ff7435fe1436d4f3134df1bf4 (patch)
tree836efe5ddc626fef3ba4c96269efbca305f46256 /client/src/app/+videos/+video-edit/shared
parenta6f919e455f2c6ae8f2194da4aa66824a6bfd09e (diff)
downloadPeerTube-3cf68b869decf07ff7435fe1436d4f3134df1bf4.tar.gz
PeerTube-3cf68b869decf07ff7435fe1436d4f3134df1bf4.tar.zst
PeerTube-3cf68b869decf07ff7435fe1436d4f3134df1bf4.zip
Ability for admins to set default upload values
Diffstat (limited to 'client/src/app/+videos/+video-edit/shared')
-rw-r--r--client/src/app/+videos/+video-edit/shared/video-edit.component.ts9
1 files changed, 5 insertions, 4 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 39767f258..2bec933e9 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
@@ -110,9 +110,10 @@ export class VideoEditComponent implements OnInit, OnDestroy {
110 updateForm () { 110 updateForm () {
111 const defaultValues: any = { 111 const defaultValues: any = {
112 nsfw: 'false', 112 nsfw: 'false',
113 commentsEnabled: 'true', 113 commentsEnabled: this.serverConfig.defaults.publish.commentsEnabled,
114 downloadEnabled: 'true', 114 downloadEnabled: this.serverConfig.defaults.publish.downloadEnabled,
115 waitTranscoding: 'true', 115 waitTranscoding: 'true',
116 licence: this.serverConfig.defaults.publish.licence,
116 tags: [] 117 tags: []
117 } 118 }
118 const obj: any = { 119 const obj: any = {
@@ -160,6 +161,8 @@ export class VideoEditComponent implements OnInit, OnDestroy {
160 } 161 }
161 162
162 ngOnInit () { 163 ngOnInit () {
164 this.serverConfig = this.serverService.getHTMLConfig()
165
163 this.updateForm() 166 this.updateForm()
164 167
165 this.pluginService.ensurePluginsAreLoaded('video-edit') 168 this.pluginService.ensurePluginsAreLoaded('video-edit')
@@ -200,8 +203,6 @@ export class VideoEditComponent implements OnInit, OnDestroy {
200 } 203 }
201 }) 204 })
202 205
203 this.serverConfig = this.serverService.getHTMLConfig()
204
205 this.initialVideoCaptions = this.videoCaptions.map(c => c.language.id) 206 this.initialVideoCaptions = this.videoCaptions.map(c => c.language.id)
206 207
207 this.ngZone.runOutsideAngular(() => { 208 this.ngZone.runOutsideAngular(() => {