From 54941bbaf3a7c90ca6fad6d22b4dcd1dc58f1ad2 Mon Sep 17 00:00:00 2001 From: Igor Kulikov Date: Fri, 11 Oct 2024 18:26:03 +0300 Subject: [PATCH] Flex layout replacements. Switch to tailwind.css. --- .../send-notification-button.component.html | 6 ++-- .../show-notification-popover.component.html | 6 ++-- .../add-device-profile-dialog.component.html | 14 ++++---- ...rm-duration-predicate-value.component.html | 14 ++++---- .../alarm/alarm-dynamic-value.component.html | 16 +++++----- ...alarm-rule-condition-dialog.component.html | 13 ++++---- .../alarm/alarm-rule-condition.component.html | 6 ++-- .../profile/alarm/alarm-rule.component.html | 7 ++-- .../alarm-schedule-dialog.component.html | 4 +-- .../alarm/alarm-schedule-info.component.html | 2 +- .../alarm/alarm-schedule.component.html | 32 +++++++++---------- .../alarm/create-alarm-rules.component.html | 12 +++---- .../alarm/device-profile-alarm.component.html | 30 ++++++++--------- .../device-profile-alarms.component.html | 8 ++--- .../edit-alarm-details-dialog.component.html | 6 ++-- .../asset-profile-autocomplete.component.html | 2 +- .../asset-profile-dialog.component.html | 4 +-- .../profile/asset-profile.component.html | 18 +++++------ ...device-profile-autocomplete.component.html | 2 +- .../device-profile-dialog.component.html | 4 +-- ...ile-provision-configuration.component.html | 8 ++--- .../profile/device-profile.component.html | 20 ++++++------ ...tenant-profile-autocomplete.component.html | 2 +- .../tenant-profile-dialog.component.html | 4 +-- .../profile/tenant-profile.component.html | 16 +++++----- ui-ngx/tailwind.config.js | 14 +++++++- 26 files changed, 141 insertions(+), 129 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/notification/send-notification-button.component.html b/ui-ngx/src/app/modules/home/components/notification/send-notification-button.component.html index 6ad39f1a91..0dc3af27ea 100644 --- a/ui-ngx/src/app/modules/home/components/notification/send-notification-button.component.html +++ b/ui-ngx/src/app/modules/home/components/notification/send-notification-button.component.html @@ -15,12 +15,12 @@ limitations under the License. --> -
- -
diff --git a/ui-ngx/src/app/modules/home/components/notification/show-notification-popover.component.html b/ui-ngx/src/app/modules/home/components/notification/show-notification-popover.component.html index d96739a5cf..29e49e52bc 100644 --- a/ui-ngx/src/app/modules/home/components/notification/show-notification-popover.component.html +++ b/ui-ngx/src/app/modules/home/components/notification/show-notification-popover.component.html @@ -15,7 +15,7 @@ limitations under the License. --> -
+
notification.notification
diff --git a/ui-ngx/src/app/modules/home/components/profile/add-device-profile-dialog.component.html b/ui-ngx/src/app/modules/home/components/profile/add-device-profile-dialog.component.html index 3b45e4dcfb..524456a8c8 100644 --- a/ui-ngx/src/app/modules/home/components/profile/add-device-profile-dialog.component.html +++ b/ui-ngx/src/app/modules/home/components/profile/add-device-profile-dialog.component.html @@ -17,7 +17,7 @@ -->

device-profile.add

