2021-12-01 02:14:25 +00:00
|
|
|
// Copyright 2021 Signal Messenger, LLC
|
|
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
|
|
|
.MediaEditor {
|
|
|
|
background: $color-gray-95;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
2024-01-16 21:32:38 +00:00
|
|
|
width: 100vw;
|
|
|
|
height: 100vh;
|
2023-04-20 17:03:43 +00:00
|
|
|
inset-inline-start: 0;
|
2024-01-16 21:32:38 +00:00
|
|
|
top: 0;
|
2022-07-05 16:44:53 +00:00
|
|
|
position: absolute;
|
2021-12-01 02:14:25 +00:00
|
|
|
user-select: none;
|
2023-06-06 13:53:10 +00:00
|
|
|
-webkit-app-region: no-drag;
|
|
|
|
|
2021-12-01 23:13:09 +00:00
|
|
|
z-index: $z-index-popup-overlay;
|
2021-12-01 02:14:25 +00:00
|
|
|
|
|
|
|
&__container {
|
|
|
|
display: flex;
|
|
|
|
flex: 1;
|
2023-09-21 16:54:28 +00:00
|
|
|
padding-block: 64px;
|
|
|
|
padding-inline: 64px;
|
2021-12-01 02:14:25 +00:00
|
|
|
padding-bottom: 0;
|
|
|
|
overflow: hidden;
|
|
|
|
}
|
|
|
|
|
|
|
|
&__media {
|
|
|
|
align-items: center;
|
|
|
|
display: flex;
|
|
|
|
height: 100%;
|
|
|
|
justify-content: center;
|
|
|
|
position: relative;
|
|
|
|
width: 100%;
|
|
|
|
|
|
|
|
&--canvas {
|
|
|
|
border-radius: 12px;
|
|
|
|
transition: border-radius 200ms ease-out;
|
|
|
|
|
|
|
|
&--cropping {
|
|
|
|
border-radius: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&__control {
|
|
|
|
@include button-reset;
|
|
|
|
align-items: center;
|
2023-09-14 17:04:48 +00:00
|
|
|
border-radius: 20px;
|
2021-12-01 02:14:25 +00:00
|
|
|
display: inline-flex;
|
|
|
|
height: 32px;
|
|
|
|
justify-content: center;
|
2023-04-20 17:03:43 +00:00
|
|
|
margin-block: 0;
|
2023-09-14 17:04:48 +00:00
|
|
|
margin-inline: 20px;
|
2021-12-01 02:14:25 +00:00
|
|
|
opacity: 1;
|
|
|
|
width: 32px;
|
|
|
|
|
|
|
|
&::after {
|
|
|
|
content: ' ';
|
2023-05-04 18:04:22 +00:00
|
|
|
height: 20px;
|
|
|
|
width: 20px;
|
2021-12-01 02:14:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&--crop::after {
|
2023-05-04 18:04:22 +00:00
|
|
|
@include color-svg(
|
|
|
|
'../images/icons/v3/crop/crop-rotate.svg',
|
|
|
|
$color-white
|
|
|
|
);
|
2021-12-01 02:14:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&--pen::after {
|
|
|
|
@include color-svg('../images/icons/v2/draw-24.svg', $color-white);
|
|
|
|
}
|
|
|
|
|
|
|
|
&--redo {
|
|
|
|
&::after {
|
2023-05-04 18:04:22 +00:00
|
|
|
@include color-svg('../images/icons/v3/redo/redo.svg', $color-white);
|
2021-12-01 02:14:25 +00:00
|
|
|
}
|
|
|
|
&:disabled::after {
|
2023-05-04 18:04:22 +00:00
|
|
|
@include color-svg('../images/icons/v3/redo/redo.svg', $color-gray-45);
|
2021-12-01 02:14:25 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&--sticker.module-sticker-button__button::after {
|
|
|
|
@include color-svg(
|
2023-05-04 18:04:22 +00:00
|
|
|
'../images/icons/v3/sticker/sticker-smiley.svg',
|
2021-12-01 02:14:25 +00:00
|
|
|
$color-white
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
&--text::after {
|
|
|
|
@include color-svg('../images/icons/v2/text-24.svg', $color-white);
|
|
|
|
}
|
|
|
|
|
|
|
|
&--undo {
|
|
|
|
&::after {
|
2023-05-04 18:04:22 +00:00
|
|
|
@include color-svg('../images/icons/v3/undo/undo.svg', $color-white);
|
2021-12-01 02:14:25 +00:00
|
|
|
}
|
|
|
|
&:disabled::after {
|
2023-05-04 18:04:22 +00:00
|
|
|
@include color-svg('../images/icons/v3/undo/undo.svg', $color-gray-45);
|
2021-12-01 02:14:25 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&--selected {
|
|
|
|
background-color: $color-white;
|
|
|
|
|
|
|
|
&::after {
|
|
|
|
background-color: $color-black;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
background-color: $color-gray-80;
|
|
|
|
|
|
|
|
&::after {
|
|
|
|
background-color: $color-white;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-09-14 17:04:48 +00:00
|
|
|
&__tools {
|
2021-12-01 02:14:25 +00:00
|
|
|
align-items: center;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
justify-content: center;
|
|
|
|
padding: 22px;
|
|
|
|
width: 100%;
|
|
|
|
|
2023-09-14 17:04:48 +00:00
|
|
|
&--input {
|
|
|
|
margin-inline: 24px;
|
2023-09-27 15:39:54 +00:00
|
|
|
width: 400px;
|
2023-09-14 17:04:48 +00:00
|
|
|
}
|
|
|
|
|
2021-12-01 02:14:25 +00:00
|
|
|
&--buttons {
|
|
|
|
align-items: center;
|
|
|
|
display: flex;
|
|
|
|
justify-content: center;
|
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
|
2022-10-04 23:17:15 +00:00
|
|
|
&__caption {
|
2023-09-14 17:04:48 +00:00
|
|
|
height: 44px;
|
2022-10-04 23:17:15 +00:00
|
|
|
|
|
|
|
&__add-caption-button {
|
|
|
|
@include button-reset;
|
2023-09-14 17:04:48 +00:00
|
|
|
@include rounded-corners;
|
2022-10-04 23:17:15 +00:00
|
|
|
background: $color-gray-90;
|
|
|
|
color: $color-gray-15;
|
2023-04-20 17:03:43 +00:00
|
|
|
padding-block: 8px;
|
|
|
|
padding-inline: 15px;
|
2022-10-04 23:17:15 +00:00
|
|
|
border: none;
|
|
|
|
|
|
|
|
& > span {
|
|
|
|
display: -webkit-box;
|
|
|
|
-webkit-box-orient: vertical;
|
|
|
|
-webkit-line-clamp: 1;
|
|
|
|
overflow: hidden;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-12-01 02:14:25 +00:00
|
|
|
}
|
|
|
|
|
2023-09-14 17:04:48 +00:00
|
|
|
&__tools-row-1 {
|
2021-12-01 02:14:25 +00:00
|
|
|
display: flex;
|
|
|
|
flex-grow: 1;
|
|
|
|
flex-wrap: wrap;
|
2023-09-21 16:54:28 +00:00
|
|
|
height: 28px;
|
2021-12-01 02:14:25 +00:00
|
|
|
justify-content: center;
|
2023-09-14 17:04:48 +00:00
|
|
|
margin-bottom: 24px;
|
2021-12-01 02:14:25 +00:00
|
|
|
max-width: 596px;
|
|
|
|
}
|
|
|
|
|
2023-09-14 17:04:48 +00:00
|
|
|
&__tools-row-2 {
|
2023-09-21 16:54:28 +00:00
|
|
|
align-items: center;
|
2023-09-14 17:04:48 +00:00
|
|
|
display: flex;
|
|
|
|
flex-grow: 1;
|
|
|
|
flex-wrap: wrap;
|
|
|
|
justify-content: center;
|
|
|
|
max-width: 596px;
|
2023-09-21 16:54:28 +00:00
|
|
|
min-height: 36px;
|
|
|
|
}
|
|
|
|
|
|
|
|
&__toolbar__crop {
|
|
|
|
align-items: center;
|
|
|
|
color: $color-white;
|
|
|
|
display: flex;
|
|
|
|
height: 36px;
|
|
|
|
justify-content: center;
|
|
|
|
padding-block: 14px;
|
|
|
|
padding-inline: 12px;
|
|
|
|
margin-inline: 16px;
|
|
|
|
|
|
|
|
&__button {
|
|
|
|
@include button-reset;
|
|
|
|
display: flex;
|
|
|
|
margin-block: 0;
|
|
|
|
margin-inline: 20px;
|
|
|
|
}
|
2023-09-14 17:04:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&__toolbar {
|
2021-12-01 02:14:25 +00:00
|
|
|
align-items: center;
|
|
|
|
background-color: $color-gray-90;
|
|
|
|
border-radius: 10px;
|
|
|
|
color: $color-white;
|
|
|
|
display: flex;
|
2023-09-14 17:04:48 +00:00
|
|
|
height: 36px;
|
2021-12-10 14:41:31 +00:00
|
|
|
justify-content: center;
|
2023-04-20 17:03:43 +00:00
|
|
|
padding-block: 14px;
|
|
|
|
padding-inline: 12px;
|
2023-09-14 17:04:48 +00:00
|
|
|
margin-inline: 16px;
|
2023-09-21 16:54:28 +00:00
|
|
|
min-width: 418px;
|
2021-12-01 02:14:25 +00:00
|
|
|
|
2022-07-25 18:55:44 +00:00
|
|
|
&__tool,
|
|
|
|
&__tool__button {
|
2023-09-21 16:54:28 +00:00
|
|
|
margin-inline-start: 14px;
|
2021-12-01 02:14:25 +00:00
|
|
|
}
|
|
|
|
|
2021-12-10 14:41:31 +00:00
|
|
|
&__button {
|
|
|
|
@mixin icon($icon) {
|
2023-05-23 21:14:47 +00:00
|
|
|
@include color-svg('../images/icons/#{$icon}', $color-white);
|
2021-12-10 14:41:31 +00:00
|
|
|
opacity: 1;
|
|
|
|
height: 20px;
|
|
|
|
width: 20px;
|
|
|
|
border-radius: 0;
|
2021-12-01 02:14:25 +00:00
|
|
|
|
2021-12-10 14:41:31 +00:00
|
|
|
&::after {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
2021-12-01 02:14:25 +00:00
|
|
|
|
2021-12-10 14:41:31 +00:00
|
|
|
@include button-reset;
|
2022-07-25 18:55:44 +00:00
|
|
|
display: flex;
|
2023-04-20 17:03:43 +00:00
|
|
|
margin-block: 0;
|
|
|
|
margin-inline: 8px;
|
2021-12-10 14:41:31 +00:00
|
|
|
padding: 8px;
|
2021-12-01 02:14:25 +00:00
|
|
|
|
2022-07-25 18:55:44 +00:00
|
|
|
&--draw-pen__button {
|
2023-05-23 21:14:47 +00:00
|
|
|
@include icon('v3/brush/brush-pen-compact.svg');
|
2021-12-10 14:41:31 +00:00
|
|
|
}
|
2022-07-25 18:55:44 +00:00
|
|
|
&--draw-highlighter__button {
|
2023-05-23 21:14:47 +00:00
|
|
|
@include icon('v3/brush/brush-highlighter-compact.svg');
|
2021-12-10 14:41:31 +00:00
|
|
|
}
|
2022-07-25 18:55:44 +00:00
|
|
|
&--width-thin__button {
|
2023-05-23 21:14:47 +00:00
|
|
|
@include icon('v3/brush_size/brush_size-thin-compact.svg');
|
2021-12-10 14:41:31 +00:00
|
|
|
}
|
2022-07-25 18:55:44 +00:00
|
|
|
&--width-regular__button {
|
2023-05-23 21:14:47 +00:00
|
|
|
@include icon('v3/brush_size/brush_size-regular-compact.svg');
|
2021-12-10 14:41:31 +00:00
|
|
|
}
|
2022-07-25 18:55:44 +00:00
|
|
|
&--width-medium__button {
|
2023-05-23 21:14:47 +00:00
|
|
|
@include icon('v3/brush_size/brush_size-medium-compact.svg');
|
2021-12-10 14:41:31 +00:00
|
|
|
}
|
2022-07-25 18:55:44 +00:00
|
|
|
&--width-heavy__button {
|
2023-05-23 21:14:47 +00:00
|
|
|
@include icon('v3/brush_size/brush_size-heavy-compact.svg');
|
2021-12-10 14:41:31 +00:00
|
|
|
}
|
2022-07-25 18:55:44 +00:00
|
|
|
&--text-regular__button {
|
2023-05-23 21:14:47 +00:00
|
|
|
@include icon('v3/text/text-square-compact.svg');
|
2021-12-10 14:41:31 +00:00
|
|
|
}
|
2022-07-25 18:55:44 +00:00
|
|
|
&--text-highlight__button {
|
2023-05-23 21:14:47 +00:00
|
|
|
@include icon('v3/text/text-square-fill-compact.svg');
|
2021-12-10 14:41:31 +00:00
|
|
|
}
|
2022-07-25 18:55:44 +00:00
|
|
|
&--text-outline__button {
|
2023-05-23 21:14:47 +00:00
|
|
|
@include icon('v3/text/text-outline-compact.svg');
|
2021-12-10 14:41:31 +00:00
|
|
|
}
|
|
|
|
&--rotate {
|
2023-05-23 21:14:47 +00:00
|
|
|
@include icon('v2/rotate-outline-24.svg');
|
2021-12-10 14:41:31 +00:00
|
|
|
}
|
|
|
|
&--flip {
|
2023-05-23 21:14:47 +00:00
|
|
|
@include icon('v2/flip-outline-24.svg');
|
2021-12-10 14:41:31 +00:00
|
|
|
}
|
|
|
|
&--crop-locked {
|
2023-05-23 21:14:47 +00:00
|
|
|
@include icon('v3/crop/crop-lock.svg');
|
2021-12-10 14:41:31 +00:00
|
|
|
}
|
|
|
|
&--crop-unlocked {
|
2023-05-23 21:14:47 +00:00
|
|
|
@include icon('v3/crop/crop-unlock.svg');
|
2021-12-10 14:41:31 +00:00
|
|
|
}
|
2021-12-01 02:14:25 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&__icon {
|
|
|
|
&--draw-pen {
|
2023-05-23 21:14:47 +00:00
|
|
|
@include color-svg(
|
|
|
|
'../images/icons/v3/brush/brush-pen-compact.svg',
|
|
|
|
$color-white
|
|
|
|
);
|
2021-12-01 02:14:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&--draw-highlighter {
|
|
|
|
@include color-svg(
|
2023-05-23 21:14:47 +00:00
|
|
|
'../images/icons/v3/brush/brush-highlighter-compact.svg',
|
2021-12-01 02:14:25 +00:00
|
|
|
$color-white
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
&--text-regular {
|
|
|
|
@include color-svg(
|
2023-05-23 21:14:47 +00:00
|
|
|
'../images/icons/v3/text/text-square-compact.svg',
|
2021-12-01 02:14:25 +00:00
|
|
|
$color-white
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
&--text-highlight {
|
|
|
|
@include color-svg(
|
2023-05-23 21:14:47 +00:00
|
|
|
'../images/icons/v3/text/text-square-fill-compact.svg',
|
2021-12-01 02:14:25 +00:00
|
|
|
$color-white
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
&--text-outline {
|
|
|
|
@include color-svg(
|
2023-05-23 21:14:47 +00:00
|
|
|
'../images/icons/v3/text/text-outline-compact.svg',
|
2021-12-01 02:14:25 +00:00
|
|
|
$color-white
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
&--width-thin {
|
2023-05-23 21:14:47 +00:00
|
|
|
@include color-svg(
|
|
|
|
'../images/icons/v3/brush_size/brush_size-thin-compact.svg',
|
|
|
|
$color-white
|
|
|
|
);
|
2021-12-01 02:14:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&--width-regular {
|
2023-05-23 21:14:47 +00:00
|
|
|
@include color-svg(
|
|
|
|
'../images/icons/v3/brush_size/brush_size-regular-compact.svg',
|
|
|
|
$color-white
|
|
|
|
);
|
2021-12-01 02:14:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&--width-medium {
|
2023-05-23 21:14:47 +00:00
|
|
|
@include color-svg(
|
|
|
|
'../images/icons/v3/brush_size/brush_size-medium-compact.svg',
|
|
|
|
$color-white
|
|
|
|
);
|
2021-12-01 02:14:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&--width-heavy {
|
2023-05-23 21:14:47 +00:00
|
|
|
@include color-svg(
|
|
|
|
'../images/icons/v3/brush_size/brush_size-heavy-compact.svg',
|
|
|
|
$color-white
|
|
|
|
);
|
2021-12-01 02:14:25 +00:00
|
|
|
}
|
|
|
|
}
|
2023-09-14 17:04:48 +00:00
|
|
|
|
|
|
|
&__history-buttons {
|
|
|
|
inset-inline-start: 24px;
|
|
|
|
position: absolute;
|
2023-09-21 16:54:28 +00:00
|
|
|
top: 40px;
|
2023-09-14 17:04:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&__close {
|
|
|
|
@include button-reset;
|
|
|
|
|
|
|
|
border-radius: 4px;
|
|
|
|
height: 20px;
|
|
|
|
position: absolute;
|
|
|
|
inset-inline-end: 24px;
|
2023-09-21 16:54:28 +00:00
|
|
|
top: 40px;
|
2023-09-14 17:04:48 +00:00
|
|
|
width: 20px;
|
|
|
|
|
|
|
|
&::before {
|
|
|
|
content: '';
|
|
|
|
display: block;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
2023-09-21 16:54:28 +00:00
|
|
|
@include color-svg('../images/icons/v3/x/x.svg', $color-gray-15);
|
2023-09-14 17:04:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&:hover,
|
|
|
|
&:focus {
|
|
|
|
box-shadow: 0 0 0 2px $color-ultramarine;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&__crop-preset {
|
|
|
|
@include button-reset;
|
|
|
|
color: $color-white;
|
|
|
|
height: 28px;
|
|
|
|
margin-inline: 12px;
|
|
|
|
padding-block: 5px;
|
|
|
|
padding-inline: 12px;
|
|
|
|
|
|
|
|
&--selected {
|
|
|
|
@include rounded-corners;
|
|
|
|
background: $color-gray-80;
|
|
|
|
}
|
|
|
|
}
|
2021-12-01 02:14:25 +00:00
|
|
|
}
|