161 lines
3.8 KiB
SCSS
161 lines
3.8 KiB
SCSS
// Copyright 2023 Signal Messenger, LLC
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
@use '../mixins';
|
|
@use '../variables';
|
|
@use 'MessageAudio';
|
|
|
|
.PlaybackButton {
|
|
@include mixins.button-reset;
|
|
& {
|
|
position: relative;
|
|
flex-shrink: 0;
|
|
margin-inline-end: MessageAudio.$audio-attachment-button-margin-big;
|
|
|
|
outline: none;
|
|
border-radius: 18px;
|
|
}
|
|
|
|
&::before {
|
|
display: block;
|
|
height: 100%;
|
|
content: '';
|
|
}
|
|
|
|
@mixin audio-icon($name, $icon, $color) {
|
|
&.PlaybackButton--#{$name}::before {
|
|
@include mixins.position-absolute-center;
|
|
@include mixins.color-svg('../images/icons/#{$icon}.svg', $color, false);
|
|
& {
|
|
height: 20px;
|
|
width: 20px;
|
|
}
|
|
}
|
|
}
|
|
|
|
@mixin all-audio-icons($color) {
|
|
@include audio-icon(play, v3/play/play-fill, $color);
|
|
@include audio-icon(pause, v3/pause/pause-fill, $color);
|
|
@include audio-icon(not-downloaded, v3/arrow/arrow-down, $color);
|
|
@include audio-icon(downloading, v3/x/x-bold, $color);
|
|
}
|
|
|
|
&--variant-message {
|
|
width: MessageAudio.$audio-attachment-button-size;
|
|
height: MessageAudio.$audio-attachment-button-size;
|
|
}
|
|
|
|
&--variant-mini {
|
|
&::before {
|
|
-webkit-mask-size: 100% !important;
|
|
width: 16px !important;
|
|
height: 16px !important;
|
|
}
|
|
width: 14px;
|
|
height: 14px;
|
|
}
|
|
&--variant-draft {
|
|
&::before {
|
|
-webkit-mask-size: 100% !important;
|
|
width: 10px !important;
|
|
height: 10px !important;
|
|
}
|
|
width: 18px;
|
|
height: 18px;
|
|
}
|
|
|
|
&--computing {
|
|
cursor: auto;
|
|
}
|
|
&__SpinnerV2-container {
|
|
@include mixins.position-absolute-center;
|
|
}
|
|
.ProgressCircle {
|
|
@include mixins.position-absolute-center;
|
|
.ProgressCircle__background {
|
|
stroke: none;
|
|
}
|
|
}
|
|
@include mixins.dark-theme {
|
|
.ProgressCircle .ProgressCircle__background {
|
|
stroke: none;
|
|
}
|
|
}
|
|
@include mixins.light-theme {
|
|
.ProgressCircle .ProgressCircle__fill {
|
|
stroke: variables.$color-white;
|
|
}
|
|
.SpinnerV2 .SpinnerV2__Path {
|
|
stroke: variables.$color-white;
|
|
}
|
|
|
|
@include all-audio-icons(variables.$color-gray-90);
|
|
|
|
&--context-incoming {
|
|
&.PlaybackButton--variant-message {
|
|
background: variables.$color-white-alpha-80;
|
|
&:hover {
|
|
background: variables.$color-white-alpha-60;
|
|
}
|
|
&:active {
|
|
background: variables.$color-white-alpha-40;
|
|
}
|
|
}
|
|
.ProgressCircle .ProgressCircle__fill {
|
|
stroke: variables.$color-gray-90;
|
|
}
|
|
.SpinnerV2 .SpinnerV2__Path {
|
|
stroke: variables.$color-gray-90;
|
|
}
|
|
}
|
|
}
|
|
|
|
@include mixins.dark-theme {
|
|
.ProgressCircle .ProgressCircle__fill {
|
|
stroke: variables.$color-white-alpha-90;
|
|
}
|
|
.SpinnerV2 .SpinnerV2__Path {
|
|
stroke: variables.$color-white-alpha-90;
|
|
}
|
|
|
|
@include all-audio-icons(variables.$color-white-alpha-90);
|
|
|
|
&--context-incoming {
|
|
&.PlaybackButton--variant-message {
|
|
background: variables.$color-white-alpha-20;
|
|
&:hover {
|
|
background: variables.$color-white-alpha-30;
|
|
}
|
|
&:active {
|
|
background: variables.$color-white-alpha-40;
|
|
}
|
|
}
|
|
.ProgressCircle .ProgressCircle__fill {
|
|
stroke: variables.$color-white-alpha-90;
|
|
}
|
|
.SpinnerV2 .SpinnerV2__Path {
|
|
stroke: variables.$color-white-alpha-90;
|
|
}
|
|
}
|
|
}
|
|
|
|
&--context-outgoing {
|
|
&.PlaybackButton--variant-message {
|
|
background: variables.$color-white-alpha-20;
|
|
&:hover {
|
|
background: variables.$color-white-alpha-30;
|
|
}
|
|
&:active {
|
|
background: variables.$color-white-alpha-40;
|
|
}
|
|
}
|
|
@include all-audio-icons(variables.$color-white);
|
|
}
|
|
|
|
@include mixins.dark-theme {
|
|
&--context-outgoing {
|
|
@include all-audio-icons(variables.$color-white-alpha-90);
|
|
}
|
|
}
|
|
}
|