diff --git a/ui-ngx/src/app/modules/home/components/entity/entity-details-page.component.scss b/ui-ngx/src/app/modules/home/components/entity/entity-details-page.component.scss index c7cd4ec04d..5642681a4e 100644 --- a/ui-ngx/src/app/modules/home/components/entity/entity-details-page.component.scss +++ b/ui-ngx/src/app/modules/home/components/entity/entity-details-page.component.scss @@ -1,5 +1,6 @@ // SPDX-FileCopyrightText: Copyright The ThingsBoard Authors -// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Modifications Copyright ThingsBoard, Inc. +// SPDX-License-Identifier: Apache-2.0 AND BUSL-1.1 @import "../../../../../scss/constants"; :host { @@ -10,10 +11,13 @@ overflow: hidden; .settings-card { - margin: 8px; + margin: $tb-content-spacing; + @media #{$mat-gt-sm} { + margin: $tb-content-spacing-gt-sm; + } padding: 0; - width: 100%; - height: 100%; + flex: 1; + min-height: 0; display: flex; flex-direction: column; diff --git a/ui-ngx/src/app/modules/home/components/pe-pack/request-pe-pack.component.scss b/ui-ngx/src/app/modules/home/components/pe-pack/request-pe-pack.component.scss index 3972ee0965..4af7566a15 100644 --- a/ui-ngx/src/app/modules/home/components/pe-pack/request-pe-pack.component.scss +++ b/ui-ngx/src/app/modules/home/components/pe-pack/request-pe-pack.component.scss @@ -4,9 +4,10 @@ :host { width: 100%; - padding-top: 16px; + padding-top: $tb-content-spacing; padding-bottom: 48px; @media #{$mat-gt-sm} { + padding-top: $tb-content-spacing-gt-sm; padding-left: 16px; padding-right: 16px; } diff --git a/ui-ngx/src/app/modules/home/components/vc/auto-commit-settings.component.scss b/ui-ngx/src/app/modules/home/components/vc/auto-commit-settings.component.scss index 1b85d116b2..29887ae600 100644 --- a/ui-ngx/src/app/modules/home/components/vc/auto-commit-settings.component.scss +++ b/ui-ngx/src/app/modules/home/components/vc/auto-commit-settings.component.scss @@ -1,8 +1,8 @@ // SPDX-FileCopyrightText: Copyright The ThingsBoard Authors -// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Modifications Copyright ThingsBoard, Inc. +// SPDX-License-Identifier: Apache-2.0 AND BUSL-1.1 :host { .mat-mdc-card.auto-commit-settings { - margin: 8px; .mat-divider { position: relative; } diff --git a/ui-ngx/src/app/modules/home/pages/admin/license-management.component.html b/ui-ngx/src/app/modules/home/pages/admin/license-management.component.html index 23d92bcf89..c71fbab53a 100644 --- a/ui-ngx/src/app/modules/home/pages/admin/license-management.component.html +++ b/ui-ngx/src/app/modules/home/pages/admin/license-management.component.html @@ -115,7 +115,7 @@ @switch (manageLicenseState) { @case (ManageLicenseState.MANAGE) { @if (newLicenseApplied) { - + {{ 'subscription.new-license-applied' | translate }} } - +
@@ -284,7 +284,7 @@ } - + @@ -300,7 +300,7 @@ } @case (ManageLicenseState.ENTER_KEY) { - +
`, - styles: [` - :host { - display: block; - height: 100%; - width: 100%; - } - .tb-app-profiles-page { - display: flex; - flex-direction: column; - height: 100%; - min-height: 0; - } - .tb-app-profiles-page-quick-start { - flex: 0 0 auto; - display: grid; - grid-template-rows: 1fr; - margin: 16px 16px 0; - opacity: 1; - visibility: visible; - transition: grid-template-rows 400ms cubic-bezier(0.25, 0.8, 0.25, 1), - margin 400ms cubic-bezier(0.25, 0.8, 0.25, 1), - opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1), - visibility 0s linear 0s; - } - .tb-app-profiles-page-quick-start.collapsed { - grid-template-rows: 0fr; - margin-top: 0; - opacity: 0; - pointer-events: none; - visibility: hidden; - transition: none; - } - .tb-app-profiles-page-quick-start-inner { - min-height: 0; - overflow: hidden; - } - .tb-app-profiles-page-table { - flex: 1 1 auto; - min-height: 0; - display: block; - position: relative; - } - `], + styleUrls: ['./agent-app-profiles-page.component.scss'], standalone: false }) export class AgentAppProfilesPageComponent implements OnInit, OnDestroy { diff --git a/ui-ngx/src/app/modules/home/pages/custom-menu/custom-menu-config.component.scss b/ui-ngx/src/app/modules/home/pages/custom-menu/custom-menu-config.component.scss index 0885c9d76c..1c7483ec24 100644 --- a/ui-ngx/src/app/modules/home/pages/custom-menu/custom-menu-config.component.scss +++ b/ui-ngx/src/app/modules/home/pages/custom-menu/custom-menu-config.component.scss @@ -1,21 +1,20 @@ // SPDX-FileCopyrightText: Copyright ThingsBoard, Inc. // SPDX-License-Identifier: BUSL-1.1 @import "constants"; +@import "mixins"; tb-custom-menu-config { - height: 100%; + flex: 1; + min-height: 0; + display: flex; + flex-direction: column; } .tb-custom-menu-config-card { + @include tb-content-card; padding: 0; - margin: 8px; - height: calc(100% - 16px); - - @media #{$mat-gt-sm} { - width: 700px; - margin: 8px auto; - } - + flex: 1; + min-height: 0; display: flex; flex-direction: column; diff --git a/ui-ngx/src/app/modules/home/pages/custom-menu/custom-menu-table.component.scss b/ui-ngx/src/app/modules/home/pages/custom-menu/custom-menu-table.component.scss index 93a0d35ea5..3e91fc24ac 100644 --- a/ui-ngx/src/app/modules/home/pages/custom-menu/custom-menu-table.component.scss +++ b/ui-ngx/src/app/modules/home/pages/custom-menu/custom-menu-table.component.scss @@ -4,14 +4,10 @@ @import "mixins"; :host { + @include tb-content-card; position: relative; - height: 100%; - margin: 8px; - - @media #{$mat-gt-sm} { - width: 700px; - margin: 8px auto; - } + flex: 1; + min-height: 0; } :host ::ng-deep { diff --git a/ui-ngx/src/app/modules/home/pages/custom-translation/translation-table.component.scss b/ui-ngx/src/app/modules/home/pages/custom-translation/translation-table.component.scss index 25bb6b9e50..81f58b0d21 100644 --- a/ui-ngx/src/app/modules/home/pages/custom-translation/translation-table.component.scss +++ b/ui-ngx/src/app/modules/home/pages/custom-translation/translation-table.component.scss @@ -1,17 +1,11 @@ // SPDX-FileCopyrightText: Copyright ThingsBoard, Inc. // SPDX-License-Identifier: BUSL-1.1 -@import "constants"; - :host { position: relative; - height: 100%; + height: auto; width: auto; - margin: 8px; - - @media #{$mat-gt-sm} { - width: 700px; - margin: 8px auto; - } + flex: 1; + min-height: 0; .tb-entity-table { .tb-entity-table-content { diff --git a/ui-ngx/src/app/modules/home/pages/custom-translation/translation-table.component.ts b/ui-ngx/src/app/modules/home/pages/custom-translation/translation-table.component.ts index 5ac5e723ed..a9c4dcd787 100644 --- a/ui-ngx/src/app/modules/home/pages/custom-translation/translation-table.component.ts +++ b/ui-ngx/src/app/modules/home/pages/custom-translation/translation-table.component.ts @@ -27,6 +27,9 @@ import { UserPermissionsService } from '@core/http/user-permissions.service'; selector: 'tb-translation-table', templateUrl: './translation-table.component.html', styleUrls: ['../../components/entity/entities-table.component.scss', './translation-table.component.scss'], + host: { + 'class': 'tb-content-card' + }, changeDetection: ChangeDetectionStrategy.OnPush, standalone: false }) diff --git a/ui-ngx/src/app/modules/home/pages/profile/profile.component.html b/ui-ngx/src/app/modules/home/pages/profile/profile.component.html index aef247ecaa..f9bb0c5f75 100644 --- a/ui-ngx/src/app/modules/home/pages/profile/profile.component.html +++ b/ui-ngx/src/app/modules/home/pages/profile/profile.component.html @@ -6,7 +6,7 @@ -->
- +
diff --git a/ui-ngx/src/app/modules/home/pages/profile/profile.component.scss b/ui-ngx/src/app/modules/home/pages/profile/profile.component.scss index e652b05ac1..39c5de0818 100644 --- a/ui-ngx/src/app/modules/home/pages/profile/profile.component.scss +++ b/ui-ngx/src/app/modules/home/pages/profile/profile.component.scss @@ -5,11 +5,6 @@ :host { .mat-mdc-card.profile-card { - margin: 8px; - @media #{$mat-gt-sm} { - width: 700px; - margin: 8px auto; - } .mat-headline-5 { margin: 0; } diff --git a/ui-ngx/src/app/modules/home/pages/security/security.component.html b/ui-ngx/src/app/modules/home/pages/security/security.component.html index 0faddba0e9..5576cc7dd0 100644 --- a/ui-ngx/src/app/modules/home/pages/security/security.component.html +++ b/ui-ngx/src/app/modules/home/pages/security/security.component.html @@ -5,8 +5,8 @@ SPDX-License-Identifier: Apache-2.0 AND BUSL-1.1 --> -
- +
+ profile.jwt-token @@ -21,7 +21,7 @@
@if (resource.API_KEY | hasGenericPermission: operation.READ) { - +
api-key.api-keys @@ -37,7 +37,7 @@ } @if (resource.PROFILE | hasGenericPermission: operation.WRITE) { - +
@@ -176,7 +176,7 @@ } @if (allowTwoFactorProviders.length && (resource.PROFILE | hasGenericPermission: operation.WRITE)) { - + admin.2fa.2fa diff --git a/ui-ngx/src/app/modules/home/pages/security/security.component.scss b/ui-ngx/src/app/modules/home/pages/security/security.component.scss index 0f51cd2740..12aa0725b4 100644 --- a/ui-ngx/src/app/modules/home/pages/security/security.component.scss +++ b/ui-ngx/src/app/modules/home/pages/security/security.component.scss @@ -1,17 +1,7 @@ // SPDX-FileCopyrightText: Copyright The ThingsBoard Authors // SPDX-FileCopyrightText: Modifications Copyright ThingsBoard, Inc. // SPDX-License-Identifier: Apache-2.0 AND BUSL-1.1 -@import "constants"; - :host { - .profile-container { - margin: 8px; - @media #{$mat-gt-sm} { - width: 700px; - margin: 8px auto; - } - } - .mat-mdc-card.profile-card { padding: 24px; diff --git a/ui-ngx/src/app/modules/home/pages/trendz-settings/trendz-settings.component.html b/ui-ngx/src/app/modules/home/pages/trendz-settings/trendz-settings.component.html index 8bb74383e6..adaa12e088 100644 --- a/ui-ngx/src/app/modules/home/pages/trendz-settings/trendz-settings.component.html +++ b/ui-ngx/src/app/modules/home/pages/trendz-settings/trendz-settings.component.html @@ -4,7 +4,7 @@ SPDX-License-Identifier: BUSL-1.1 --> -
+
diff --git a/ui-ngx/src/scss/constants.scss b/ui-ngx/src/scss/constants.scss index 002ce54958..f6ad4eea36 100644 --- a/ui-ngx/src/scss/constants.scss +++ b/ui-ngx/src/scss/constants.scss @@ -22,4 +22,8 @@ $mat-md-lg: "screen and (min-width: 960px) and (max-width: 1819px)"; $popover-bg: #fff; +$tb-content-spacing: 8px; +$tb-content-spacing-gt-sm: 16px; +$tb-content-card-width: 700px; + $sidenav-anim-timing: 400ms cubic-bezier(0.25, 0.8, 0.25, 1); diff --git a/ui-ngx/src/scss/mixins.scss b/ui-ngx/src/scss/mixins.scss index 33336351b0..262197b109 100644 --- a/ui-ngx/src/scss/mixins.scss +++ b/ui-ngx/src/scss/mixins.scss @@ -1,5 +1,6 @@ // SPDX-FileCopyrightText: Copyright The ThingsBoard Authors -// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Modifications Copyright ThingsBoard, Inc. +// SPDX-License-Identifier: Apache-2.0 AND BUSL-1.1 @use "sass:math"; @mixin tb-mat-icon-size($size) { @@ -54,3 +55,11 @@ @return $x1; } + +@mixin tb-content-card() { + margin: $tb-content-spacing; + @media #{$mat-gt-sm} { + width: $tb-content-card-width; + margin: $tb-content-spacing-gt-sm auto; + } +} diff --git a/ui-ngx/src/styles.scss b/ui-ngx/src/styles.scss index 42b01a636f..dd9fbd8c9a 100644 --- a/ui-ngx/src/styles.scss +++ b/ui-ngx/src/styles.scss @@ -693,12 +693,16 @@ pre.tb-highlight { } .mat-padding { - padding: 8px; + padding: $tb-content-spacing; @media #{$mat-gt-sm} { - padding: 16px; + padding: $tb-content-spacing-gt-sm; } } + .tb-content-card { + @include tb-content-card; + } + .mat-content { position: relative; overflow: auto;