From 4cc66133abf1e37873316999b660c93ab92eb4a0 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 7 Dec 2017 14:48:47 +0100 Subject: [PATCH] Design video update --- .../shared/video-edit.component.html | 130 ++++++++--------- .../shared/video-edit.component.scss | 136 +++++++++++++++--- .../+video-edit/video-update.component.html | 19 ++- .../+video-edit/video-update.component.ts | 13 +- .../+video-watch/video-watch.component.scss | 1 + .../shared/video-description.component.html | 4 +- .../shared/video-description.component.scss | 6 +- client/src/assets/images/global/validate.svg | 14 ++ client/src/sass/_mixins.scss | 22 ++- 9 files changed, 236 insertions(+), 109 deletions(-) create mode 100644 client/src/assets/images/global/validate.svg 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 e087b71a4..a6b753166 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 @@ -1,85 +1,85 @@ -
-
- - -
- {{ formErrors.name }} -
-
+
-
- - +
+
+ + +
+ {{ formErrors.name }} +
+
-
- {{ formErrors.privacy }} +
+ (press enter to add the tag) +
-
-
- - +
+ + + +
+ {{ formErrors.description }} +
+
-
- - +
+
+ + -
- {{ formErrors.category }} +
+ {{ formErrors.category }} +
-
-
- - +
+ + -
- {{ formErrors.licence }} +
+ {{ formErrors.licence }} +
-
-
- - +
+ + -
- {{ formErrors.language }} +
+ {{ formErrors.language }} +
-
-
- (press enter to add the tag) - -
+
+ + -
- - +
+ {{ formErrors.privacy }} +
+
-
- {{ formErrors.description }} +
+ +
+
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 9ee0c520c..0af48fabe 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 @@ -1,3 +1,121 @@ +.video-edit { + height: 100%; + + .form-group { + margin-bottom: 25px; + } + + input { + @include peertube-input-text(100%); + display: block; + + &[type=checkbox] { + outline: 0; + } + } + + select { + @include peertube-select(100%); + } + + 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; + } + } +} + +.submit-container { + text-align: right; + position: relative; + bottom: $button-height; + + .submit-button { + @include peertube-button; + @include orange-button; + + display: inline-block; + + input { + cursor: inherit; + background-color: inherit; + border: none; + padding: 0; + } + + .icon.icon-validate { + @include icon(20px); + + cursor: inherit; + position: relative; + top: -1px; + margin-right: 4px; + background-image: url('../../../../assets/images/global/validate.svg'); + } + } +} + +/deep/ { + .ng2-tag-input { + border: none !important; + } + + .ng2-tags-container { + display: flex; + align-items: center; + border: 1px solid #C6C6C6; + border-radius: 3px; + padding: 5px !important; + } + + tag { + background-color: #E5E5E5 !important; + border-radius: 3px !important; + font-size: 15px !important; + color: #000 !important; + height: 30px !important; + line-height: 30px !important; + margin: 0 5px 0 0 !important; + cursor: default !important; + padding: 0 8px 0 10px !important; + + div { + height: 100% !important; + } + } + + delete-icon { + cursor: pointer !important; + height: auto !important; + vertical-align: middle !important; + padding-left: 6px !important; + + svg { + height: auto !important; + vertical-align: middle !important; + fill: #585858 !important; + } + + &:hover { + transform: none !important; + } + } +} + + .btn-file { position: relative; overflow: hidden; @@ -20,24 +138,6 @@ display: block; } -.form-group { - margin-bottom: 10px; -} - -div.tags { - height: 40px; - font-size: 20px; - margin-top: 20px; - - .tag { - margin-right: 10px; - - .remove { - cursor: pointer; - } - } -} - div.file-to-upload { height: 40px; diff --git a/client/src/app/videos/+video-edit/video-update.component.html b/client/src/app/videos/+video-edit/video-update.component.html index c57f35da0..3163495bf 100644 --- a/client/src/app/videos/+video-edit/video-update.component.html +++ b/client/src/app/videos/+video-edit/video-update.component.html @@ -1,7 +1,7 @@ -
-
- -

Update {{ video?.name }}

+
+
+ Update {{ video?.name }} +
@@ -10,12 +10,11 @@ [validationMessages]="validationMessages" [videoPrivacies]="videoPrivacies" > -
- +
+
+ + +
-
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 01ab0a716..d1da8b6d8 100644 --- a/client/src/app/videos/+video-edit/video-update.component.ts +++ b/client/src/app/videos/+video-edit/video-update.component.ts @@ -5,19 +5,10 @@ import { NotificationsService } from 'angular2-notifications' import 'rxjs/add/observable/forkJoin' import { VideoPrivacy } from '../../../../../shared/models/videos/video-privacy.enum' import { ServerService } from '../../core' -import { - FormReactive, - VIDEO_CATEGORY, - VIDEO_DESCRIPTION, - VIDEO_LANGUAGE, - VIDEO_LICENCE, - VIDEO_NAME, - VIDEO_PRIVACY, - VIDEO_TAGS -} from '../../shared' +import { FormReactive } from '../../shared' import { ValidatorMessage } from '../../shared/forms/form-validators' -import { VideoService } from '../../shared/video/video.service' import { VideoEdit } from '../../shared/video/video-edit.model' +import { VideoService } from '../../shared/video/video.service' @Component({ selector: 'my-videos-update', diff --git a/client/src/app/videos/+video-watch/video-watch.component.scss b/client/src/app/videos/+video-watch/video-watch.component.scss index 6973619b2..2ccfd2749 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.scss +++ b/client/src/app/videos/+video-watch/video-watch.component.scss @@ -70,6 +70,7 @@ &.icon-more { background-image: url('../../../assets/images/video/more.svg'); + top: -1px; } } diff --git a/client/src/app/videos/shared/video-description.component.html b/client/src/app/videos/shared/video-description.component.html index 7a228857c..da66a9753 100644 --- a/client/src/app/videos/shared/video-description.component.html +++ b/client/src/app/videos/shared/video-description.component.html @@ -1,6 +1,6 @@ diff --git a/client/src/app/videos/shared/video-description.component.scss b/client/src/app/videos/shared/video-description.component.scss index d8d73e846..6ef81ae58 100644 --- a/client/src/app/videos/shared/video-description.component.scss +++ b/client/src/app/videos/shared/video-description.component.scss @@ -1,11 +1,15 @@ textarea { + @include peertube-input-text(100%); + + font-size: 15px; height: 150px; } .previews /deep/ { + font-size: 15px !important; + .nav { margin-top: 10px; - font-size: 0.9em; } .tab-content { diff --git a/client/src/assets/images/global/validate.svg b/client/src/assets/images/global/validate.svg new file mode 100644 index 000000000..5c7ee9d14 --- /dev/null +++ b/client/src/assets/images/global/validate.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/client/src/sass/_mixins.scss b/client/src/sass/_mixins.scss index 14d9b5044..121e16e10 100644 --- a/client/src/sass/_mixins.scss +++ b/client/src/sass/_mixins.scss @@ -23,20 +23,28 @@ color: #fff; background-color: $orange-color; - &:hover, &:active, &:focus, &[disabled] { + &:hover, &:active, &:focus, &[disabled], &.disabled { color: #fff; background-color: $orange-hoover-color; } + + &[disabled], &.disabled { + cursor: default; + } } @mixin grey-button { background-color: $grey-color; color: #585858; - &:hover, &:active, &:focus, &[disabled] { + &:hover, &:active, &:focus, &[disabled], &.disabled { color: #585858; background-color: $grey-hoover-color; } + + &[disabled], &.disabled { + cursor: default; + } } @mixin peertube-button { @@ -72,3 +80,13 @@ vertical-align: middle; cursor: pointer; } + + +@mixin peertube-select ($width) { + background-color: #fff; + border: 1px solid #C6C6C6; + height: $button-height; + width: $width; + border-radius: 3px; + padding-left: 15px; +} -- 2.25.1