2019-10-31 10:06:57 +02:00
|
|
|
/**
|
2023-01-31 10:43:56 +02:00
|
|
|
* Copyright © 2016-2023 The Thingsboard Authors
|
2019-10-31 10:06:57 +02:00
|
|
|
*
|
|
|
|
|
* 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";
|
|
|
|
|
|
2023-08-03 19:26:35 +03:00
|
|
|
$containerHeight: 96px !default;
|
|
|
|
|
$previewSize: 78px !default;
|
2019-10-31 10:06:57 +02:00
|
|
|
|
|
|
|
|
:host {
|
|
|
|
|
|
|
|
|
|
.tb-container {
|
2020-04-27 09:27:14 +03:00
|
|
|
margin-top: 0;
|
2023-03-07 16:03:14 +02:00
|
|
|
padding: 0;
|
2019-10-31 10:06:57 +02:00
|
|
|
label.tb-title {
|
|
|
|
|
display: block;
|
|
|
|
|
padding-bottom: 8px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.tb-image-select-container {
|
|
|
|
|
width: 100%;
|
2022-05-11 15:58:15 +03:00
|
|
|
height: $containerHeight;
|
2023-08-03 19:26:35 +03:00
|
|
|
display: flex;
|
|
|
|
|
gap: 12px;
|
|
|
|
|
align-items: center;
|
2022-05-11 15:58:15 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.image-container {
|
2023-08-03 19:26:35 +03:00
|
|
|
background: #F3F6FA;
|
2022-05-11 15:58:15 +03:00
|
|
|
border-radius: 4px;
|
2023-08-03 19:26:35 +03:00
|
|
|
border: 1px solid rgba(0, 0, 0, 0.05);
|
|
|
|
|
padding: 8px 12px 8px 8px;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 12px;
|
|
|
|
|
&.disabled {
|
|
|
|
|
padding: 8px;
|
|
|
|
|
}
|
2022-05-11 15:58:15 +03:00
|
|
|
}
|
|
|
|
|
|
2023-08-03 19:26:35 +03:00
|
|
|
.tb-image-preview-container {
|
|
|
|
|
width: $previewSize;
|
2019-10-31 10:06:57 +02:00
|
|
|
height: $previewSize;
|
2023-08-03 19:26:35 +03:00
|
|
|
border: 1px solid rgba(0, 0, 0, 0.12);
|
|
|
|
|
background: #fff;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.tb-image-preview-text {
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
text-align: center;
|
2019-10-31 10:06:57 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.tb-image-preview {
|
|
|
|
|
width: auto;
|
2022-05-11 15:58:15 +03:00
|
|
|
max-width: $previewSize - 2px;
|
2019-10-31 10:06:57 +02:00
|
|
|
height: auto;
|
2022-05-11 15:58:15 +03:00
|
|
|
max-height: $previewSize - 2px;
|
2019-10-31 10:06:57 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.file-input {
|
|
|
|
|
display: none;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.tb-flow-drop {
|
2023-08-03 19:26:35 +03:00
|
|
|
height: 100%;
|
|
|
|
|
flex: 1;
|
2019-10-31 10:06:57 +02:00
|
|
|
overflow: hidden;
|
2022-05-11 15:58:15 +03:00
|
|
|
border: 2px dashed rgba(0, 0, 0, 0.2);
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
box-sizing: border-box;
|
2019-10-31 10:06:57 +02:00
|
|
|
|
2022-05-11 15:58:15 +03:00
|
|
|
.upload-label {
|
2019-10-31 10:06:57 +02:00
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
2022-05-11 15:58:15 +03:00
|
|
|
padding: 0 16px;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: row;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
align-items: center;
|
2023-08-03 19:26:35 +03:00
|
|
|
gap: 8px;
|
2022-05-11 15:58:15 +03:00
|
|
|
.mat-icon {
|
2023-08-03 19:26:35 +03:00
|
|
|
color: rgba(0,0,0,0.12);
|
|
|
|
|
}
|
|
|
|
|
.upload-text-area {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
align-items: center;
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
line-height: 24px;
|
|
|
|
|
color: rgba(0, 0, 0, 0.54);
|
|
|
|
|
text-align: center;
|
|
|
|
|
.hide-xs {
|
|
|
|
|
@media #{$mat-xs} {
|
|
|
|
|
display: none;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.upload-button-area {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
align-items: flex-start;
|
|
|
|
|
gap: 6px;
|
2019-10-31 10:06:57 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2021-02-04 19:00:28 +02:00
|
|
|
|
|
|
|
|
.tb-hint{
|
|
|
|
|
margin-top: 8px;
|
|
|
|
|
}
|
2019-10-31 10:06:57 +02:00
|
|
|
}
|
2022-05-11 15:58:15 +03:00
|
|
|
|
|
|
|
|
:host ::ng-deep {
|
2023-08-03 19:26:35 +03:00
|
|
|
button.mat-mdc-button.mat-mdc-button-base.browse-file {
|
2022-05-11 15:58:15 +03:00
|
|
|
padding: 0;
|
2023-08-03 19:26:35 +03:00
|
|
|
min-width: 0;
|
|
|
|
|
height: 24px;
|
2022-05-11 15:58:15 +03:00
|
|
|
font-size: 16px;
|
2023-05-22 17:37:00 +03:00
|
|
|
label {
|
2022-05-11 15:58:15 +03:00
|
|
|
display: block;
|
2023-02-20 19:23:26 +02:00
|
|
|
cursor: pointer;
|
2022-05-11 15:58:15 +03:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|