From 2c7edf0e198f367bf79d544a8f26ec0b05fffb8b Mon Sep 17 00:00:00 2001 From: Echo Date: Wed, 15 Apr 2026 14:54:10 +0200 Subject: [PATCH] [Glitch] Profile redesign: Make illustration use CSS vars Port fab1e799a6f5eebc4c50b39b6137db28f73c3c14 to glitch-soc Signed-off-by: Claire --- .../components/empty_message.module.scss | 8 ++++++++ .../account_featured/components/empty_message.tsx | 11 ++++------- 2 files changed, 12 insertions(+), 7 deletions(-) create mode 100644 app/javascript/flavours/glitch/features/account_featured/components/empty_message.module.scss diff --git a/app/javascript/flavours/glitch/features/account_featured/components/empty_message.module.scss b/app/javascript/flavours/glitch/features/account_featured/components/empty_message.module.scss new file mode 100644 index 0000000000..25dcf19433 --- /dev/null +++ b/app/javascript/flavours/glitch/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/flavours/glitch/features/account_featured/components/empty_message.tsx b/app/javascript/flavours/glitch/features/account_featured/components/empty_message.tsx index 1f6a064b03..6c3573da21 100644 --- a/app/javascript/flavours/glitch/features/account_featured/components/empty_message.tsx +++ b/app/javascript/flavours/glitch/features/account_featured/components/empty_message.tsx @@ -11,10 +11,10 @@ import { EmptyState } from '@/flavours/glitch/components/empty_state'; import { LimitedAccountHint } from '@/flavours/glitch/features/account_timeline/components/limited_account_hint'; import { areCollectionsEnabled } from '@/flavours/glitch/features/collections/utils'; import { useCurrentAccountId } from '@/flavours/glitch/hooks/useAccountId'; -import { useTheme } from '@/flavours/glitch/hooks/useTheme'; import { useAppDispatch } from '@/flavours/glitch/store'; -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 classes from './empty_message.module.scss'; interface EmptyMessageProps { suspended: 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) {