aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/+video-edit/shared/video-edit.component.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-07-17 14:44:19 +0200
committerChocobozzz <me@florianbigard.com>2018-07-17 14:56:15 +0200
commit0f7fedc39857ebc0eb29182c1588a92b9adfb75a (patch)
treef1516e93a93d1042bbc4d14d10575b88cae6bba1 /client/src/app/videos/+video-edit/shared/video-edit.component.ts
parent4bdd9473fdecfa7e309e3c59b05b29d0a20ac397 (diff)
downloadPeerTube-0f7fedc39857ebc0eb29182c1588a92b9adfb75a.tar.gz
PeerTube-0f7fedc39857ebc0eb29182c1588a92b9adfb75a.tar.zst
PeerTube-0f7fedc39857ebc0eb29182c1588a92b9adfb75a.zip
Improve frontend accessibility
In particular checkboxes, likes/dislikes, share button, video thumbnails and help buttons
Diffstat (limited to 'client/src/app/videos/+video-edit/shared/video-edit.component.ts')
-rw-r--r--client/src/app/videos/+video-edit/shared/video-edit.component.ts11
1 files changed, 10 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 743c015cb..00c7bc41d 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
@@ -49,6 +49,7 @@ export class VideoEditComponent implements OnInit, OnDestroy {
49 calendarDateFormat: string 49 calendarDateFormat: string
50 50
51 private schedulerInterval 51 private schedulerInterval
52 private firstPatchDone = false
52 53
53 constructor ( 54 constructor (
54 private formValidatorService: FormValidatorService, 55 private formValidatorService: FormValidatorService,
@@ -167,6 +168,7 @@ export class VideoEditComponent implements OnInit, OnDestroy {
167 .pipe(map(res => parseInt(res.toString(), 10))) 168 .pipe(map(res => parseInt(res.toString(), 10)))
168 .subscribe( 169 .subscribe(
169 newPrivacyId => { 170 newPrivacyId => {
171
170 this.schedulePublicationEnabled = newPrivacyId === this.SPECIAL_SCHEDULED_PRIVACY 172 this.schedulePublicationEnabled = newPrivacyId === this.SPECIAL_SCHEDULED_PRIVACY
171 173
172 // Value changed 174 // Value changed
@@ -182,11 +184,18 @@ export class VideoEditComponent implements OnInit, OnDestroy {
182 scheduleControl.clearValidators() 184 scheduleControl.clearValidators()
183 185
184 waitTranscodingControl.enable() 186 waitTranscodingControl.enable()
185 waitTranscodingControl.setValue(true) 187
188 // Do not update the control value on first patch (values come from the server)
189 if (this.firstPatchDone === true) {
190 waitTranscodingControl.setValue(true)
191 }
186 } 192 }
187 193
188 scheduleControl.updateValueAndValidity() 194 scheduleControl.updateValueAndValidity()
189 waitTranscodingControl.updateValueAndValidity() 195 waitTranscodingControl.updateValueAndValidity()
196
197 this.firstPatchDone = true
198
190 } 199 }
191 ) 200 )
192 } 201 }