thingsboard/ui-ngx/src/app/modules/home/components/alarm/alarm-comment.component.scss

214 lines
4.2 KiB
SCSS
Raw Normal View History

/**
* Copyright © 2016-2023 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.
*/
2023-03-29 12:15:46 +03:00
@use '@angular/material' as mat;
@import '../theme.scss';
$primary-color: rgba(mat.get-color-from-palette($tb-primary, 50), 0.4);
2023-03-29 12:15:46 +03:00
$border: 1px solid mat.get-color-from-palette($tb-primary);
:host {
.tb-alarm-comments {
background-color: $primary-color;
max-width: 600px;
2023-03-29 12:15:46 +03:00
width: 100%;
2023-03-29 12:15:46 +03:00
.comment-input {
position: sticky;
z-index: 1;
2023-03-29 12:15:46 +03:00
.inner-wrap {
border: $border;
padding: 0 24px;
background-color: $primary-color;
}
2023-03-29 12:15:46 +03:00
&.oldest-first {
bottom: -24px;
box-shadow: 0px -4px 12px rgba(0, 0, 0, 0.04);
.inner-wrap {
border-radius: 0 0 8px 8px;
}
&.activity-only {
bottom: -1px;
.inner-wrap {
border: none
}
}
}
&.newest-first {
top: 24px;
box-shadow: 0 8px 10px rgba(23, 33, 90, 0.08);
.inner-wrap {
border-top: none;
}
&.activity-only {
top: 48px;
box-shadow: 0 8px 10px rgba(23, 33, 90, 0.08);
.inner-wrap {
border: none;
}
}
}
}
2023-03-29 12:15:46 +03:00
.header {
z-index: 1;
position: sticky;
top: -24px;
background-color: white;
&.activity-only {
top: 0;
}
&-container {
padding: 0 24px;
background-color: $primary-color;
2023-03-29 12:15:46 +03:00
border: $border;
border-bottom: none;
border-radius: 8px 8px 0px 0px;
&.activity-only {
border: none;
}
&.asc {
border-bottom: $border;
box-shadow: 0px 4px 10px rgba(23, 33, 90, 0.08);
&.activity-only {
border: none;
}
}
.header-title {
color: rgba(0, 0, 0, 0.76);
letter-spacing: 0.25px;
font-weight: 500;
}
.mat-icon {
color: rgba(0, 0, 0, 0.38);
}
}
}
.comments-container {
border: $border;
border-top: none;
border-radius: 0px 0px 8px 8px;
&.activity-only {
border: none;
}
&.asc {
border-bottom: none;
border-radius: unset;
}
}
.user-comment {
padding: 4px;
border-radius: 8px;
&:hover {
background-color: $primary-color;
2023-03-29 12:15:46 +03:00
}
}
.user-avatar {
width: 28px;
min-width: 28px;
height: 28px;
min-height: 28px;
border-radius: 50%;
font-weight: 700;
2023-03-29 12:15:46 +03:00
color: white;
font-size: 13px;
}
2023-03-29 12:15:46 +03:00
.user-name {
font-size: 16px;
color: rgba(0, 0, 0, 0.76);
font-weight: 500;
letter-spacing: 0.25px;
}
2023-03-29 12:15:46 +03:00
.time {
font-size: 14px;
font-weight: 400;
color: rgba(0, 0, 0, 0.38);
2023-03-29 12:15:46 +03:00
letter-spacing: 0.2px;
border-radius: 16px;
padding: 0 3px;
&:hover {
background: rgba(0, 0, 0, 0.04);
}
}
2023-03-29 12:15:46 +03:00
.system-text {
font-weight: 500;
2023-03-29 12:15:46 +03:00
font-size: 14px;
letter-spacing: 0.25px;
2023-03-29 12:15:46 +03:00
color: rgba(0, 0, 0, 0.38);
}
2023-03-29 12:15:46 +03:00
.text {
white-space: pre-line;
word-break: break-word;
2023-03-29 12:15:46 +03:00
font-size: 16px;
letter-spacing: 0.15px;
2023-03-29 12:15:46 +03:00
color: rgba(0, 0, 0, 0.54);
}
2023-03-29 12:15:46 +03:00
.action-buttons {
visibility: hidden;
.mat-icon {
color: rgba(0, 0, 0, 0.38);
}
}
.show-buttons {
visibility: visible;
}
.green-button {
color: #00695C;
}
.red-button {
color: #D12730;
}
.mat-form-field {
font-size: 16px;
letter-spacing: 0.15px;
color: rgba(0, 0, 0, 0.76);
}
textarea {
letter-spacing: 0.15px;
}
}
}