[Glitch] Profile redesign: Make illustration use CSS vars
Port fab1e799a6f5eebc4c50b39b6137db28f73c3c14 to glitch-soc Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
parent
f18834d86e
commit
2c7edf0e19
@ -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;
|
||||
}
|
||||
@ -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<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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user