From 907f6a2f73bb4eb38d47aed7eaaa2a44d6bb00d6 Mon Sep 17 00:00:00 2001 From: Vladyslav_Prykhodko Date: Tue, 26 Nov 2024 19:51:35 +0200 Subject: [PATCH] UI: Fixed highlighting when disabled toggle-selected --- .../pages/admin/mail-server.component.html | 10 +-- .../pages/admin/mail-server.component.scss | 55 -------------- .../inbox/inbox-table-header.component.html | 14 ++-- .../inbox/inbox-table-header.component.scss | 75 ------------------- .../inbox/inbox-table-header.component.ts | 2 +- .../rule-notification-dialog.component.html | 12 ++- .../rule-notification-dialog.component.scss | 54 ------------- .../components/script-lang.component.scss | 7 ++ .../components/toggle-header.component.scss | 4 + 9 files changed, 27 insertions(+), 206 deletions(-) delete mode 100644 ui-ngx/src/app/modules/home/pages/notification/inbox/inbox-table-header.component.scss diff --git a/ui-ngx/src/app/modules/home/pages/admin/mail-server.component.html b/ui-ngx/src/app/modules/home/pages/admin/mail-server.component.html index 14a6358efb..ff10de6fc2 100644 --- a/ui-ngx/src/app/modules/home/pages/admin/mail-server.component.html +++ b/ui-ngx/src/app/modules/home/pages/admin/mail-server.component.html @@ -152,12 +152,10 @@ autocomplete="new-username"/>
- - {{ 'admin.oauth2.basic' | translate }} - {{ 'admin.oauth2.oauth2' | translate }} - + + {{ 'admin.oauth2.basic' | translate }} + {{ 'admin.oauth2.oauth2' | translate }} +
diff --git a/ui-ngx/src/app/modules/home/pages/admin/mail-server.component.scss b/ui-ngx/src/app/modules/home/pages/admin/mail-server.component.scss index b87c58bc48..a60be6f5c2 100644 --- a/ui-ngx/src/app/modules/home/pages/admin/mail-server.component.scss +++ b/ui-ngx/src/app/modules/home/pages/admin/mail-server.component.scss @@ -51,60 +51,5 @@ border: 1px solid rgba(0, 0, 0, 0.2); } } - .mat-button-toggle-group.tb-notification-unread-toggle-group { - &.mat-button-toggle-group-appearance-standard { - border: none; - border-radius: 14px; - - .mat-button-toggle + .mat-button-toggle { - border-left: none; - } - } - - .mat-button-toggle { - background: rgba(0, 0, 0, 0.06); - height: 28px; - align-items: center; - display: flex; - - .mat-button-toggle-ripple { - top: 2px; - left: 2px; - right: 2px; - bottom: 2px; - border-radius: 12px; - } - } - - .mat-button-toggle-button { - color: #959595; - } - - .mat-button-toggle-focus-overlay { - border-radius: 14px; - margin: 2px; - } - - .mat-button-toggle-checked .mat-button-toggle-button { - background-color: $tb-primary-color; - color: #fff; - border-radius: 14px; - margin-left: 2px; - margin-right: 2px; - } - - .mat-button-toggle-appearance-standard .mat-button-toggle-label-content { - line-height: 24px; - font-size: 16px; - font-weight: 500; - .mat-pseudo-checkbox { - display: none; - } - } - - .mat-button-toggle-checked.mat-button-toggle-appearance-standard:not(.mat-button-toggle-disabled):hover .mat-button-toggle-focus-overlay { - opacity: .01; - } - } } } diff --git a/ui-ngx/src/app/modules/home/pages/notification/inbox/inbox-table-header.component.html b/ui-ngx/src/app/modules/home/pages/notification/inbox/inbox-table-header.component.html index 7338a32fc2..8e7263914e 100644 --- a/ui-ngx/src/app/modules/home/pages/notification/inbox/inbox-table-header.component.html +++ b/ui-ngx/src/app/modules/home/pages/notification/inbox/inbox-table-header.component.html @@ -16,12 +16,10 @@ -->
- - {{ 'notification.unread' | translate }} - {{ 'notification.all' | translate }} - - + + {{ 'notification.unread' | translate }} + {{ 'notification.all' | translate }} +
diff --git a/ui-ngx/src/app/modules/home/pages/notification/inbox/inbox-table-header.component.scss b/ui-ngx/src/app/modules/home/pages/notification/inbox/inbox-table-header.component.scss deleted file mode 100644 index af69f47306..0000000000 --- a/ui-ngx/src/app/modules/home/pages/notification/inbox/inbox-table-header.component.scss +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Copyright © 2016-2024 The Thingsboard Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -@import "../../../../../../scss/constants"; - -:host ::ng-deep { - .mat-button-toggle-group.tb-notification-unread-toggle-group { - &.mat-button-toggle-group-appearance-standard { - border: none; - border-radius: 14px; - - .mat-button-toggle + .mat-button-toggle { - border-left: none; - } - } - - .mat-button-toggle { - background: rgba(0, 0, 0, 0.06); - height: 28px; - align-items: center; - display: flex; - - .mat-button-toggle-ripple { - top: 2px; - left: 2px; - right: 2px; - bottom: 2px; - border-radius: 14px; - } - } - - .mat-button-toggle-button { - color: #959595; - } - - .mat-button-toggle-focus-overlay { - border-radius: 14px; - margin: 2px; - } - - .mat-button-toggle-checked .mat-button-toggle-button { - background-color: $tb-primary-color; - color: #fff; - border-radius: 14px; - margin-left: 2px; - margin-right: 2px; - } - - .mat-button-toggle-appearance-standard .mat-button-toggle-label-content { - line-height: 24px; - font-size: 14px; - font-weight: 500; - letter-spacing: .25px; - .mat-pseudo-checkbox { - display: none; - } - } - - .mat-button-toggle-checked.mat-button-toggle-appearance-standard:not(.mat-button-toggle-disabled):hover .mat-button-toggle-focus-overlay { - opacity: .01; - } - } -} diff --git a/ui-ngx/src/app/modules/home/pages/notification/inbox/inbox-table-header.component.ts b/ui-ngx/src/app/modules/home/pages/notification/inbox/inbox-table-header.component.ts index f317f452bd..d3f7cf2005 100644 --- a/ui-ngx/src/app/modules/home/pages/notification/inbox/inbox-table-header.component.ts +++ b/ui-ngx/src/app/modules/home/pages/notification/inbox/inbox-table-header.component.ts @@ -23,7 +23,7 @@ import { Notification } from '@shared/models/notification.models'; @Component({ selector: 'tb-inbox-table-header', templateUrl: './inbox-table-header.component.html', - styleUrls: ['inbox-table-header.component.scss'] + styleUrls: [] }) export class InboxTableHeaderComponent extends EntityTableHeaderComponent { diff --git a/ui-ngx/src/app/modules/home/pages/notification/rule/rule-notification-dialog.component.html b/ui-ngx/src/app/modules/home/pages/notification/rule/rule-notification-dialog.component.html index 23d76e90a3..2d7ef41bd5 100644 --- a/ui-ngx/src/app/modules/home/pages/notification/rule/rule-notification-dialog.component.html +++ b/ui-ngx/src/app/modules/home/pages/notification/rule/rule-notification-dialog.component.html @@ -161,13 +161,11 @@ {{ 'notification.device-activity-trigger-settings' | translate }}
-
- - {{ 'device.device' | translate }} - {{ 'device-profile.device-profile' | translate }} - +
+ + {{ 'device.device' | translate }} + {{ 'device-profile.device-profile' | translate }} +