mirror of
https://github.com/mastodon/mastodon.git
synced 2026-09-12 17:55:52 -05:00
Composer redesign: Tile message background image (#40234)
This commit is contained in:
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 417 B |
@@ -8,7 +8,6 @@ import classNames from 'classnames';
|
||||
import { LockSimpleOpenIcon } from '@phosphor-icons/react';
|
||||
import { useDebouncedCallback } from 'use-debounce';
|
||||
|
||||
import messageBackground from '@/images/composer_message.svg?url';
|
||||
import {
|
||||
changeComposeSpoilerness,
|
||||
changeComposeSpoilerText,
|
||||
@@ -70,11 +69,6 @@ export const RedesignComposeForm: React.FC<RedesignComposeFormProps> = ({
|
||||
const type = useAppSelector(selectComposeType);
|
||||
const { sensitive, sensitiveText } = useAppSelector(selectComposeSensitive);
|
||||
|
||||
let background: string | null = null;
|
||||
if (type === 'message') {
|
||||
background = messageBackground;
|
||||
}
|
||||
|
||||
const {
|
||||
onSensitiveChange,
|
||||
onSensitiveTextChange,
|
||||
@@ -94,12 +88,7 @@ export const RedesignComposeForm: React.FC<RedesignComposeFormProps> = ({
|
||||
aria-labelledby={titleId}
|
||||
className={classNames(className, classes.root)}
|
||||
>
|
||||
{background && (
|
||||
<div
|
||||
className={classes.background}
|
||||
style={{ maskImage: `url(${background})` }}
|
||||
/>
|
||||
)}
|
||||
{type === 'message' && <div className={classes.background} />}
|
||||
|
||||
<ComposeFormHeader id={titleId} noMinimize={noMinimize} />
|
||||
|
||||
|
||||
@@ -13,17 +13,20 @@
|
||||
min-width: 300px;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
z-index: 1; // To cover the sidebar
|
||||
}
|
||||
|
||||
.background {
|
||||
mask-repeat: repeat;
|
||||
background-color: var(--color-bg-brand-base);
|
||||
mask-image: url('@/images/composer_message.svg');
|
||||
mask-size: 311.36px auto;
|
||||
background-color: var(--color-border-brand);
|
||||
opacity: 0.15;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
width: 800px;
|
||||
height: 800px;
|
||||
top: 0;
|
||||
left: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user