From 16462b08a7284a00659e6ea09f4017710ad06e1f Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Tue, 15 Apr 2025 15:30:03 -0500 Subject: Standarize on shields (#8204) --- assets/icons/shieldCheck_stroke2_corner0_rounded.svg | 1 + src/components/icons/Shield.tsx | 4 ++++ src/screens/Profile/Header/ProfileHeaderStandard.tsx | 16 +++++++--------- src/screens/Settings/AccountSettings.tsx | 10 +++++----- src/screens/Settings/PrivacyAndSecuritySettings.tsx | 8 ++++---- src/view/screens/Storybook/Settings.tsx | 4 ++-- 6 files changed, 23 insertions(+), 20 deletions(-) create mode 100644 assets/icons/shieldCheck_stroke2_corner0_rounded.svg diff --git a/assets/icons/shieldCheck_stroke2_corner0_rounded.svg b/assets/icons/shieldCheck_stroke2_corner0_rounded.svg new file mode 100644 index 000000000..1118daf24 --- /dev/null +++ b/assets/icons/shieldCheck_stroke2_corner0_rounded.svg @@ -0,0 +1 @@ + diff --git a/src/components/icons/Shield.tsx b/src/components/icons/Shield.tsx index 5038d5c24..4e5dc8ea0 100644 --- a/src/components/icons/Shield.tsx +++ b/src/components/icons/Shield.tsx @@ -3,3 +3,7 @@ import {createSinglePathSVG} from './TEMPLATE' export const Shield_Stroke2_Corner0_Rounded = createSinglePathSVG({ path: 'M11.675 2.054a1 1 0 0 1 .65 0l8 2.75A1 1 0 0 1 21 5.75v6.162c0 2.807-1.149 4.83-2.813 6.405-1.572 1.488-3.632 2.6-5.555 3.636l-.157.085a1 1 0 0 1-.95 0l-.157-.085c-1.923-1.037-3.983-2.148-5.556-3.636C4.15 16.742 3 14.719 3 11.912V5.75a1 1 0 0 1 .675-.946l8-2.75ZM5 6.464v5.448c0 2.166.851 3.687 2.188 4.952 1.276 1.209 2.964 2.158 4.812 3.157 1.848-1 3.536-1.948 4.813-3.157C18.148 15.6 19 14.078 19 11.912V6.464l-7-2.407-7 2.407Z', }) + +export const ShieldCheck_Stroke2_Corner0_Rounded = createSinglePathSVG({ + path: 'M12.325 2.054a1 1 0 0 0-.65 0l-8 2.75A1 1 0 0 0 3 5.75v6.162c0 2.807 1.149 4.83 2.813 6.405 1.572 1.488 3.632 2.6 5.555 3.636l.157.085a1 1 0 0 0 .95 0l.157-.085c1.923-1.037 3.983-2.148 5.556-3.636C19.85 16.742 21 14.719 21 11.912V5.75a1 1 0 0 0-.675-.946l-8-2.75ZM5 11.912V6.464l7-2.407 7 2.407v5.448c0 2.166-.851 3.687-2.188 4.952-1.276 1.209-2.964 2.158-4.812 3.157-1.848-1-3.536-1.948-4.813-3.157C5.851 15.6 5 14.078 5 11.912Zm10.207-1.205a1 1 0 0 0-1.414-1.414L11 12.086l-.793-.793a1 1 0 0 0-1.414 1.414l1.5 1.5a1 1 0 0 0 1.414 0l3.5-3.5Z', +}) diff --git a/src/screens/Profile/Header/ProfileHeaderStandard.tsx b/src/screens/Profile/Header/ProfileHeaderStandard.tsx index a6b1376aa..773c296c9 100644 --- a/src/screens/Profile/Header/ProfileHeaderStandard.tsx +++ b/src/screens/Profile/Header/ProfileHeaderStandard.tsx @@ -1,10 +1,10 @@ import React, {memo, useMemo} from 'react' import {View} from 'react-native' import { - AppBskyActorDefs, + type AppBskyActorDefs, moderateProfile, - ModerationOpts, - RichText as RichTextAPI, + type ModerationOpts, + type RichText as RichTextAPI, } from '@atproto/api' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' @@ -13,7 +13,7 @@ import {sanitizeDisplayName} from '#/lib/strings/display-names' import {logger} from '#/logger' import {isIOS, isWeb} from '#/platform/detection' import {useProfileShadow} from '#/state/cache/profile-shadow' -import {Shadow} from '#/state/cache/types' +import {type Shadow} from '#/state/cache/types' import {useModalControls} from '#/state/modals' import { useProfileBlockMutationQueue, @@ -26,7 +26,6 @@ import {atoms as a} from '#/alf' import {Button, ButtonIcon, ButtonText} from '#/components/Button' import {useDialogControl} from '#/components/Dialog' import {MessageProfileButton} from '#/components/dms/MessageProfileButton' -import {Check_Stroke2_Corner0_Rounded as Check} from '#/components/icons/Check' import {PlusLarge_Stroke2_Corner0_Rounded as Plus} from '#/components/icons/Plus' import { KnownFollowers, @@ -221,10 +220,9 @@ let ProfileHeaderStandard = ({ profile.viewer?.following ? onPressUnfollow : onPressFollow } style={[a.rounded_full]}> - + {!profile.viewer?.following && ( + + )} {profile.viewer?.following ? ( Following diff --git a/src/screens/Settings/AccountSettings.tsx b/src/screens/Settings/AccountSettings.tsx index 8d7dbde61..a69c5cdd3 100644 --- a/src/screens/Settings/AccountSettings.tsx +++ b/src/screens/Settings/AccountSettings.tsx @@ -1,8 +1,8 @@ import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' -import {NativeStackScreenProps} from '@react-navigation/native-stack' +import {type NativeStackScreenProps} from '@react-navigation/native-stack' -import {CommonNavigatorParams} from '#/lib/routes/types' +import {type CommonNavigatorParams} from '#/lib/routes/types' import {useModalControls} from '#/state/modals' import {useSession} from '#/state/session' import * as SettingsList from '#/screens/Settings/components/SettingsList' @@ -17,8 +17,8 @@ import {Envelope_Stroke2_Corner2_Rounded as EnvelopeIcon} from '#/components/ico import {Freeze_Stroke2_Corner2_Rounded as FreezeIcon} from '#/components/icons/Freeze' import {Lock_Stroke2_Corner2_Rounded as LockIcon} from '#/components/icons/Lock' import {PencilLine_Stroke2_Corner2_Rounded as PencilIcon} from '#/components/icons/Pencil' +import {ShieldCheck_Stroke2_Corner0_Rounded as ShieldIcon} from '#/components/icons/Shield' import {Trash_Stroke2_Corner2_Rounded} from '#/components/icons/Trash' -import {Verified_Stroke2_Corner2_Rounded as VerifiedIcon} from '#/components/icons/Verified' import * as Layout from '#/components/Layout' import {ChangeHandleDialog} from './components/ChangeHandleDialog' import {DeactivateAccountDialog} from './components/DeactivateAccountDialog' @@ -65,7 +65,7 @@ export function AccountSettingsScreen({}: Props) { {currentAccount.email || (no email)} {currentAccount.emailConfirmed && ( - + )} )} @@ -83,7 +83,7 @@ export function AccountSettingsScreen({}: Props) { hoverStyle={[{backgroundColor: t.palette.primary_100}]} contentContainerStyle={[a.rounded_md, a.px_lg]}>