From 0f7fedc39857ebc0eb29182c1588a92b9adfb75a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 17 Jul 2018 14:44:19 +0200 Subject: Improve frontend accessibility In particular checkboxes, likes/dislikes, share button, video thumbnails and help buttons --- .../+video-edit/shared/video-edit.component.html | 41 +++++++++------------- .../+video-edit/shared/video-edit.component.scss | 19 ---------- .../+video-edit/shared/video-edit.component.ts | 11 +++++- .../videos/+video-edit/video-update.component.ts | 1 + 4 files changed, 27 insertions(+), 45 deletions(-) (limited to 'client/src/app/videos/+video-edit') diff --git a/client/src/app/videos/+video-edit/shared/video-edit.component.html b/client/src/app/videos/+video-edit/shared/video-edit.component.html index 4675cb827..16dbf5cfc 100644 --- a/client/src/app/videos/+video-edit/shared/video-edit.component.html +++ b/client/src/app/videos/+video-edit/shared/video-edit.component.html @@ -110,31 +110,22 @@ -
- - - - -
- -
- - - -
- -
- - - - -
+ + + + + diff --git a/client/src/app/videos/+video-edit/shared/video-edit.component.scss b/client/src/app/videos/+video-edit/shared/video-edit.component.scss index 03b8359de..058ccba36 100644 --- a/client/src/app/videos/+video-edit/shared/video-edit.component.scss +++ b/client/src/app/videos/+video-edit/shared/video-edit.component.scss @@ -16,31 +16,12 @@ input { @include peertube-input-text(100%); display: block; - - &[type=checkbox] { - @include peertube-checkbox(1px); - } } input, select { font-size: 15px } - .form-group-checkbox { - display: flex; - align-items: center; - - label { - font-weight: $font-regular; - margin: 0; - } - - input { - width: 10px; - margin-right: 10px; - } - } - .label-tags + span { font-size: 15px; } 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 { calendarDateFormat: string private schedulerInterval + private firstPatchDone = false constructor ( private formValidatorService: FormValidatorService, @@ -167,6 +168,7 @@ export class VideoEditComponent implements OnInit, OnDestroy { .pipe(map(res => parseInt(res.toString(), 10))) .subscribe( newPrivacyId => { + this.schedulePublicationEnabled = newPrivacyId === this.SPECIAL_SCHEDULED_PRIVACY // Value changed @@ -182,11 +184,18 @@ export class VideoEditComponent implements OnInit, OnDestroy { scheduleControl.clearValidators() waitTranscodingControl.enable() - waitTranscodingControl.setValue(true) + + // Do not update the control value on first patch (values come from the server) + if (this.firstPatchDone === true) { + waitTranscodingControl.setValue(true) + } } scheduleControl.updateValueAndValidity() waitTranscodingControl.updateValueAndValidity() + + this.firstPatchDone = true + } ) } diff --git a/client/src/app/videos/+video-edit/video-update.component.ts b/client/src/app/videos/+video-edit/video-update.component.ts index 774772e14..952fe0293 100644 --- a/client/src/app/videos/+video-edit/video-update.component.ts +++ b/client/src/app/videos/+video-edit/video-update.component.ts @@ -107,6 +107,7 @@ export class VideoUpdateComponent extends FormReactive implements OnInit { }, err => { + this.loadingBar.complete() this.isUpdatingVideo = false this.notificationsService.error(this.i18n('Error'), err.message) console.error(err) -- cgit v1.2.3