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";
|
|
|
|
|
|
2022-05-11 15:58:15 +03:00
|
|
|
$containerHeight: 120px !default;
|
|
|
|
|
$previewContainerWidth: 168px !default;
|
|
|
|
|
$previewSize: 96px !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 {
|
|
|
|
|
position: relative;
|
|
|
|
|
width: 100%;
|
2022-05-11 15:58:15 +03:00
|
|
|
height: $containerHeight;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.image-container {
|
|
|
|
|
position: relative;
|
|
|
|
|
float: left;
|
|
|
|
|
height: $containerHeight;
|
|
|
|
|
padding: 12px;
|
|
|
|
|
margin-right: 8px;
|
|
|
|
|
background: rgba(0, 0, 0, 0.03);
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.image-content-container {
|
|
|
|
|
background: #FFFFFF;
|
|
|
|
|
border: 1px solid rgba(0, 0, 0, 0.2);
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
padding-left: 8px;
|
2019-10-31 10:06:57 +02:00
|
|
|
height: $previewSize;
|
2022-05-11 15:58:15 +03:00
|
|
|
&.no-padding {
|
|
|
|
|
padding-left: 0px;
|
|
|
|
|
}
|
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
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.tb-image-preview-container {
|
|
|
|
|
position: relative;
|
|
|
|
|
float: left;
|
|
|
|
|
width: $previewSize;
|
|
|
|
|
height: $previewSize;
|
2022-05-11 15:58:15 +03:00
|
|
|
margin-top: -1px;
|
|
|
|
|
margin-bottom: -1px;
|
|
|
|
|
border: 1px solid rgba(0, 0, 0, 0.54);
|
2019-10-31 10:06:57 +02:00
|
|
|
|
|
|
|
|
div {
|
|
|
|
|
width: 100%;
|
|
|
|
|
font-size: 18px;
|
|
|
|
|
text-align: center;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
div,
|
|
|
|
|
.tb-image-preview {
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 50%;
|
|
|
|
|
left: 50%;
|
|
|
|
|
transform: translate(-50%, -50%);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.tb-image-clear-container {
|
|
|
|
|
position: relative;
|
|
|
|
|
float: right;
|
|
|
|
|
height: $previewSize;
|
2022-05-11 15:58:15 +03:00
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
&.full-height {
|
|
|
|
|
height: $containerHeight;
|
|
|
|
|
}
|
2019-10-31 10:06:57 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.file-input {
|
|
|
|
|
display: none;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.tb-flow-drop {
|
|
|
|
|
position: relative;
|
2022-05-11 15:58:15 +03:00
|
|
|
height: $containerHeight;
|
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
|
|
|
&.float-left {
|
|
|
|
|
float: left;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.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;
|
2019-10-31 10:06:57 +02:00
|
|
|
font-size: 16px;
|
2022-05-11 15:58:15 +03:00
|
|
|
color: rgba(0, 0, 0, 0.54);
|
2019-10-31 10:06:57 +02:00
|
|
|
text-align: center;
|
2022-05-11 15:58:15 +03:00
|
|
|
.mat-icon {
|
|
|
|
|
margin-right: 17px;
|
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 {
|
|
|
|
|
button.browse-file {
|
|
|
|
|
padding: 0;
|
|
|
|
|
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;
|
|
|
|
|
padding: 0 16px;
|
2022-05-11 15:58:15 +03:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|