Profile redesign: Make illustration use CSS vars (#38692)

This commit is contained in:
Echo authored and GitHub committed 2026-04-15 12:54:10 +00:00
1 parent 4835c3b7b4
commit fab1e799a6
5 files changed
+107 -9

No files matched your search

@@ -0,0 +1,8 @@
[data-color-scheme='dark'] .image {
--color-skin-1: #3a3a50;
--color-skin-2: #67678e;
--color-skin-3: #44445f;
--color-outline: #21212c;
--color-shadow: #181820;
--color-highlight: #b2b1c8;
}
@@ -5,17 +5,17 @@ import { FormattedMessage } from 'react-intl';
import { useParams } from 'react-router';
import { Link } from 'react-router-dom';
import ElephantDarkImage from '@/images/elephant_ui_dark.svg?react';
import ElephantLightImage from '@/images/elephant_ui_light.svg?react';
import ElephantImage from '@/images/elephant_ui.svg?react';
import { openModal } from '@/mastodon/actions/modal';
import { Button } from '@/mastodon/components/button';
import { EmptyState } from '@/mastodon/components/empty_state';
import { LimitedAccountHint } from '@/mastodon/features/account_timeline/components/limited_account_hint';
import { areCollectionsEnabled } from '@/mastodon/features/collections/utils';
import { useCurrentAccountId } from '@/mastodon/hooks/useAccountId';
import { useTheme } from '@/mastodon/hooks/useTheme';
import { useAppDispatch } from '@/mastodon/store';
import classes from './empty_message.module.scss';
interface EmptyMessageProps {
suspended: boolean;
hidden: boolean;
@@ -33,9 +33,6 @@ export const EmptyMessage: React.FC<EmptyMessageProps> = ({
}) => {
const { acct } = useParams<{ acct?: string }>();
const me = useCurrentAccountId();
const theme = useTheme();
const ElephantImage =
theme === 'dark' ? ElephantDarkImage : ElephantLightImage;
const dispatch = useAppDispatch();
@@ -57,7 +54,7 @@ export const EmptyMessage: React.FC<EmptyMessageProps> = ({
const hasCollections = areCollectionsEnabled();
const image = <ElephantImage />;
const image = <ElephantImage className={classes.image} />;
if (me === accountId) {
if (hasCollections) {