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 + .../videos/+video-watch/video-watch.component.html | 12 +++---- .../videos/+video-watch/video-watch.component.ts | 2 +- 6 files changed, 34 insertions(+), 52 deletions(-) (limited to 'client/src/app/videos') 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) diff --git a/client/src/app/videos/+video-watch/video-watch.component.html b/client/src/app/videos/+video-watch/video-watch.component.html index 21f8f5534..e7e9f367c 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.html +++ b/client/src/app/videos/+video-watch/video-watch.component.html @@ -48,15 +48,15 @@
@@ -66,12 +66,12 @@ Support
-
+
Share
-
+
diff --git a/client/src/app/videos/+video-watch/video-watch.component.ts b/client/src/app/videos/+video-watch/video-watch.component.ts index 43afbae1a..4f8549e8f 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.ts +++ b/client/src/app/videos/+video-watch/video-watch.component.ts @@ -314,7 +314,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy { if (!errorMessage) return // Display a message in the video player instead of a notification - if (errorMessage.indexOf('http error') !== -1) { + if (errorMessage.indexOf('from xs param') !== -1) { this.flushPlayer() this.remoteServerDown = true return -- cgit v1.2.3