From cb546e7bd52022a479cd1fd65a0ffe92b1780efc Mon Sep 17 00:00:00 2001 From: Vladyslav_Prykhodko Date: Wed, 13 Sep 2023 13:42:22 +0300 Subject: [PATCH] UI: Fixed form style and enhancement hint tooltip component --- .../gateway-configuration.component.html | 30 +++++++++---------- .../gateway/gateway-connectors.component.html | 2 +- .../components/file-input.component.html | 13 ++++---- .../components/file-input.component.scss | 4 +-- .../hint-tooltip-icon.component.html | 5 ++-- .../hint-tooltip-icon.component.scss | 4 ++- .../components/hint-tooltip-icon.component.ts | 3 +- ui-ngx/src/form.scss | 2 +- 8 files changed, 31 insertions(+), 32 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-configuration.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-configuration.component.html index 59b63d0051..9b0b8837e2 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-configuration.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-configuration.component.html @@ -34,7 +34,7 @@ {{ 'gateway.remote-shell' | translate }} -
+
gateway.thingsboard-host @@ -84,7 +84,7 @@ matTooltip="{{ 'gateway.hints.token' | translate }}">info_outlined -
security.clientId @@ -181,7 +181,7 @@ class="first-capital">{{ localLogsConfigTranslateMap.get(logConfig) }} -
+
gateway.logs.level @@ -196,8 +196,8 @@
-
-
+
+
gateway.logs.saving-period @@ -250,7 +250,7 @@
{{ 'gateway.hints.' + gatewayConfigGroup.get('storage.type').value | translate }}
-
+
gateway.storage-read-record-count @@ -285,7 +285,7 @@
-
+
gateway.storage-data-folder-path @@ -315,7 +315,7 @@
-
+
gateway.storage-max-read-record-count @@ -351,7 +351,7 @@
-
+
gateway.storage-path @@ -413,7 +413,7 @@
-
+
gateway.server-port @@ -450,7 +450,7 @@
-
+
gateway.grpc-keep-alive @@ -484,7 +484,7 @@
-
+
gateway.grpc-max-pings-without-data @@ -552,7 +552,7 @@
-
+
gateway.statistics.attribute-name @@ -619,7 +619,7 @@ {{ 'gateway.checking-device-activity' | translate }}
-
gateway.inactivity-timeout-seconds @@ -655,7 +655,7 @@
gateway.advanced
-
+
gateway.min-pack-send-delay diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-connectors.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-connectors.component.html index 4debb6a62f..0c21261091 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-connectors.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-connectors.component.html @@ -143,7 +143,7 @@
-
+
{{ 'gateway.connectors-table-name' | translate }} diff --git a/ui-ngx/src/app/shared/components/file-input.component.html b/ui-ngx/src/app/shared/components/file-input.component.html index c0c004d02c..398f78451d 100644 --- a/ui-ngx/src/app/shared/components/file-input.component.html +++ b/ui-ngx/src/app/shared/components/file-input.component.html @@ -16,14 +16,11 @@ -->
- - - - - - +
diff --git a/ui-ngx/src/app/shared/components/file-input.component.scss b/ui-ngx/src/app/shared/components/file-input.component.scss index 45ed704336..e172abd6e9 100644 --- a/ui-ngx/src/app/shared/components/file-input.component.scss +++ b/ui-ngx/src/app/shared/components/file-input.component.scss @@ -22,10 +22,8 @@ $previewSize: 100px !default; .tb-container { margin-top: 0; label.tb-title { + display: flex; padding-bottom: 8px; - &:not(.pointer-event) { - display: block; - } } } diff --git a/ui-ngx/src/app/shared/components/hint-tooltip-icon.component.html b/ui-ngx/src/app/shared/components/hint-tooltip-icon.component.html index 7fff74a55e..63feb714d6 100644 --- a/ui-ngx/src/app/shared/components/hint-tooltip-icon.component.html +++ b/ui-ngx/src/app/shared/components/hint-tooltip-icon.component.html @@ -17,5 +17,6 @@ --> {{ hintIcon }} + *ngIf="tooltipText" + matTooltip="{{ tooltipText }}" + [matTooltipPosition]="tooltipPosition">{{ hintIcon }} diff --git a/ui-ngx/src/app/shared/components/hint-tooltip-icon.component.scss b/ui-ngx/src/app/shared/components/hint-tooltip-icon.component.scss index 4febf04f15..80e36d117d 100644 --- a/ui-ngx/src/app/shared/components/hint-tooltip-icon.component.scss +++ b/ui-ngx/src/app/shared/components/hint-tooltip-icon.component.scss @@ -13,12 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -:host { +:host(.tb-hint-tooltip) { display: flex; flex-direction: row; align-items: center; gap: 8px; +} +:host { .tb-hint-tooltip-icon { color: #E0E0E0; overflow: visible; diff --git a/ui-ngx/src/app/shared/components/hint-tooltip-icon.component.ts b/ui-ngx/src/app/shared/components/hint-tooltip-icon.component.ts index 2d6ee282c1..dde6dc98e8 100644 --- a/ui-ngx/src/app/shared/components/hint-tooltip-icon.component.ts +++ b/ui-ngx/src/app/shared/components/hint-tooltip-icon.component.ts @@ -14,7 +14,7 @@ /// limitations under the License. /// -import { Component, Input } from '@angular/core'; +import { Component, HostBinding, Input } from '@angular/core'; import { TooltipPosition } from '@angular/material/tooltip'; @Component({ @@ -24,6 +24,7 @@ import { TooltipPosition } from '@angular/material/tooltip'; }) export class HintTooltipIconComponent { + @HostBinding('class.tb-hint-tooltip') @Input('tb-hint-tooltip-icon') tooltipText: string; @Input() diff --git a/ui-ngx/src/form.scss b/ui-ngx/src/form.scss index 63f126f405..77a31eeb2e 100644 --- a/ui-ngx/src/form.scss +++ b/ui-ngx/src/form.scss @@ -221,7 +221,7 @@ } } - .tb-form-row:not(.tb-not-inline-field) .mat-mdc-form-field, .mat-mdc-form-field.tb-inline-field { + .tb-form-row:not(.tb-standard-fields) .mat-mdc-form-field:not(.tb-not-inline-field), .mat-mdc-form-field.tb-inline-field { &.mat-form-field-appearance-fill { .mdc-text-field--filled:not(.mdc-text-field--disabled) { &:before {