2021-03-17 06:43:59 +01:00
|
|
|
/*
|
2024-09-09 15:57:16 +02:00
|
|
|
Copyright 2024 New Vector Ltd.
|
2021-03-17 06:43:59 +01:00
|
|
|
Copyright 2021 The Matrix.org Foundation C.I.C.
|
|
|
|
|
2024-09-09 15:57:16 +02:00
|
|
|
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only
|
|
|
|
Please see LICENSE files in the repository root for full details.
|
2021-03-17 06:43:59 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
.mx_VoiceRecordComposerTile_stop {
|
2022-07-27 15:39:29 +02:00
|
|
|
/* 28px plus a 2px border makes this a 32px square (as intended) */
|
2021-03-17 06:43:59 +01:00
|
|
|
width: 28px;
|
|
|
|
height: 28px;
|
|
|
|
border: 2px solid $voice-record-stop-border-color;
|
|
|
|
border-radius: 32px;
|
2022-11-04 16:36:50 +01:00
|
|
|
margin-right: 2px; /* between us and the waveform component */
|
2021-03-17 06:43:59 +01:00
|
|
|
position: relative;
|
|
|
|
|
|
|
|
&::after {
|
2022-12-12 12:24:14 +01:00
|
|
|
content: "";
|
2021-03-17 06:43:59 +01:00
|
|
|
width: 14px;
|
|
|
|
height: 14px;
|
|
|
|
position: absolute;
|
2021-03-17 06:54:33 +01:00
|
|
|
top: 7px;
|
|
|
|
left: 7px;
|
2021-03-17 06:43:59 +01:00
|
|
|
border-radius: 2px;
|
|
|
|
background-color: $voice-record-stop-symbol-color;
|
|
|
|
}
|
|
|
|
}
|
2021-03-26 00:12:26 +01:00
|
|
|
|
2021-04-27 05:08:51 +02:00
|
|
|
.mx_VoiceRecordComposerTile_delete {
|
2021-06-23 13:29:00 +02:00
|
|
|
width: 24px;
|
|
|
|
height: 24px;
|
2021-04-27 05:08:51 +02:00
|
|
|
vertical-align: middle;
|
2022-11-04 16:36:50 +01:00
|
|
|
margin-right: 2px; /* distance from left edge of waveform container (container has some margin too) */
|
2021-05-04 00:08:38 +02:00
|
|
|
background-color: $voice-record-icon-color;
|
2021-04-27 05:08:51 +02:00
|
|
|
mask-repeat: no-repeat;
|
|
|
|
mask-size: contain;
|
2024-10-18 15:51:54 +02:00
|
|
|
mask-image: url("@vector-im/compound-design-tokens/icons/delete.svg");
|
2021-04-27 05:08:51 +02:00
|
|
|
}
|
|
|
|
|
2021-08-03 20:52:21 +02:00
|
|
|
.mx_VoiceRecordComposerTile_uploadingState {
|
|
|
|
margin-right: 10px;
|
2021-08-12 11:30:35 +02:00
|
|
|
color: $secondary-content;
|
2021-08-03 20:52:21 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
.mx_VoiceRecordComposerTile_failedState {
|
|
|
|
margin-right: 21px;
|
2021-08-03 07:29:46 +02:00
|
|
|
|
|
|
|
.mx_VoiceRecordComposerTile_uploadState_badge {
|
|
|
|
display: inline-block;
|
|
|
|
margin-right: 4px;
|
|
|
|
vertical-align: middle;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-05-07 05:40:58 +02:00
|
|
|
.mx_MessageComposer_row .mx_VoiceMessagePrimaryContainer {
|
2022-07-27 15:39:29 +02:00
|
|
|
/* Note: remaining class properties are in the PlayerContainer CSS. */
|
2021-04-28 04:27:36 +02:00
|
|
|
|
2022-07-27 15:39:29 +02:00
|
|
|
/* fixed height to reduce layout jumps with the play button appearing */
|
|
|
|
/* https://github.com/vector-im/element-web/issues/18431 */
|
2021-08-06 17:04:36 +02:00
|
|
|
height: 32px;
|
|
|
|
|
2022-07-27 15:39:29 +02:00
|
|
|
margin: 6px; /* force the composer area to put a gutter around us */
|
2022-11-04 16:36:50 +01:00
|
|
|
margin-right: 6px; /* isolate from stop/send button */
|
2021-03-26 00:12:26 +01:00
|
|
|
|
2022-07-27 15:39:29 +02:00
|
|
|
position: relative; /* important for the live circle */
|
2021-03-26 00:12:26 +01:00
|
|
|
|
2021-04-21 05:43:55 +02:00
|
|
|
&.mx_VoiceRecordComposerTile_recording {
|
2022-07-27 15:39:29 +02:00
|
|
|
/* We are putting the circle in this padding, so we need +10px from the regular */
|
|
|
|
/* padding on the left side. */
|
2021-05-05 04:45:15 +02:00
|
|
|
padding-left: 22px;
|
2021-04-14 23:08:11 +02:00
|
|
|
|
2021-04-21 05:43:55 +02:00
|
|
|
&::before {
|
|
|
|
animation: recording-pulse 2s infinite;
|
|
|
|
|
2022-12-12 12:24:14 +01:00
|
|
|
content: "";
|
2021-04-21 05:43:55 +02:00
|
|
|
background-color: $voice-record-live-circle-color;
|
|
|
|
width: 10px;
|
|
|
|
height: 10px;
|
|
|
|
position: absolute;
|
2022-07-27 15:39:29 +02:00
|
|
|
left: 12px; /* 12px from the left edge for container padding */
|
|
|
|
top: 17px; /* vertically center (middle align with clock) */
|
2021-04-21 05:43:55 +02:00
|
|
|
border-radius: 10px;
|
|
|
|
}
|
2021-03-26 00:12:26 +01:00
|
|
|
}
|
|
|
|
}
|
2021-04-14 23:08:11 +02:00
|
|
|
|
2022-11-04 16:36:50 +01:00
|
|
|
.mx_MessageComposer_wysiwyg .mx_VoiceMessagePrimaryContainer {
|
|
|
|
&.mx_VoiceRecordComposerTile_recording {
|
|
|
|
&::before {
|
|
|
|
top: 15px; /* vertically center (middle align with clock) */
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-07-27 15:39:29 +02:00
|
|
|
/* The keyframes are slightly weird here to help make a ramping/punch effect */
|
|
|
|
/* for the recording dot. We start and end at 100% opacity to help make the */
|
|
|
|
/* dot feel a bit like a real lamp that is blinking: the animation ends up */
|
|
|
|
/* spending a lot of its time showing a steady state without a fade effect. */
|
|
|
|
/* This lamp effect extends into why the 0% opacity keyframe is not in the */
|
|
|
|
/* midpoint: lamps take longer to turn off than they do to turn on, and the */
|
|
|
|
/* extra frames give it a bit of a realistic punch for when the animation is */
|
|
|
|
/* ramping back up to 100% opacity. */
|
|
|
|
|
|
|
|
/* Target animation timings: steady for 1.5s, fade out for 0.3s, fade in for 0.2s */
|
|
|
|
/* (intended to be used in a loop for 2s animation speed) */
|
2021-04-14 23:08:11 +02:00
|
|
|
@keyframes recording-pulse {
|
|
|
|
0% {
|
2021-04-14 23:10:57 +02:00
|
|
|
opacity: 1;
|
2021-04-14 23:08:11 +02:00
|
|
|
}
|
2021-04-15 18:49:39 +02:00
|
|
|
35% {
|
2021-04-14 23:10:57 +02:00
|
|
|
opacity: 0;
|
2021-04-14 23:08:11 +02:00
|
|
|
}
|
2021-04-15 18:49:39 +02:00
|
|
|
65% {
|
2021-04-14 23:10:57 +02:00
|
|
|
opacity: 1;
|
2021-04-14 23:08:11 +02:00
|
|
|
}
|
|
|
|
}
|