session-desktop/stylesheets/_session.scss

628 lines
11 KiB
SCSS
Raw Permalink Normal View History

2022-04-07 03:42:22 +02:00
#root {
height: 100%;
}
2020-03-31 05:30:53 +02:00
.subtle {
2020-10-15 02:18:37 +02:00
opacity: $session-subtle-factor;
2019-12-23 07:40:48 +01:00
}
2020-03-31 05:30:53 +02:00
.soft {
2019-12-27 07:55:28 +01:00
opacity: 0.4;
}
.text-center {
text-align: center;
}
.fullwidth {
width: 100%;
}
2020-07-20 09:30:26 +02:00
.break-word {
word-break: break-all;
}
2020-02-05 04:19:01 +01:00
input,
textarea {
caret-color: var(--input-text-color) !important;
2020-02-05 04:19:01 +01:00
}
2020-02-14 01:41:59 +01:00
* {
user-select: none;
2020-02-14 04:25:36 +01:00
.text-selectable,
input,
textarea {
2020-02-14 04:12:03 +01:00
user-select: text;
2022-06-20 07:13:31 +02:00
a {
word-break: break-all;
}
}
}
::selection {
background: var(--text-selection-color);
}
2019-12-13 02:02:02 +01:00
.overlay {
display: flex !important;
2019-12-13 02:02:02 +01:00
z-index: 1;
}
2020-01-09 01:38:48 +01:00
#main-view {
height: 100vh;
display: flex;
flex-grow: 1;
position: relative;
2020-01-09 01:38:48 +01:00
}
.button-group > div {
display: inline-flex;
margin-inline-start: 5px;
margin-inline-end: 5px;
}
2019-12-27 07:55:28 +01:00
.session-label {
font-weight: 700;
color: var(--white-color);
padding: var(--margins-sm);
2019-12-27 07:55:28 +01:00
width: 100%;
border-radius: 2px;
2022-02-11 02:14:58 +01:00
text-align: center;
2019-12-27 07:55:28 +01:00
&.primary {
background-color: var(--primary-color);
}
2019-12-27 07:55:28 +01:00
&.danger {
background-color: var(--danger-color);
2019-12-27 07:55:28 +01:00
}
}
.session-icon-button {
2019-12-05 06:12:33 +01:00
cursor: pointer;
display: inline-block;
position: relative;
transform: translateZ(0);
}
2019-12-05 06:12:33 +01:00
2019-12-09 03:48:04 +01:00
/* CONVERSATION AND MESSAGES */
2020-02-14 01:55:15 +01:00
.module-conversation-header {
height: var(--main-view-header-height);
2020-02-14 01:55:15 +01:00
}
2019-12-09 03:57:18 +01:00
.module-conversation-header__title-flex,
.module-conversation-header__title {
font-weight: bold;
2019-12-09 03:48:04 +01:00
width: 100%;
display: flex;
2020-01-31 05:28:47 +01:00
font-size: $session-font-md;
2019-12-09 03:48:04 +01:00
2020-01-30 01:44:25 +01:00
&-text {
color: var(--text-primary-color);
2022-02-14 06:42:53 +01:00
font-weight: 400;
font-size: $session-font-sm;
line-height: $session-font-sm;
2020-01-30 01:44:25 +01:00
}
2019-12-09 03:48:04 +01:00
.module-contact-name {
2019-12-09 03:57:18 +01:00
width: 100%;
2019-12-09 03:48:04 +01:00
}
2019-12-09 03:57:18 +01:00
.module-contact-name__profile-number {
text-align: center;
2019-12-09 03:48:04 +01:00
}
}
.module-conversation-header__title {
flex-direction: column;
}
.module-conversation-header__title-flex {
flex-direction: row;
}
.module-conversation__user__profile-name,
2019-12-09 03:48:04 +01:00
.module-message__author__profile-name {
font-style: normal;
}
.module-message--incoming {
margin-inline-start: 0;
margin-inline-end: auto;
}
.module-message--outgoing {
margin-inline-end: 0;
margin-inline-start: auto;
2019-12-09 03:48:04 +01:00
}
2019-12-17 04:43:00 +01:00
.module-message__container {
position: relative;
display: inline-block;
overflow: hidden;
min-width: 30px;
// To limit messages with things forcing them wider, like long attachment names
max-width: 100%;
align-items: center;
border-radius: var(--border-radius-message-box);
2019-12-17 04:43:00 +01:00
}
label {
user-select: none;
}
2020-01-31 03:31:25 +01:00
.conversation-header {
.module-avatar img {
box-shadow: 0px 0px 5px 0px rgba(255, 255, 255, 0.2);
2020-01-31 03:31:25 +01:00
}
2020-01-31 03:47:19 +01:00
2020-01-31 03:31:25 +01:00
.search-icon {
margin-inline-end: 10px;
2020-01-31 03:31:25 +01:00
}
2019-12-17 04:43:00 +01:00
}
.module-conversation-header {
position: relative;
padding: 0px var(--margins-lg) 0px var(--margins-sm);
2019-12-17 04:43:00 +01:00
}
.title-wrapper {
position: relative;
}
.hidden {
2020-02-27 06:29:01 +01:00
display: none;
visibility: hidden;
}
.Toastify__toast {
2022-10-05 11:53:48 +02:00
background: var(--toast-background-color);
color: var(--toast-text-color);
border-left: 4px solid var(--toast-color-strip-color);
.Toastify__close-button {
2022-10-05 11:53:48 +02:00
color: var(--toast-text-color);
2019-12-13 05:14:30 +01:00
}
.Toastify__progress-bar {
background-color: var(--toast-progress-color);
}
2019-12-13 05:14:30 +01:00
}
2019-12-18 01:50:19 +01:00
.session-modal {
animation: fadein var(--default-duration);
2019-12-18 01:50:19 +01:00
z-index: 150;
min-width: 300px;
2019-12-18 01:50:19 +01:00
box-sizing: border-box;
max-height: 70vh;
max-width: calc(min(70vw, 800px));
font-family: var(--font-default);
background-color: var(--modal-background-content-color);
color: var(--modal-text-color);
border: 1px solid var(--border-color);
border-radius: 14px;
box-shadow: var(--modal-drop-shadow);
2020-05-26 05:56:30 +02:00
overflow: hidden;
display: flex;
flex-direction: column;
2019-12-18 01:50:19 +01:00
&__header {
2019-12-18 01:50:19 +01:00
display: flex;
flex-direction: row;
justify-content: space-between;
2020-01-22 04:09:34 +01:00
align-items: center;
padding: var(--margins-lg);
2019-12-18 01:50:19 +01:00
font-family: var(--font-default);
2019-12-18 01:50:19 +01:00
text-align: center;
line-height: 18px;
font-size: var(--font-size-lg);
font-weight: 500;
2019-12-18 01:50:19 +01:00
2020-01-22 04:09:34 +01:00
&.reverse {
flex-direction: row-reverse;
.session-modal__header__close > div {
float: right;
}
.session-modal__header__icons > div {
float: left;
padding-inline-start: 0px;
padding-inline-end: 10px;
2020-01-22 04:09:34 +01:00
}
}
2019-12-22 23:44:18 +01:00
&__icons,
&__close {
width: 60px;
2019-12-18 01:50:19 +01:00
}
&__icons {
float: right;
}
&__close > div {
2019-12-18 01:50:19 +01:00
float: left;
padding: var(--margins-xs);
margin: 0px;
2019-12-18 01:50:19 +01:00
}
&__icons > div {
2019-12-18 01:50:19 +01:00
float: right;
padding-inline-start: 10px;
}
}
&__body {
padding: 0px var(--margins-lg) var(--margins-lg) var(--margins-lg);
font-family: var(--font-default);
2020-01-22 04:09:34 +01:00
line-height: $session-font-md;
font-size: $session-font-md;
2020-05-26 05:56:30 +02:00
overflow-y: auto;
overflow-x: hidden;
2019-12-22 23:44:18 +01:00
.message {
text-align: center;
2019-12-18 01:50:19 +01:00
}
2020-01-31 03:31:25 +01:00
.session-id-editable {
width: 30vw;
max-width: 400px;
2020-01-31 03:31:25 +01:00
}
2019-12-18 01:50:19 +01:00
}
.group-member-list__selection {
overflow-y: auto;
width: 100%;
}
2019-12-27 07:55:28 +01:00
&__centered {
display: flex;
flex-direction: column;
align-items: center;
// to allow new lines
white-space: pre-wrap;
2019-12-27 07:55:28 +01:00
}
&__button-group {
display: flex;
justify-content: flex-end;
2019-12-27 07:55:28 +01:00
2019-12-23 07:40:48 +01:00
.session-button {
margin: var(--margins-xs);
font-weight: 500;
2019-12-23 07:40:48 +01:00
}
2019-12-22 23:44:18 +01:00
&__center {
2019-12-23 07:40:48 +01:00
display: flex;
justify-content: center;
.session-button {
margin: var(--margins-xs);
}
}
}
&__text-highlight {
2022-09-26 06:26:58 +02:00
@include text-highlight(var(--primary-color));
color: var(--black-color);
font-family: monospace;
font-style: normal;
2020-01-22 04:09:34 +01:00
font-size: $session-font-xs;
}
2019-12-18 01:50:19 +01:00
}
.session-modal__body {
display: flex;
flex-direction: column;
}
2020-01-08 07:21:39 +01:00
.session-confirm {
&-wrapper {
.session-modal__body .session-modal__centered {
text-align: center;
2020-01-08 07:21:39 +01:00
}
}
&-main-message {
2020-01-22 04:09:34 +01:00
font-size: $session-font-md;
line-height: 1.5;
2020-01-08 07:21:39 +01:00
}
2020-01-08 07:21:39 +01:00
&-sub-message {
2020-04-30 09:34:55 +02:00
text-align: center;
margin-top: 20px;
2020-01-08 07:21:39 +01:00
}
}
2019-12-20 00:57:50 +01:00
.session-dropdown {
position: relative;
width: 100%;
2019-12-18 01:50:19 +01:00
&__label {
cursor: pointer;
display: flex;
align-items: center;
justify-content: space-between;
height: 50px;
padding: 0px var(--margins-md);
font-size: var(--font-size-md);
2020-08-25 04:13:43 +02:00
background-color: var(--right-panel-item-background-color);
color: var(--right-panel-item-text-color);
2020-08-25 04:13:43 +02:00
&:hover {
background: var(--right-panel-item-background-hover-color);
2020-08-25 04:13:43 +02:00
}
}
&__list-container {
2020-08-25 07:57:37 +02:00
z-index: 99;
2019-12-18 01:50:19 +01:00
display: block;
position: absolute;
top: 50px;
left: 0px;
right: 0px;
2019-12-18 01:50:19 +01:00
list-style: none;
padding: 0px;
margin: 0px;
2020-03-31 05:04:48 +02:00
max-height: 40vh;
overflow-y: auto;
}
2019-12-18 01:50:19 +01:00
&__item {
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
height: 35px;
padding: 0 var(--margins-md);
background: var(--right-panel-item-background-color);
color: var(--right-panel-item-text-color);
font-size: 0.8rem;
width: -webkit-fill-available;
transition: var(--default-duration);
2019-12-18 01:50:19 +01:00
&:first-child {
border-top: 1px solid var(--border-color);
}
&:last-child {
border-top: 1px solid var(--border-color);
}
2019-12-18 01:50:19 +01:00
.session-icon {
margin-inline-start: 6px;
}
.item-content {
margin-inline-start: 6px;
}
2019-12-20 00:57:50 +01:00
&.active,
&:hover {
background: var(--right-panel-item-background-hover-color);
}
2019-12-18 01:50:19 +01:00
&.danger {
color: var(--danger-color);
}
}
2019-12-18 01:50:19 +01:00
&:hover {
background: var(--right-panel-item-background-hover-color);
2019-12-18 01:50:19 +01:00
}
2019-12-20 00:57:50 +01:00
}
.image-upload-section {
display: flex;
align-items: center;
justify-content: center;
position: absolute;
cursor: pointer;
width: 80px;
height: 80px;
border-radius: 100%;
background-color: var(--lightbox-background-color);
opacity: 0;
transition: var(--default-duration);
&:after {
content: 'Edit';
color: var(--white-color);
}
&:hover {
opacity: 1;
}
}
2020-01-23 03:52:08 +01:00
.qr-image {
display: flex;
justify-content: center;
background: var(--white-color);
padding: 0.5rem;
2020-01-23 03:52:08 +01:00
svg {
width: 135px;
height: 135px;
border-radius: 3px;
padding: var(--margins-xs);
background-color: var(--white-color);
2020-01-23 03:52:08 +01:00
}
}
.conversation-loader {
position: absolute;
top: 50%;
left: 50%;
margin: -40px 0 0 -40px;
2020-01-14 03:28:31 +01:00
& > div {
display: block;
}
}
2019-12-30 03:09:52 +01:00
.session-loader {
display: inline-block;
position: relative;
width: 80px;
height: 80px;
2020-12-14 06:23:59 +01:00
flex-shrink: 0;
2020-01-03 01:48:55 +01:00
2019-12-30 03:09:52 +01:00
div {
position: absolute;
top: 33px;
width: 13px;
height: 13px;
border-radius: 50%;
background: var(--primary-color);
2019-12-30 03:09:52 +01:00
animation-timing-function: cubic-bezier(0, 1, 1, 0);
}
div:nth-child(1) {
left: 8px;
animation: session-loader1 0.6s infinite;
}
div:nth-child(2) {
left: 8px;
animation: session-loader2 0.6s infinite;
}
div:nth-child(3) {
left: 32px;
animation: session-loader2 0.6s infinite;
}
div:nth-child(4) {
left: 56px;
animation: session-loader3 0.6s infinite;
}
@keyframes session-loader1 {
0% {
transform: scale(0);
}
100% {
transform: scale(1);
}
}
@keyframes session-loader3 {
0% {
transform: scale(1);
}
100% {
transform: scale(0);
}
}
@keyframes session-loader2 {
0% {
transform: translate(0, 0);
}
100% {
transform: translate(24px, 0);
}
}
}
2020-01-09 01:38:48 +01:00
.session-settings {
width: 100%;
height: 100%;
2020-01-21 01:17:45 +01:00
display: flex;
flex-direction: column;
background-color: var(--background-secondary-color);
2020-01-09 01:38:48 +01:00
}
2020-01-24 02:26:15 +01:00
#qr svg,
.qr-image svg {
width: $session-modal-size-sm;
height: $session-modal-size-sm;
padding: var(--margins-xs);
background-color: var(--white-color);
border-radius: 3px;
}
.messages li {
transition: var(--default-duration) !important;
}
.session-id-editable {
padding: var(--margins-lg);
background: var(--input-background-color);
color: var(--input-text-color);
2020-01-30 00:55:28 +01:00
textarea {
width: 30vh;
}
}
2020-01-30 00:55:28 +01:00
.session-id-editable textarea {
resize: none;
overflow: hidden;
user-select: all;
overflow-y: auto;
2020-07-14 05:12:07 +02:00
padding: 0px 5px 20px 5px;
&.session-id-editable-textarea:placeholder-shown {
height: 38px;
padding-top: 10px;
padding-bottom: 10px;
padding-left: 5px;
padding-right: 5px;
font-family: var(--font-default);
color: var(--input-text-placeholder-color);
2020-07-14 05:12:07 +02:00
}
&.group-id-editable-textarea {
margin-top: 15px;
white-space: nowrap;
}
2020-01-30 00:55:28 +01:00
}
input {
user-select: text;
}
.contact-selection-list {
display: flex;
flex-direction: column;
width: 20vw;
}
2020-01-24 01:59:43 +01:00
.session-confirm-wrapper {
position: absolute;
height: 100%;
width: 100%;
display: flex;
.session-modal {
margin: auto auto;
}
}
2020-02-04 08:07:31 +01:00
.group-member-list {
&__selection {
height: 100%;
display: flex;
flex-direction: column;
}
}
2020-02-04 23:59:55 +01:00
.create-group-name-input {
2020-07-14 05:12:07 +02:00
display: flex;
justify-content: center;
width: 100%;
2020-02-04 23:59:55 +01:00
.session-id-editable {
height: 60px !important;
textarea {
padding-bottom: 0px !important;
}
2020-02-05 04:19:01 +01:00
&-disabled {
border: 1px solid var(--border-color) !important;
2020-02-05 04:19:01 +01:00
}
2020-02-04 23:59:55 +01:00
}
}
.module-message-detail {
.module-message {
pointer-events: none;
}
}
2020-07-20 09:30:26 +02:00
.module-message__text {
white-space: pre-wrap;
}