- +
- + -
+
diff --git a/ui-ngx/src/app/modules/home/components/profile/alarm/alarm-duration-predicate-value.component.html b/ui-ngx/src/app/modules/home/components/profile/alarm/alarm-duration-predicate-value.component.html index 4de4aa5764..6f3ee1eead 100644 --- a/ui-ngx/src/app/modules/home/components/profile/alarm/alarm-duration-predicate-value.component.html +++ b/ui-ngx/src/app/modules/home/components/profile/alarm/alarm-duration-predicate-value.component.html @@ -15,8 +15,8 @@ limitations under the License. --> -
-
+
+
-
-
-
+
+
+
@@ -50,13 +50,13 @@
-
+
{{ 'filter.inherit-owner' | translate}} diff --git a/ui-ngx/src/app/modules/home/components/profile/alarm/alarm-dynamic-value.component.html b/ui-ngx/src/app/modules/home/components/profile/alarm/alarm-dynamic-value.component.html index 066398877f..99114f1aa0 100644 --- a/ui-ngx/src/app/modules/home/components/profile/alarm/alarm-dynamic-value.component.html +++ b/ui-ngx/src/app/modules/home/components/profile/alarm/alarm-dynamic-value.component.html @@ -15,21 +15,21 @@ limitations under the License. --> - + -
+
-
+
{{'filter.dynamic-value' | translate}}
- +
-
-
-
+
+
+
@@ -41,7 +41,7 @@
-
+
diff --git a/ui-ngx/src/app/modules/home/components/profile/alarm/alarm-rule-condition-dialog.component.html b/ui-ngx/src/app/modules/home/components/profile/alarm/alarm-rule-condition-dialog.component.html index a159202485..1a7aa46f01 100644 --- a/ui-ngx/src/app/modules/home/components/profile/alarm/alarm-rule-condition-dialog.component.html +++ b/ui-ngx/src/app/modules/home/components/profile/alarm/alarm-rule-condition-dialog.component.html @@ -18,7 +18,7 @@

{{ (readonly ? 'device-profile.alarm-rule-condition' : 'device-profile.edit-alarm-rule-condition') | translate }}

- +
-
+
{{ ('device-profile.alarm-rule-mobile-dashboard' | translate) + ': ' }} diff --git a/ui-ngx/src/app/modules/home/components/profile/alarm/alarm-schedule-dialog.component.html b/ui-ngx/src/app/modules/home/components/profile/alarm/alarm-schedule-dialog.component.html index 99807094cb..aecae6275a 100644 --- a/ui-ngx/src/app/modules/home/components/profile/alarm/alarm-schedule-dialog.component.html +++ b/ui-ngx/src/app/modules/home/components/profile/alarm/alarm-schedule-dialog.component.html @@ -18,7 +18,7 @@

{{ (readonly ? 'device-profile.schedule' : 'device-profile.edit-schedule') | translate }}

- +
-
+
- device-profile.add-create-alarm-rule-prompt
diff --git a/ui-ngx/src/app/modules/home/components/profile/alarm/device-profile-alarm.component.html b/ui-ngx/src/app/modules/home/components/profile/alarm/device-profile-alarm.component.html index 502d80fb31..72fd44e1e8 100644 --- a/ui-ngx/src/app/modules/home/components/profile/alarm/device-profile-alarm.component.html +++ b/ui-ngx/src/app/modules/home/components/profile/alarm/device-profile-alarm.component.html @@ -15,15 +15,15 @@ limitations under the License. --> - + -
+
-
+
{{ alarmTypeTitle }}
- +
- device-profile.no-clear-alarm-rule + device-profile.no-clear-alarm-rule
-
+
-
+
-
+
-
+
@@ -83,7 +83,7 @@ [ruleChainType]="edgeRuleChainType"> {{'asset-profile.default-edge-rule-chain-hint' | translate}} - diff --git a/ui-ngx/src/app/modules/home/components/profile/device-profile-autocomplete.component.html b/ui-ngx/src/app/modules/home/components/profile/device-profile-autocomplete.component.html index cae46d2864..fc24273b78 100644 --- a/ui-ngx/src/app/modules/home/components/profile/device-profile-autocomplete.component.html +++ b/ui-ngx/src/app/modules/home/components/profile/device-profile-autocomplete.component.html @@ -25,7 +25,7 @@ (keydown)="deviceProfileEnter($event)" (keypress)="deviceProfileEnter($event)" [matAutocomplete]="deviceProfileAutocomplete" - [fxShow]="!showDetailsPageLink || !useDeviceProfileLink || !disabled || !selectDeviceProfileFormGroup.get('deviceProfile').value"> + [class.!hidden]="showDetailsPageLink && useDeviceProfileLink && disabled && selectDeviceProfileFormGroup.get('deviceProfile').value"> {{ displayDeviceProfileFn(selectDeviceProfileFormGroup.get('deviceProfile').value) }} diff --git a/ui-ngx/src/app/modules/home/components/profile/device-profile-dialog.component.html b/ui-ngx/src/app/modules/home/components/profile/device-profile-dialog.component.html index ed1704e47d..79e0939dd7 100644 --- a/ui-ngx/src/app/modules/home/components/profile/device-profile-dialog.component.html +++ b/ui-ngx/src/app/modules/home/components/profile/device-profile-dialog.component.html @@ -18,7 +18,7 @@

