signal-desktop/stylesheets/components/SystemMessage.scss

291 lines
6.9 KiB
SCSS
Raw Normal View History

// Copyright 2021-2022 Signal Messenger, LLC
2021-08-26 20:51:55 +00:00
// SPDX-License-Identifier: AGPL-3.0-only
@mixin system-message-icon($light, $dark) {
@include light-theme {
-webkit-mask: url($light) no-repeat center;
-webkit-mask-size: 100%;
}
@include dark-theme {
-webkit-mask: url($dark) no-repeat center;
-webkit-mask-size: 100%;
}
}
.SystemMessage {
@include font-body-2;
align-items: center;
display: flex;
flex-direction: column;
2021-08-26 20:51:55 +00:00
justify-content: center;
line-height: 16px;
padding-bottom: 16px;
padding-top: 16px;
2021-08-26 20:51:55 +00:00
@include light-theme {
color: $color-gray-60;
2021-08-26 20:51:55 +00:00
}
@include dark-theme {
color: $color-gray-25;
}
&__contents {
max-width: 400px;
text-align: center;
user-select: none;
p {
display: block;
margin: {
block: {
start: 0;
end: 4px;
}
inline: {
start: 0;
end: 0;
}
}
2021-08-26 20:51:55 +00:00
&:first-child {
display: inline-block;
}
2021-08-26 20:51:55 +00:00
&:last-child {
margin-block-end: 0;
}
2021-08-26 20:51:55 +00:00
}
&::before {
content: '';
display: inline-block;
height: 16px;
margin-right: 8px;
width: 16px;
vertical-align: middle;
2021-08-26 20:51:55 +00:00
@include light-theme {
background-color: $color-gray-60;
}
@include dark-theme {
background-color: $color-gray-25;
}
2021-08-26 20:51:55 +00:00
}
&--icon-audio-incoming::before {
2021-08-26 20:51:55 +00:00
@include system-message-icon(
'../images/icons/v2/phone-incoming-16.svg',
'../images/icons/v2/phone-incoming-solid-16.svg'
);
}
&--icon-audio-missed::before {
2021-08-26 20:51:55 +00:00
@include system-message-icon(
'../images/icons/v2/phone-x-16.svg',
'../images/icons/v2/phone-x-solid-16.svg'
);
}
&--icon-audio-outgoing::before {
2021-08-26 20:51:55 +00:00
@include system-message-icon(
'../images/icons/v2/phone-outgoing-16.svg',
'../images/icons/v2/phone-outgoing-solid-16.svg'
);
}
&--icon-group::before {
2021-08-26 20:51:55 +00:00
@include system-message-icon(
'../images/icons/v2/group-outline-24.svg',
'../images/icons/v2/group-solid-24.svg'
);
}
&--icon-group-access::before {
2021-08-26 20:51:55 +00:00
@include system-message-icon(
'../images/icons/v2/megaphone-16.svg',
'../images/icons/v2/megaphone-solid-16.svg'
);
}
&--icon-group-add::before {
2021-08-26 20:51:55 +00:00
@include system-message-icon(
'../images/icons/v2/member-added-16.svg',
'../images/icons/v2/member-added-solid-16.svg'
);
}
&--icon-group-approved::before {
2021-08-26 20:51:55 +00:00
@include system-message-icon(
'../images/icons/v2/member-accepted-16.svg',
'../images/icons/v2/member-accepted-solid-16.svg'
);
}
&--icon-group-avatar::before {
2021-08-26 20:51:55 +00:00
@include system-message-icon(
'../images/icons/v2/photo-16.svg',
'../images/icons/v2/photo-solid-16.svg'
);
}
&--icon-group-decline::before {
2021-08-26 20:51:55 +00:00
@include system-message-icon(
'../images/icons/v2/member-declined-16.svg',
'../images/icons/v2/member-declined-solid-16.svg'
);
}
&--icon-group-edit::before {
2021-08-26 20:51:55 +00:00
@include system-message-icon(
'../images/icons/v2/edit-16.svg',
'../images/icons/v2/edit-solid-16.svg'
);
}
&--icon-group-leave::before {
2021-08-26 20:51:55 +00:00
@include system-message-icon(
'../images/icons/v2/leave-16.svg',
'../images/icons/v2/leave-solid-16.svg'
);
}
&--icon-group-remove::before {
2021-08-26 20:51:55 +00:00
@include system-message-icon(
'../images/icons/v2/member-remove-16.svg',
'../images/icons/v2/member-remove-solid-16.svg'
);
}
&--icon-info::before {
2021-08-26 20:51:55 +00:00
@include system-message-icon(
'../images/icons/v2/info-16.svg',
'../images/icons/v2/info-solid-24.svg'
);
}
&--icon-phone::before {
2021-08-26 20:51:55 +00:00
@include system-message-icon(
'../images/icons/v2/phone-right-outline-24.svg',
'../images/icons/v2/phone-right-solid-24.svg'
);
}
&--icon-profile::before {
2021-08-26 20:51:55 +00:00
@include system-message-icon(
'../images/icons/v2/profile-outline-20.svg',
'../images/icons/v2/profile-outline-20.svg'
);
}
&--icon-safety-number::before {
2021-08-26 20:51:55 +00:00
@include system-message-icon(
'../images/icons/v2/safety-number-outline-24.svg',
'../images/icons/v2/safety-number-solid-24.svg'
);
}
&--icon-session-refresh::before {
2021-08-26 20:51:55 +00:00
@include system-message-icon(
'../images/icons/v2/refresh-16.svg',
'../images/icons/v2/refresh-16.svg'
);
}
&--icon-timer::before {
2021-08-26 20:51:55 +00:00
@include system-message-icon(
'../images/icons/v2/timer-outline-24.svg',
'../images/icons/v2/timer-solid-16.svg'
);
}
&--icon-timer-disabled::before {
2021-08-26 20:51:55 +00:00
@include system-message-icon(
'../images/icons/v2/timer-disabled-outline-24.svg',
'../images/icons/v2/timer-disabled-solid-16.svg'
);
}
&--icon-unsupported::before {
2021-08-26 20:51:55 +00:00
@include system-message-icon(
'../images/icons/v2/error-outline-24.svg',
'../images/icons/v2/error-solid-24.svg'
);
}
2021-08-26 20:51:55 +00:00
&--icon-unsupported--can-process::before {
@include system-message-icon(
'../images/icons/v2/check-circle-outline-24.svg',
'../images/icons/v2/check-circle-solid-24.svg'
);
2021-08-26 20:51:55 +00:00
}
&--icon-verified::before {
2021-08-26 20:51:55 +00:00
@include system-message-icon(
'../images/icons/v2/check-24.svg',
'../images/icons/v2/check-24.svg'
);
}
&--icon-verified-not::before {
2021-08-26 20:51:55 +00:00
@include system-message-icon(
'../images/icons/v2/safety-number-outline-24.svg',
'../images/icons/v2/safety-number-solid-24.svg'
);
}
&--icon-video::before {
2021-08-26 20:51:55 +00:00
@include system-message-icon(
'../images/icons/v2/video-outline-24.svg',
'../images/icons/v2/video-outline-24.svg'
);
}
&--icon-video-incoming::before {
2021-08-26 20:51:55 +00:00
@include system-message-icon(
'../images/icons/v2/video-incoming-16.svg',
'../images/icons/v2/video-incoming-solid-16.svg'
);
}
&--icon-video-missed::before {
2021-08-26 20:51:55 +00:00
@include system-message-icon(
'../images/icons/v2/video-x-16.svg',
'../images/icons/v2/video-x-solid-16.svg'
);
}
&--icon-video-outgoing::before {
2021-08-26 20:51:55 +00:00
@include system-message-icon(
'../images/icons/v2/video-outgoing-16.svg',
'../images/icons/v2/video-outgoing-solid-16.svg'
);
}
&--icon-warning::before {
2021-08-26 20:51:55 +00:00
@include system-message-icon(
'../images/icons/v2/error-outline-12.svg',
'../images/icons/v2/error-outline-12.svg'
);
}
2022-11-30 21:47:54 +00:00
&--icon-payment-event::before {
@include system-message-icon(
'../images/icons/v2/credit-card-16.svg',
'../images/icons/v2/credit-card-16.svg'
);
}
2021-08-26 20:51:55 +00:00
}
&--error {
color: $color-accent-red;
.SystemMessage__contents::before {
2021-08-26 20:51:55 +00:00
background: $color-accent-red;
}
}
&__button-container {
margin-top: 12px;
2021-08-26 20:51:55 +00:00
}
}