diff --git a/ui-ngx/src/app/shared/components/time/timewindow-config-dialog.component.scss b/ui-ngx/src/app/shared/components/time/timewindow-config-dialog.component.scss index 705aa17152..ccf1814728 100644 --- a/ui-ngx/src/app/shared/components/time/timewindow-config-dialog.component.scss +++ b/ui-ngx/src/app/shared/components/time/timewindow-config-dialog.component.scss @@ -13,51 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -@import "../../../../scss/constants"; :host { - display: flex; - flex-direction: column; - max-height: 100%; - max-width: 100%; - background-color: #fff; - .tb-timewindow-form { width: 600px; - .tb-flex { - gap: 16px; - } - &.mat-mdc-dialog-content { overflow: hidden; padding: 0; } - - &-content { - overflow: auto; - } } - - .limit-slider-container { - .limit-slider-value { - margin-left: 16px; - min-width: 25px; - max-width: 100px; - } - mat-form-field input[type=number] { - text-align: center; - } - } - - @media #{$mat-gt-sm} { - .limit-slider-container { - > label { - margin-right: 16px; - width: min-content; - max-width: 40%; - } - } - } - } diff --git a/ui-ngx/src/app/shared/components/time/timewindow-config-dialog.component.ts b/ui-ngx/src/app/shared/components/time/timewindow-config-dialog.component.ts index 2d02dea5b5..58733ce498 100644 --- a/ui-ngx/src/app/shared/components/time/timewindow-config-dialog.component.ts +++ b/ui-ngx/src/app/shared/components/time/timewindow-config-dialog.component.ts @@ -48,7 +48,7 @@ export interface TimewindowConfigDialogData { @Component({ selector: 'tb-timewindow-config-dialog', templateUrl: './timewindow-config-dialog.component.html', - styleUrls: ['./timewindow-config-dialog.component.scss'] + styleUrls: ['./timewindow-config-dialog.component.scss', './timewindow-form.scss'] }) export class TimewindowConfigDialogComponent extends PageComponent implements OnInit, OnDestroy { diff --git a/ui-ngx/src/app/shared/components/time/timewindow-form.scss b/ui-ngx/src/app/shared/components/time/timewindow-form.scss new file mode 100644 index 0000000000..e10a62b1f6 --- /dev/null +++ b/ui-ngx/src/app/shared/components/time/timewindow-form.scss @@ -0,0 +1,56 @@ +/** + * 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 { + display: flex; + flex-direction: column; + max-height: 100%; + max-width: 100%; + background-color: #fff; + + .tb-timewindow-form { + .tb-flex { + gap: 16px; + } + + &-content { + overflow: auto; + } + } + + .limit-slider-container { + .limit-slider-value { + margin-left: 16px; + min-width: 25px; + max-width: 100px; + } + mat-form-field input[type=number] { + text-align: center; + } + } + + @media #{$mat-gt-sm} { + .limit-slider-container { + > label { + margin-right: 16px; + width: min-content; + max-width: 40%; + } + } + } + +} diff --git a/ui-ngx/src/app/shared/components/time/timewindow-panel.component.html b/ui-ngx/src/app/shared/components/time/timewindow-panel.component.html index 0db60d5db1..0a0ba06eb9 100644 --- a/ui-ngx/src/app/shared/components/time/timewindow-panel.component.html +++ b/ui-ngx/src/app/shared/components/time/timewindow-panel.component.html @@ -45,28 +45,26 @@ - - - - + + - - - - + + @@ -89,38 +87,35 @@ - - - - + + - - - - + + - - - - + + @@ -195,12 +190,11 @@ - - - - + + diff --git a/ui-ngx/src/app/shared/components/time/timewindow-panel.component.scss b/ui-ngx/src/app/shared/components/time/timewindow-panel.component.scss index f1d978a8ca..3a5ac63b3b 100644 --- a/ui-ngx/src/app/shared/components/time/timewindow-panel.component.scss +++ b/ui-ngx/src/app/shared/components/time/timewindow-panel.component.scss @@ -13,25 +13,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -@import "../../../../scss/constants"; :host { - display: flex; - flex-direction: column; width: 500px; - max-height: 100%; - max-width: 100%; - background-color: #fff; .tb-timewindow-form { display: flex; flex-direction: column; overflow: hidden; - .tb-flex { - gap: 16px; - } - &-header { flex-direction: row; align-items: center; @@ -40,31 +30,5 @@ &-type-options { flex: 1; } - - &-content { - overflow: auto; - } } - - .limit-slider-container { - .limit-slider-value { - margin-left: 16px; - min-width: 25px; - max-width: 100px; - } - mat-form-field input[type=number] { - text-align: center; - } - } - - @media #{$mat-gt-sm} { - .limit-slider-container { - > label { - margin-right: 16px; - width: min-content; - max-width: 40%; - } - } - } - } diff --git a/ui-ngx/src/app/shared/components/time/timewindow-panel.component.ts b/ui-ngx/src/app/shared/components/time/timewindow-panel.component.ts index dc1e2663dc..02874f3523 100644 --- a/ui-ngx/src/app/shared/components/time/timewindow-panel.component.ts +++ b/ui-ngx/src/app/shared/components/time/timewindow-panel.component.ts @@ -59,7 +59,7 @@ export const TIMEWINDOW_PANEL_DATA = new InjectionToken('TimewindowPanelDat @Component({ selector: 'tb-timewindow-panel', templateUrl: './timewindow-panel.component.html', - styleUrls: ['./timewindow-panel.component.scss'] + styleUrls: ['./timewindow-panel.component.scss', './timewindow-form.scss'] }) export class TimewindowPanelComponent extends PageComponent implements OnInit, OnDestroy {