{{ (isAdd ? 'device-profile.add' : 'device-profile.edit' ) | translate }}

- +
-
+
-
+
-
+
@@ -97,7 +97,7 @@ [deviceProfileId]="deviceProfileId?.id" formControlName="softwareId"> - + device-profile.type @@ -108,7 +108,7 @@ {{ 'device-profile.type-required' | translate }} - diff --git a/ui-ngx/src/app/modules/home/components/profile/tenant-profile-autocomplete.component.html b/ui-ngx/src/app/modules/home/components/profile/tenant-profile-autocomplete.component.html index 75ea30c884..b49fe5fbfe 100644 --- a/ui-ngx/src/app/modules/home/components/profile/tenant-profile-autocomplete.component.html +++ b/ui-ngx/src/app/modules/home/components/profile/tenant-profile-autocomplete.component.html @@ -25,7 +25,7 @@ (keydown)="tenantProfileEnter($event)" (keypress)="tenantProfileEnter($event)" [matAutocomplete]="tenantProfileAutocomplete" - [fxShow]="!showDetailsPageLink || !disabled || !selectTenantProfileFormGroup.get('tenantProfile').value"> + [class.!hidden]="showDetailsPageLink && disabled && selectTenantProfileFormGroup.get('tenantProfile').value"> {{ displayTenantProfileFn(selectTenantProfileFormGroup.get('tenantProfile').value) }} diff --git a/ui-ngx/src/app/modules/home/components/profile/tenant-profile-dialog.component.html b/ui-ngx/src/app/modules/home/components/profile/tenant-profile-dialog.component.html index 1d8c0ce26d..b3c3e4504a 100644 --- a/ui-ngx/src/app/modules/home/components/profile/tenant-profile-dialog.component.html +++ b/ui-ngx/src/app/modules/home/components/profile/tenant-profile-dialog.component.html @@ -18,7 +18,7 @@

{{ (isAdd ? 'tenant-profile.add' : 'tenant-profile.edit' ) | translate }}

- +
-
+
-
+
-
+
@@ -58,7 +58,7 @@ {{ 'tenant-profile.name-max-length' | translate }} -
+
{{ 'tenant.isolated-tb-rule-engine' | translate }}
{{'tenant.isolated-tb-rule-engine-details' | translate}}
diff --git a/ui-ngx/tailwind.config.js b/ui-ngx/tailwind.config.js index 8a397b4272..f29ff314b4 100644 --- a/ui-ngx/tailwind.config.js +++ b/ui-ngx/tailwind.config.js @@ -61,18 +61,28 @@ module.exports = { } }, extend: { + flexBasis: { + '25': '6.25rem', + '37.5': '9.375rem' + }, flex: { full: '1 1 100%' }, gap: { '0.75': '0.1875rem' }, + minWidth: { + '25': '6.25rem', + '37.5': '9.375rem' + }, maxWidth: { '5%': '5%', '8%': '8%', '10%': '10%', '15%': '15%', + '17%': '17%', '20%': '20%', + '23%': '23%', '25%': '25%', '30%': '30%', '35%': '35%', @@ -103,7 +113,9 @@ module.exports = { '7/12': '58.333333%', '8/12': '66.666667%', '10/12': '83.333333%', - '11/12': '91.666667%' + '11/12': '91.666667%', + '25': '6.25rem', + '37.5': '9.375rem' } }, },