From fab1e799a6f5eebc4c50b39b6137db28f73c3c14 Mon Sep 17 00:00:00 2001 From: Echo Date: Wed, 15 Apr 2026 14:54:10 +0200 Subject: [PATCH] Profile redesign: Make illustration use CSS vars (#38692) --- app/javascript/images/elephant_ui.svg | 95 +++++++++++++++++++ app/javascript/images/elephant_ui_dark.svg | 1 - app/javascript/images/elephant_ui_light.svg | 1 - .../components/empty_message.module.scss | 8 ++ .../components/empty_message.tsx | 11 +-- 5 files changed, 107 insertions(+), 9 deletions(-) create mode 100644 app/javascript/images/elephant_ui.svg delete mode 100644 app/javascript/images/elephant_ui_dark.svg delete mode 100644 app/javascript/images/elephant_ui_light.svg create mode 100644 app/javascript/mastodon/features/account_featured/components/empty_message.module.scss diff --git a/app/javascript/images/elephant_ui.svg b/app/javascript/images/elephant_ui.svg new file mode 100644 index 0000000000..88b23841ff --- /dev/null +++ b/app/javascript/images/elephant_ui.svg @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/javascript/images/elephant_ui_dark.svg b/app/javascript/images/elephant_ui_dark.svg deleted file mode 100644 index aa91b704c7..0000000000 --- a/app/javascript/images/elephant_ui_dark.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/app/javascript/images/elephant_ui_light.svg b/app/javascript/images/elephant_ui_light.svg deleted file mode 100644 index 1eeab31cf4..0000000000 --- a/app/javascript/images/elephant_ui_light.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/app/javascript/mastodon/features/account_featured/components/empty_message.module.scss b/app/javascript/mastodon/features/account_featured/components/empty_message.module.scss new file mode 100644 index 0000000000..25dcf19433 --- /dev/null +++ b/app/javascript/mastodon/features/account_featured/components/empty_message.module.scss @@ -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; +} diff --git a/app/javascript/mastodon/features/account_featured/components/empty_message.tsx b/app/javascript/mastodon/features/account_featured/components/empty_message.tsx index 2503de2aa0..35b67cd641 100644 --- a/app/javascript/mastodon/features/account_featured/components/empty_message.tsx +++ b/app/javascript/mastodon/features/account_featured/components/empty_message.tsx @@ -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 = ({ }) => { 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 = ({ const hasCollections = areCollectionsEnabled(); - const image = ; + const image = ; if (me === accountId) { if (hasCollections) {