From 1fe1e14cb30ac44299563f98ed0aee2805794493 Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Wed, 1 Jul 2020 02:08:58 +0200 Subject: [PATCH] fix video update button, add color to danger zone --- .../users/user-edit/user-edit.component.html | 6 ++-- .../users/user-edit/user-edit.component.scss | 4 +++ .../my-account-danger-zone.component.scss | 2 +- .../my-account-settings.component.html | 2 +- .../my-account-settings.component.scss | 4 +++ .../my-account-video-imports.component.html | 6 ++-- .../video-upload.component.html | 11 +++----- .../+video-edit/video-update.component.html | 8 +++--- .../shared-main/buttons/button.component.html | 2 +- .../shared-main/buttons/button.component.scss | 4 +-- .../shared-main/buttons/button.component.ts | 8 ++++++ client/src/sass/include/_mixins.scss | 28 +++++++++++++++---- 12 files changed, 59 insertions(+), 26 deletions(-) diff --git a/client/src/app/+admin/users/user-edit/user-edit.component.html b/client/src/app/+admin/users/user-edit/user-edit.component.html index 0454df7b7..417bbf618 100644 --- a/client/src/app/+admin/users/user-edit/user-edit.component.html +++ b/client/src/app/+admin/users/user-edit/user-edit.component.html @@ -37,13 +37,13 @@
- +
{{ user.videoAbusesCount }}
Incriminated in reports
- +
{{ user.videoAbusesAcceptedCount }} / {{ user.videoAbusesCreatedCount }}
Authored reports accepted
@@ -183,7 +183,7 @@
- +
diff --git a/client/src/app/+admin/users/user-edit/user-edit.component.scss b/client/src/app/+admin/users/user-edit/user-edit.component.scss index d4c1b600e..a41f1f71c 100644 --- a/client/src/app/+admin/users/user-edit/user-edit.component.scss +++ b/client/src/app/+admin/users/user-edit/user-edit.component.scss @@ -8,6 +8,10 @@ label { .account-title { @include settings-big-title; + + &.account-title-danger { + color: lighten($color: #c54130, $amount: 10); + } } input:not([type=submit]) { diff --git a/client/src/app/+my-account/my-account-settings/my-account-danger-zone/my-account-danger-zone.component.scss b/client/src/app/+my-account/my-account-settings/my-account-danger-zone/my-account-danger-zone.component.scss index 7f7806732..fe78a57a4 100644 --- a/client/src/app/+my-account/my-account-settings/my-account-danger-zone/my-account-danger-zone.component.scss +++ b/client/src/app/+my-account/my-account-settings/my-account-danger-zone/my-account-danger-zone.component.scss @@ -6,7 +6,7 @@ button { @include peertube-button; - @include grey-button; + @include danger-button; @include disable-outline; } } \ No newline at end of file diff --git a/client/src/app/+my-account/my-account-settings/my-account-settings.component.html b/client/src/app/+my-account/my-account-settings/my-account-settings.component.html index 185f13275..eb7bb0d6f 100644 --- a/client/src/app/+my-account/my-account-settings/my-account-settings.component.html +++ b/client/src/app/+my-account/my-account-settings/my-account-settings.component.html @@ -88,7 +88,7 @@
- +
diff --git a/client/src/app/+my-account/my-account-settings/my-account-settings.component.scss b/client/src/app/+my-account/my-account-settings/my-account-settings.component.scss index 3e1792e3e..1cdb1fab4 100644 --- a/client/src/app/+my-account/my-account-settings/my-account-settings.component.scss +++ b/client/src/app/+my-account/my-account-settings/my-account-settings.component.scss @@ -12,6 +12,10 @@ .account-title { @include settings-big-title; + + &.account-title-danger { + color: lighten($color: #c54130, $amount: 10); + } } .progress { diff --git a/client/src/app/+my-account/my-account-video-imports/my-account-video-imports.component.html b/client/src/app/+my-account/my-account-video-imports/my-account-video-imports.component.html index c029aabba..3e07550c1 100644 --- a/client/src/app/+my-account/my-account-video-imports/my-account-video-imports.component.html +++ b/client/src/app/+my-account/my-account-video-imports/my-account-video-imports.component.html @@ -1,7 +1,9 @@

Imports

@@ -11,7 +13,7 @@ Video State Created - + diff --git a/client/src/app/+videos/+video-edit/video-add-components/video-upload.component.html b/client/src/app/+videos/+video-edit/video-add-components/video-upload.component.html index 2c40892ee..8af1687e6 100644 --- a/client/src/app/+videos/+video-edit/video-add-components/video-upload.component.html +++ b/client/src/app/+videos/+video-edit/video-add-components/video-upload.component.html @@ -79,12 +79,9 @@
Publish will be available when upload is finished
-
- - -
+
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 1517d4991..6c1239395 100644 --- a/client/src/app/+videos/+video-edit/video-update.component.html +++ b/client/src/app/+videos/+video-edit/video-update.component.html @@ -13,10 +13,10 @@ >
-
- - -
+
diff --git a/client/src/app/shared/shared-main/buttons/button.component.html b/client/src/app/shared/shared-main/buttons/button.component.html index d2b0eb81a..43e2ca614 100644 --- a/client/src/app/shared/shared-main/buttons/button.component.html +++ b/client/src/app/shared/shared-main/buttons/button.component.html @@ -1,4 +1,4 @@ - + diff --git a/client/src/app/shared/shared-main/buttons/button.component.scss b/client/src/app/shared/shared-main/buttons/button.component.scss index 5b27af3f4..f37decdef 100644 --- a/client/src/app/shared/shared-main/buttons/button.component.scss +++ b/client/src/app/shared/shared-main/buttons/button.component.scss @@ -9,9 +9,9 @@ my-small-loader ::ng-deep .root { .action-button { @include peertube-button-link; - @include button-with-icon(21px, 0, -2px); + @include button-with-icon(21px, 0, -1px); - > :nth-child(2) { + > span:nth-child(2) { margin-left: 5px; } } diff --git a/client/src/app/shared/shared-main/buttons/button.component.ts b/client/src/app/shared/shared-main/buttons/button.component.ts index e23b90945..1d2be0bf9 100644 --- a/client/src/app/shared/shared-main/buttons/button.component.ts +++ b/client/src/app/shared/shared-main/buttons/button.component.ts @@ -13,8 +13,16 @@ export class ButtonComponent { @Input() icon: GlobalIconName = undefined @Input() title: string = undefined @Input() loading = false + @Input() disabled = false getTitle () { return this.title || this.label } + + getClasses () { + return { + [this.className]: true, + disabled: this.disabled + } + } } diff --git a/client/src/sass/include/_mixins.scss b/client/src/sass/include/_mixins.scss index ab9f982a2..003936bc3 100644 --- a/client/src/sass/include/_mixins.scss +++ b/client/src/sass/include/_mixins.scss @@ -175,11 +175,8 @@ @mixin grey-button { @include button-focus($grey-button-outline-color); - - &, &:active, &:focus { - background-color: $grey-background-color; - color: pvar(--greyForegroundColor); - } + background-color: $grey-background-color; + color: pvar(--greyForegroundColor); &:hover, &:active, &:focus, &[disabled], &.disabled { color: pvar(--greyForegroundColor); @@ -195,6 +192,27 @@ } } +@mixin danger-button { + $color: lighten($color: #c54130, $amount: 10); + $text: #fff6f5; + + @include button-focus(scale-color($color, $alpha: -95%)); + background-color: $color; + color: $text; + + &:hover, &:active, &:focus, &[disabled], &.disabled { + background-color: lighten($color: $color, $amount: 10); + } + + &[disabled], &.disabled { + cursor: default; + } + + my-global-icon { + @include apply-svg-color($text) + } +} + @mixin peertube-button { border: none; font-weight: $font-semibold;