diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-12-04 12:51:08 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-04 12:51:08 -0800 |
commit | a46059ca465e6f4d27930f3e520686966cae1b41 (patch) | |
tree | b0aa910f2542d1f3970e569f89797512d28d1f27 /src/view/com/util/moderation/ProfileHeaderAlerts.tsx | |
parent | 971c402788ce0be1d005471513b3b9ebf9ff6613 (diff) | |
download | voidsky-a46059ca465e6f4d27930f3e520686966cae1b41.tar.zst |
Improve the post-hiders and the header alerts (#2074)
* Improve the post-hider and the header alerts * Adjust the contenthider (icon, font size)
Diffstat (limited to 'src/view/com/util/moderation/ProfileHeaderAlerts.tsx')
-rw-r--r-- | src/view/com/util/moderation/ProfileHeaderAlerts.tsx | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/view/com/util/moderation/ProfileHeaderAlerts.tsx b/src/view/com/util/moderation/ProfileHeaderAlerts.tsx index d2675ca54..0f07b679b 100644 --- a/src/view/com/util/moderation/ProfileHeaderAlerts.tsx +++ b/src/view/com/util/moderation/ProfileHeaderAlerts.tsx @@ -10,6 +10,7 @@ import { } from 'lib/moderation' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' +import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome' import {useModalControls} from '#/state/modals' export function ProfileHeaderAlerts({ @@ -31,6 +32,7 @@ export function ProfileHeaderAlerts({ return ( <View style={styles.grid}> {causes.map(cause => { + const isMute = cause.type === 'muted' const desc = describeModerationCause(cause, 'account') return ( <Pressable @@ -47,11 +49,19 @@ export function ProfileHeaderAlerts({ accessibilityLabel={_(msg`Learn more about this warning`)} accessibilityHint="" style={[styles.container, pal.viewLight, style]}> - <ShieldExclamation style={pal.text} size={24} /> - <Text type="lg" style={[{flex: 1}, pal.text]}> + {isMute ? ( + <FontAwesomeIcon + icon={['far', 'eye-slash']} + size={14} + color={pal.colors.textLight} + /> + ) : ( + <ShieldExclamation style={pal.text} size={18} /> + )} + <Text type="sm" style={[{flex: 1}, pal.text]}> {desc.name} </Text> - <Text type="lg" style={[pal.link, styles.learnMoreBtn]}> + <Text type="sm" style={[pal.link, styles.learnMoreBtn]}> <Trans>Learn More</Trans> </Text> </Pressable> |