From 266947e5efc7ff30b0020beb5a74e4d4fc696fa5 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 14 Apr 2021 16:39:37 +0200 Subject: [PATCH] Refactor modal buttons style --- .../contact-admin-modal.component.html | 7 +- .../contact-admin-modal.component.scss | 1 - client/src/app/+login/login.component.html | 6 +- client/src/app/+login/login.component.scss | 11 +- .../my-accept-ownership.component.html | 6 +- .../my-accept-ownership.component.scss | 8 -- .../video-change-ownership.component.html | 7 +- .../video-caption-add-modal.component.html | 4 +- client/src/app/app.component.scss | 108 ++++++++---------- client/src/app/modal/confirm.component.html | 4 +- client/src/app/modal/confirm.component.scss | 2 - .../src/app/modal/custom-modal.component.html | 6 +- .../src/app/modal/custom-modal.component.scss | 10 -- ...stance-config-warning-modal.component.html | 5 +- ...stance-config-warning-modal.component.scss | 12 -- .../modal/quick-settings-modal.component.scss | 24 ---- .../modal/quick-settings-modal.component.ts | 3 +- .../app/modal/welcome-modal.component.html | 4 +- .../app/modal/welcome-modal.component.scss | 53 ++++----- .../abuse-message-modal.component.html | 2 +- .../moderation-comment-modal.component.html | 7 +- .../batch-domains-modal.component.html | 7 +- .../report-modals/report.component.html | 5 +- .../report-modals/video-report.component.html | 5 +- .../user-ban-modal.component.html | 7 +- .../video-block.component.html | 7 +- .../support-modal.component.html | 2 +- .../support-modal.component.scss | 3 - .../support-modal.component.ts | 3 +- .../live-stream-information.component.html | 5 +- .../video-download.component.html | 29 +++-- .../video-download.component.scss | 4 +- client/src/sass/bootstrap.scss | 13 +-- client/src/sass/include/_mixins.scss | 3 +- client/src/sass/primeng-custom.scss | 5 + 35 files changed, 136 insertions(+), 252 deletions(-) delete mode 100644 client/src/app/modal/quick-settings-modal.component.scss delete mode 100644 client/src/app/shared/shared-support-modal/support-modal.component.scss diff --git a/client/src/app/+about/about-instance/contact-admin-modal.component.html b/client/src/app/+about/about-instance/contact-admin-modal.component.html index 81e59d46a..343e5d649 100644 --- a/client/src/app/+about/about-instance/contact-admin-modal.component.html +++ b/client/src/app/+about/about-instance/contact-admin-modal.component.html @@ -45,14 +45,11 @@
- +
diff --git a/client/src/app/+about/about-instance/contact-admin-modal.component.scss b/client/src/app/+about/about-instance/contact-admin-modal.component.scss index 260d77888..6c1c89225 100644 --- a/client/src/app/+about/about-instance/contact-admin-modal.component.scss +++ b/client/src/app/+about/about-instance/contact-admin-modal.component.scss @@ -3,7 +3,6 @@ input[type=text] { @include peertube-input-text(340px); - display: block; } textarea { diff --git a/client/src/app/+login/login.component.html b/client/src/app/+login/login.component.html index 0167066a0..5f5b0f565 100644 --- a/client/src/app/+login/login.component.html +++ b/client/src/app/+login/login.component.html @@ -41,7 +41,7 @@ - + - + diff --git a/client/src/app/modal/custom-modal.component.scss b/client/src/app/modal/custom-modal.component.scss index a7fa30cf5..d6ef772b2 100644 --- a/client/src/app/modal/custom-modal.component.scss +++ b/client/src/app/modal/custom-modal.component.scss @@ -8,13 +8,3 @@ li { margin-bottom: 10px; } - -.action-button-cancel { - @include peertube-button; - @include grey-button; -} - -.action-button-confirm { - @include peertube-button; - @include orange-button; -} diff --git a/client/src/app/modal/instance-config-warning-modal.component.html b/client/src/app/modal/instance-config-warning-modal.component.html index 498adfeff..f085aa9de 100644 --- a/client/src/app/modal/instance-config-warning-modal.component.html +++ b/client/src/app/modal/instance-config-warning-modal.component.html @@ -35,10 +35,11 @@ - Configure diff --git a/client/src/app/modal/instance-config-warning-modal.component.scss b/client/src/app/modal/instance-config-warning-modal.component.scss index cc97d64e4..8d734c628 100644 --- a/client/src/app/modal/instance-config-warning-modal.component.scss +++ b/client/src/app/modal/instance-config-warning-modal.component.scss @@ -1,10 +1,6 @@ @import '_mixins'; @import '_variables'; -.action-button-cancel { - margin-right: 0 !important; -} - .modal-body { font-size: 15px; } @@ -18,11 +14,3 @@ li { margin: 0 auto 50px; width: 25%; } - -.action-button-configure { - display: inline-block; - - @include peertube-button; - @include orange-button; - @include disable-default-a-behaviour; -} diff --git a/client/src/app/modal/quick-settings-modal.component.scss b/client/src/app/modal/quick-settings-modal.component.scss deleted file mode 100644 index b0e256744..000000000 --- a/client/src/app/modal/quick-settings-modal.component.scss +++ /dev/null @@ -1,24 +0,0 @@ -@import '_mixins'; - -.modal-button { - @include disable-default-a-behaviour; - transform: translateY(2px); - - button { - @include peertube-button; - @include grey-button; - @include button-with-icon(18px, 4px, -1px); - - my-global-icon { - @include apply-svg-color(#585858); - } - } - - & + .modal-button { - margin-left: 1rem; - } -} - -.quick-settings-title { - @include in-content-small-title; -} diff --git a/client/src/app/modal/quick-settings-modal.component.ts b/client/src/app/modal/quick-settings-modal.component.ts index 95726ab63..99859a1a5 100644 --- a/client/src/app/modal/quick-settings-modal.component.ts +++ b/client/src/app/modal/quick-settings-modal.component.ts @@ -8,8 +8,7 @@ import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref' @Component({ selector: 'my-quick-settings', - templateUrl: './quick-settings-modal.component.html', - styleUrls: [ './quick-settings-modal.component.scss' ] + templateUrl: './quick-settings-modal.component.html' }) export class QuickSettingsModalComponent extends FormReactive implements OnInit { @ViewChild('modal', { static: true }) modal: NgbModal diff --git a/client/src/app/modal/welcome-modal.component.html b/client/src/app/modal/welcome-modal.component.html index 19bf3a1ea..f5d2b8799 100644 --- a/client/src/app/modal/welcome-modal.component.html +++ b/client/src/app/modal/welcome-modal.component.html @@ -71,12 +71,12 @@
- +
diff --git a/client/src/app/shared/shared-abuse-list/moderation-comment-modal.component.html b/client/src/app/shared/shared-abuse-list/moderation-comment-modal.component.html index 8082e93f4..cc7bb6c92 100644 --- a/client/src/app/shared/shared-abuse-list/moderation-comment-modal.component.html +++ b/client/src/app/shared/shared-abuse-list/moderation-comment-modal.component.html @@ -23,14 +23,11 @@
- +
diff --git a/client/src/app/shared/shared-moderation/batch-domains-modal.component.html b/client/src/app/shared/shared-moderation/batch-domains-modal.component.html index 1b85c8f48..6a3c65721 100644 --- a/client/src/app/shared/shared-moderation/batch-domains-modal.component.html +++ b/client/src/app/shared/shared-moderation/batch-domains-modal.component.html @@ -28,14 +28,11 @@
- +
diff --git a/client/src/app/shared/shared-moderation/report-modals/report.component.html b/client/src/app/shared/shared-moderation/report-modals/report.component.html index bda62312f..6c99180ef 100644 --- a/client/src/app/shared/shared-moderation/report-modals/report.component.html +++ b/client/src/app/shared/shared-moderation/report-modals/report.component.html @@ -51,10 +51,11 @@
- + +
diff --git a/client/src/app/shared/shared-moderation/report-modals/video-report.component.html b/client/src/app/shared/shared-moderation/report-modals/video-report.component.html index 4947088d1..1aae64bff 100644 --- a/client/src/app/shared/shared-moderation/report-modals/video-report.component.html +++ b/client/src/app/shared/shared-moderation/report-modals/video-report.component.html @@ -89,10 +89,11 @@
- + +
diff --git a/client/src/app/shared/shared-moderation/user-ban-modal.component.html b/client/src/app/shared/shared-moderation/user-ban-modal.component.html index 365eb1938..7129b00ca 100644 --- a/client/src/app/shared/shared-moderation/user-ban-modal.component.html +++ b/client/src/app/shared/shared-moderation/user-ban-modal.component.html @@ -23,14 +23,11 @@
- +
diff --git a/client/src/app/shared/shared-moderation/video-block.component.html b/client/src/app/shared/shared-moderation/video-block.component.html index e982c4d77..5e9e8493c 100644 --- a/client/src/app/shared/shared-moderation/video-block.component.html +++ b/client/src/app/shared/shared-moderation/video-block.component.html @@ -35,14 +35,11 @@
- +
diff --git a/client/src/app/shared/shared-support-modal/support-modal.component.html b/client/src/app/shared/shared-support-modal/support-modal.component.html index 4a967987f..289adcb6a 100644 --- a/client/src/app/shared/shared-support-modal/support-modal.component.html +++ b/client/src/app/shared/shared-support-modal/support-modal.component.html @@ -8,7 +8,7 @@ diff --git a/client/src/app/shared/shared-support-modal/support-modal.component.scss b/client/src/app/shared/shared-support-modal/support-modal.component.scss deleted file mode 100644 index 184e09027..000000000 --- a/client/src/app/shared/shared-support-modal/support-modal.component.scss +++ /dev/null @@ -1,3 +0,0 @@ -.action-button-cancel { - margin-right: 0 !important; -} diff --git a/client/src/app/shared/shared-support-modal/support-modal.component.ts b/client/src/app/shared/shared-support-modal/support-modal.component.ts index ae603c7a8..a0b9fada6 100644 --- a/client/src/app/shared/shared-support-modal/support-modal.component.ts +++ b/client/src/app/shared/shared-support-modal/support-modal.component.ts @@ -6,8 +6,7 @@ import { VideoChannel } from '@shared/models' @Component({ selector: 'my-support-modal', - templateUrl: './support-modal.component.html', - styleUrls: [ './support-modal.component.scss' ] + templateUrl: './support-modal.component.html' }) export class SupportModalComponent { @Input() video: VideoDetails = null diff --git a/client/src/app/shared/shared-video-live/live-stream-information.component.html b/client/src/app/shared/shared-video-live/live-stream-information.component.html index 57920239d..d6ee67ba9 100644 --- a/client/src/app/shared/shared-video-live/live-stream-information.component.html +++ b/client/src/app/shared/shared-video-live/live-stream-information.component.html @@ -30,10 +30,7 @@ - +
- + Advanced - + - + Simple @@ -131,13 +131,10 @@ diff --git a/client/src/app/shared/shared-video-miniature/video-download.component.scss b/client/src/app/shared/shared-video-miniature/video-download.component.scss index 199c3dac8..485db5ef5 100644 --- a/client/src/app/shared/shared-video-miniature/video-download.component.scss +++ b/client/src/app/shared/shared-video-miniature/video-download.component.scss @@ -17,7 +17,7 @@ .nav-tabs { margin-top: 10x; } - + .glyphicon { margin-right: 5px; } @@ -46,7 +46,7 @@ @include orange-button; } -#dropdownDownloadType { +#dropdown-download-type { cursor: pointer; } diff --git a/client/src/sass/bootstrap.scss b/client/src/sass/bootstrap.scss index 75dc91d7a..e11603e4d 100644 --- a/client/src/sass/bootstrap.scss +++ b/client/src/sass/bootstrap.scss @@ -153,17 +153,8 @@ $icon-font-path: '~@neos21/bootstrap3-glyphicons/assets/fonts/'; margin-bottom: 0; text-align: right; - .action-button-cancel { - @include peertube-button; - @include tertiary-button; - - display: inline-block; - margin-right: 10px; - } - - .action-button-submit { - @include peertube-button; - @include orange-button; + > .peertube-button:not(:first-child) { + margin-left: 10px } } } diff --git a/client/src/sass/include/_mixins.scss b/client/src/sass/include/_mixins.scss index bf844ac5d..73606f940 100644 --- a/client/src/sass/include/_mixins.scss +++ b/client/src/sass/include/_mixins.scss @@ -238,7 +238,8 @@ font-size: 15px; height: $button-height; line-height: $button-height; - border-radius: 3px; + // FIXME: because of primeng that redefines border-radius of all input[type="..."] + border-radius: 3px !important; text-align: center; padding: 0 17px 0 13px; cursor: pointer; diff --git a/client/src/sass/primeng-custom.scss b/client/src/sass/primeng-custom.scss index 9c9b5d4fc..544d0039a 100644 --- a/client/src/sass/primeng-custom.scss +++ b/client/src/sass/primeng-custom.scss @@ -3,6 +3,11 @@ @import '~primeng/resources/primeng.css'; +// Override primeng style we don't want +input[type="button"] { + border-radius: inherit; +} + // Taken from old nova light theme body .p-disabled { -- 2.41.0