signal-desktop/stylesheets/components/MessageDetail.scss

205 lines
3.8 KiB
SCSS
Raw Normal View History

2023-01-03 19:55:46 +00:00
// Copyright 2018 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
.module-message-detail {
max-width: 650px;
2023-04-20 17:03:43 +00:00
margin-inline: auto;
padding: 20px;
outline: none;
}
.module-message-detail__message-container {
padding-top: 20px;
padding-bottom: 20px;
&::after {
content: '.';
visibility: hidden;
display: block;
height: 0;
clear: both;
}
}
.module-message-detail__label {
@include font-body-1-bold;
min-width: 72px;
}
2022-07-25 18:55:44 +00:00
.module-message-detail__unix-timestamp-menu__button {
}
.module-message-detail__unix-timestamp {
@include light-theme {
color: $color-gray-05;
}
@include dark-theme {
color: $color-gray-45;
}
}
.module-message-detail__contact-group__header {
@include font-body-1-bold;
align-items: center;
display: flex;
justify-content: space-between;
margin-top: 24px;
2023-04-20 17:03:43 +00:00
padding-block: 10px;
padding-inline: 0;
user-select: none;
&:first-child {
margin-top: 36px;
}
&--Failed,
&--Viewed,
&--Read,
&--Delivered,
&--Sent,
&--Pending {
&:after {
content: '';
display: block;
flex-shrink: 0;
height: 12px;
2023-04-20 17:03:43 +00:00
margin-inline-start: 10px;
}
}
&--Failed:after {
width: 12px;
@include light-theme {
@include color-svg(
2023-05-04 18:04:22 +00:00
'../images/icons/v3/error/error-circle-compact.svg',
$color-accent-red
);
}
@include dark-theme {
@include color-svg(
2023-05-04 18:04:22 +00:00
'../images/icons/v3/error/error-circle-compact.svg',
$color-accent-red
);
}
}
@mixin normal-icon($icon) {
@include light-theme {
@include color-svg($icon, $color-gray-60);
}
@include dark-theme {
@include color-svg($icon, $color-gray-25);
}
}
&--Viewed:after,
&--Read:after {
// Viewed and read deliberately have the same icon.
width: 18px;
2023-05-04 21:39:13 +00:00
@include normal-icon(
'../images/icons/v3/message_status/messagestatus-read.svg'
);
}
&--Delivered:after {
width: 18px;
2023-05-04 21:39:13 +00:00
@include normal-icon(
'../images/icons/v3/message_status/messagestatus-delivered.svg'
);
}
&--Sent:after {
width: 12px;
2023-05-04 21:39:13 +00:00
@include normal-icon(
'../images/icons/v3/message_status/messagestatus-sent.svg'
);
}
&--Pending:after {
width: 12px;
animation: rotate 4s linear infinite;
2023-05-04 21:39:13 +00:00
@include normal-icon(
'../images/icons/v3/message_status/messagestatus-sending.svg'
);
}
}
.module-message-detail__contact {
margin-bottom: 8px;
2023-04-20 17:03:43 +00:00
padding-block: 8px;
padding-inline: 0;
display: flex;
flex-direction: row;
align-items: center;
&:last-child {
margin-bottom: 0;
}
}
.module-message-detail__contact__text {
@include font-body-1;
flex-grow: 1;
2023-04-20 17:03:43 +00:00
margin-inline-start: 10px;
}
.module-message-detail__contact__error {
color: $color-accent-red;
font-weight: bold;
}
.module-message-detail__contact__unidentified-delivery-icon {
2023-04-20 17:03:43 +00:00
margin-inline-start: 6px;
width: 18px;
height: 18px;
display: inline-block;
@include light-theme {
@include color-svg(
'../images/icons/v2/unidentified-delivery-solid-20.svg',
$color-gray-60
);
}
@include dark-theme {
@include color-svg(
'../images/icons/v2/unidentified-delivery-solid-20.svg',
$color-gray-25
);
}
}
.module-message-detail__contact__error-buttons {
2023-04-20 17:03:43 +00:00
text-align: end;
}
.module-message-detail__contact__show-safety-number {
@include button-reset;
padding: 4px;
border-radius: 4px;
color: $color-white;
@include light-theme {
background-color: $color-gray-45;
}
@include dark-theme {
background-color: $color-gray-25;
}
}
.module-message-detail__contact__send-anyway {
@include button-reset;
2023-04-20 17:03:43 +00:00
margin-inline-start: 5px;
margin-top: 5px;
padding: 4px;
border-radius: 4px;
color: $color-white;
background-color: $color-accent-red;
}
.module-message-detail__status-timestamp {
2023-04-20 17:03:43 +00:00
margin-inline-start: 6px;
}