diff options
Diffstat (limited to 'src/components')
18 files changed, 107 insertions, 104 deletions
diff --git a/src/components/ContextMenu/index.tsx b/src/components/ContextMenu/index.tsx index 4a0814dfe..dd7be13d0 100644 --- a/src/components/ContextMenu/index.tsx +++ b/src/components/ContextMenu/index.tsx @@ -190,7 +190,7 @@ export function Root({children}: {children: React.ReactNode}) { if (item) playHaptic('Light') setHoveredMenuItem(item) }, - } satisfies ContextType), + }) satisfies ContextType, [ measurement, setMeasurement, @@ -710,8 +710,8 @@ export function Item({ const xOffset = position ? position.x : align === 'left' - ? measurement.x - : measurement.x + measurement.width - layout.width + ? measurement.x + : measurement.x + measurement.width - layout.width registerHoverable( id, diff --git a/src/components/Link.tsx b/src/components/Link.tsx index 28cd19418..127b2edfb 100644 --- a/src/components/Link.tsx +++ b/src/components/Link.tsx @@ -99,10 +99,10 @@ export function useLink({ return typeof to === 'string' ? convertBskyAppUrlIfNeeded(sanitizeUrl(to)) : to.screen - ? router.matchName(to.screen)?.build(to.params) - : to.href - ? convertBskyAppUrlIfNeeded(sanitizeUrl(to.href)) - : undefined + ? router.matchName(to.screen)?.build(to.params) + : to.href + ? convertBskyAppUrlIfNeeded(sanitizeUrl(to.href)) + : undefined }, [to]) if (!href) { diff --git a/src/components/Post/Embed/ImageEmbed.tsx b/src/components/Post/Embed/ImageEmbed.tsx index 030d237a0..4ed17230e 100644 --- a/src/components/Post/Embed/ImageEmbed.tsx +++ b/src/components/Post/Embed/ImageEmbed.tsx @@ -77,9 +77,9 @@ export function ImageEmbed({ rest.viewContext === PostEmbedViewContext.ThreadHighlighted ? 'none' : rest.viewContext === - PostEmbedViewContext.FeedEmbedRecordWithMedia - ? 'square' - : 'constrained' + PostEmbedViewContext.FeedEmbedRecordWithMedia + ? 'square' + : 'constrained' } image={image} onPress={(containerRef, dims) => onPress(0, [containerRef], [dims])} diff --git a/src/components/Post/Embed/VideoEmbed/VideoEmbedInner/web-controls/VideoControls.tsx b/src/components/Post/Embed/VideoEmbed/VideoEmbedInner/web-controls/VideoControls.tsx index 6d14deafc..676b52661 100644 --- a/src/components/Post/Embed/VideoEmbed/VideoEmbedInner/web-controls/VideoControls.tsx +++ b/src/components/Post/Embed/VideoEmbed/VideoEmbedInner/web-controls/VideoControls.tsx @@ -317,8 +317,8 @@ export function Controls({ !focused ? msg`Unmute video` : playing - ? msg`Pause video` - : msg`Play video`, + ? msg`Pause video` + : msg`Play video`, )} accessibilityHint="" style={[ diff --git a/src/components/PostControls/PostMenu/PostMenuItems.tsx b/src/components/PostControls/PostMenu/PostMenuItems.tsx index 01ddd0bcf..f0ef9ed05 100644 --- a/src/components/PostControls/PostMenu/PostMenuItems.tsx +++ b/src/components/PostControls/PostMenu/PostMenuItems.tsx @@ -600,8 +600,8 @@ let PostMenuItems = ({ isDetachPending ? Loader : quoteEmbed.isDetached - ? Eye - : EyeSlash + ? Eye + : EyeSlash } position="right" /> diff --git a/src/components/Select/index.web.tsx b/src/components/Select/index.web.tsx index 0de74c562..a4d3fb80b 100644 --- a/src/components/Select/index.web.tsx +++ b/src/components/Select/index.web.tsx @@ -111,8 +111,8 @@ export function Trigger({children, label}: TriggerProps) { borderColor: focused ? t.palette.primary_500 : hovered - ? t.palette.contrast_100 - : t.palette.contrast_25, + ? t.palette.contrast_100 + : t.palette.contrast_25, }, ])}> {children} diff --git a/src/components/WhoCanReply.tsx b/src/components/WhoCanReply.tsx index 29f4ac5bc..22a514194 100644 --- a/src/components/WhoCanReply.tsx +++ b/src/components/WhoCanReply.tsx @@ -1,9 +1,15 @@ import React from 'react' -import {Keyboard, Platform, StyleProp, View, ViewStyle} from 'react-native' import { - AppBskyFeedDefs, + Keyboard, + Platform, + type StyleProp, + View, + type ViewStyle, +} from 'react-native' +import { + type AppBskyFeedDefs, AppBskyFeedPost, - AppBskyGraphDefs, + type AppBskyGraphDefs, AtUri, } from '@atproto/api' import {msg, Trans} from '@lingui/macro' @@ -13,7 +19,7 @@ import {HITSLOP_10} from '#/lib/constants' import {makeListLink, makeProfileLink} from '#/lib/routes/links' import {isNative} from '#/platform/detection' import { - ThreadgateAllowUISetting, + type ThreadgateAllowUISetting, threadgateViewToAllowUISetting, } from '#/state/queries/threadgate' import {atoms as a, useTheme} from '#/alf' @@ -70,8 +76,8 @@ export function WhoCanReply({post, isThreadAuthor, style}: WhoCanReplyProps) { const description = anyoneCanReply ? _(msg`Everybody can reply`) : noOneCanReply - ? _(msg`Replies disabled`) - : _(msg`Some people can reply`) + ? _(msg`Replies disabled`) + : _(msg`Some people can reply`) const onPressOpen = () => { if (isNative && Keyboard.isVisible()) { diff --git a/src/components/dialogs/EmailDialog/screens/Manage2FA/Disable.tsx b/src/components/dialogs/EmailDialog/screens/Manage2FA/Disable.tsx index 1896ff27d..2b0e86c61 100644 --- a/src/components/dialogs/EmailDialog/screens/Manage2FA/Disable.tsx +++ b/src/components/dialogs/EmailDialog/screens/Manage2FA/Disable.tsx @@ -185,8 +185,8 @@ export function Disable() { state.emailStatus === 'pending' ? Loader : state.emailStatus === 'success' - ? Check - : Envelope + ? Check + : Envelope } /> </Button> diff --git a/src/components/dialogs/EmailDialog/screens/Manage2FA/Enable.tsx b/src/components/dialogs/EmailDialog/screens/Manage2FA/Enable.tsx index 7a126792a..bf893701c 100644 --- a/src/components/dialogs/EmailDialog/screens/Manage2FA/Enable.tsx +++ b/src/components/dialogs/EmailDialog/screens/Manage2FA/Enable.tsx @@ -116,8 +116,8 @@ export function Enable() { state.status === 'pending' ? Loader : state.status === 'success' - ? Check - : ShieldIcon + ? Check + : ShieldIcon } /> </Button> diff --git a/src/components/dialogs/SearchablePeopleList.tsx b/src/components/dialogs/SearchablePeopleList.tsx index 81655be0f..159f623b9 100644 --- a/src/components/dialogs/SearchablePeopleList.tsx +++ b/src/components/dialogs/SearchablePeopleList.tsx @@ -390,8 +390,8 @@ function DefaultProfileCard({ !enabled ? {opacity: 0.5} : pressed || focused || hovered - ? t.atoms.bg_contrast_25 - : t.atoms.bg, + ? t.atoms.bg_contrast_25 + : t.atoms.bg, ]}> <ProfileCard.Header> <ProfileCard.Avatar diff --git a/src/components/dms/EmojiReactionPicker.tsx b/src/components/dms/EmojiReactionPicker.tsx index cdb1680e8..b83fd4454 100644 --- a/src/components/dms/EmojiReactionPicker.tsx +++ b/src/components/dms/EmojiReactionPicker.tsx @@ -98,8 +98,8 @@ export function EmojiReactionPicker({ : t.palette.primary_500, } : alreadyReacted - ? {backgroundColor: t.palette.primary_200} - : bgColor, + ? {backgroundColor: t.palette.primary_200} + : bgColor, {height: 40, width: 40}, a.justify_center, a.align_center, diff --git a/src/components/dms/MessageContextMenu.tsx b/src/components/dms/MessageContextMenu.tsx index a45ec7a07..d1771659d 100644 --- a/src/components/dms/MessageContextMenu.tsx +++ b/src/components/dms/MessageContextMenu.tsx @@ -128,8 +128,7 @@ export let MessageContextMenu = ({ label={_(msg`Message options`)} contentLabel={_( msg`Message from @${ - sender?.handle ?? // should always be defined - 'unknown' + sender?.handle ?? 'unknown' // should always be defined }: ${message.text}`, )}> {children} diff --git a/src/components/icons/VerifiedCheck.tsx b/src/components/icons/VerifiedCheck.tsx index 9d0aa9158..a98fdfc5d 100644 --- a/src/components/icons/VerifiedCheck.tsx +++ b/src/components/icons/VerifiedCheck.tsx @@ -3,28 +3,27 @@ import Svg, {Circle, Path} from 'react-native-svg' import {type Props, useCommonSVGProps} from '#/components/icons/common' -export const VerifiedCheck = React.forwardRef<Svg, Props>(function LogoImpl( - props, - ref, -) { - const {fill, size, style, ...rest} = useCommonSVGProps(props) +export const VerifiedCheck = React.forwardRef<Svg, Props>( + function LogoImpl(props, ref) { + const {fill, size, style, ...rest} = useCommonSVGProps(props) - return ( - <Svg - fill="none" - {...rest} - ref={ref} - viewBox="0 0 24 24" - width={size} - height={size} - style={[style]}> - <Circle cx="12" cy="12" r="11.5" fill={fill} /> - <Path - fill="#fff" - fillRule="evenodd" - clipRule="evenodd" - d="M17.659 8.175a1.361 1.361 0 0 1 0 1.925l-6.224 6.223a1.361 1.361 0 0 1-1.925 0L6.4 13.212a1.361 1.361 0 0 1 1.925-1.925l2.149 2.148 5.26-5.26a1.361 1.361 0 0 1 1.925 0Z" - /> - </Svg> - ) -}) + return ( + <Svg + fill="none" + {...rest} + ref={ref} + viewBox="0 0 24 24" + width={size} + height={size} + style={[style]}> + <Circle cx="12" cy="12" r="11.5" fill={fill} /> + <Path + fill="#fff" + fillRule="evenodd" + clipRule="evenodd" + d="M17.659 8.175a1.361 1.361 0 0 1 0 1.925l-6.224 6.223a1.361 1.361 0 0 1-1.925 0L6.4 13.212a1.361 1.361 0 0 1 1.925-1.925l2.149 2.148 5.26-5.26a1.361 1.361 0 0 1 1.925 0Z" + /> + </Svg> + ) + }, +) diff --git a/src/components/icons/VerifierCheck.tsx b/src/components/icons/VerifierCheck.tsx index 143c24b97..4674fdde8 100644 --- a/src/components/icons/VerifierCheck.tsx +++ b/src/components/icons/VerifierCheck.tsx @@ -3,33 +3,32 @@ import Svg, {Path} from 'react-native-svg' import {type Props, useCommonSVGProps} from '#/components/icons/common' -export const VerifierCheck = React.forwardRef<Svg, Props>(function LogoImpl( - props, - ref, -) { - const {fill, size, style, ...rest} = useCommonSVGProps(props) +export const VerifierCheck = React.forwardRef<Svg, Props>( + function LogoImpl(props, ref) { + const {fill, size, style, ...rest} = useCommonSVGProps(props) - return ( - <Svg - fill="none" - {...rest} - ref={ref} - viewBox="0 0 24 24" - width={size} - height={size} - style={[style]}> - <Path - fill={fill} - fillRule="evenodd" - clipRule="evenodd" - d="M8.792 1.615a4.154 4.154 0 0 1 6.416 0 4.154 4.154 0 0 0 3.146 1.515 4.154 4.154 0 0 1 4 5.017 4.154 4.154 0 0 0 .777 3.404 4.154 4.154 0 0 1-1.427 6.255 4.153 4.153 0 0 0-2.177 2.73 4.154 4.154 0 0 1-5.781 2.784 4.154 4.154 0 0 0-3.492 0 4.154 4.154 0 0 1-5.78-2.784 4.154 4.154 0 0 0-2.178-2.73A4.154 4.154 0 0 1 .87 11.551a4.154 4.154 0 0 0 .776-3.404A4.154 4.154 0 0 1 5.646 3.13a4.154 4.154 0 0 0 3.146-1.515Z" - /> - <Path - fill="#fff" - fillRule="evenodd" - clipRule="evenodd" - d="M17.861 8.26a1.438 1.438 0 0 1 0 2.033l-6.571 6.571a1.437 1.437 0 0 1-2.033 0L5.97 13.58a1.438 1.438 0 0 1 2.033-2.033l2.27 2.269 5.554-5.555a1.437 1.437 0 0 1 2.033 0Z" - /> - </Svg> - ) -}) + return ( + <Svg + fill="none" + {...rest} + ref={ref} + viewBox="0 0 24 24" + width={size} + height={size} + style={[style]}> + <Path + fill={fill} + fillRule="evenodd" + clipRule="evenodd" + d="M8.792 1.615a4.154 4.154 0 0 1 6.416 0 4.154 4.154 0 0 0 3.146 1.515 4.154 4.154 0 0 1 4 5.017 4.154 4.154 0 0 0 .777 3.404 4.154 4.154 0 0 1-1.427 6.255 4.153 4.153 0 0 0-2.177 2.73 4.154 4.154 0 0 1-5.781 2.784 4.154 4.154 0 0 0-3.492 0 4.154 4.154 0 0 1-5.78-2.784 4.154 4.154 0 0 0-2.178-2.73A4.154 4.154 0 0 1 .87 11.551a4.154 4.154 0 0 0 .776-3.404A4.154 4.154 0 0 1 5.646 3.13a4.154 4.154 0 0 0 3.146-1.515Z" + /> + <Path + fill="#fff" + fillRule="evenodd" + clipRule="evenodd" + d="M17.861 8.26a1.438 1.438 0 0 1 0 2.033l-6.571 6.571a1.437 1.437 0 0 1-2.033 0L5.97 13.58a1.438 1.438 0 0 1 2.033-2.033l2.27 2.269 5.554-5.555a1.437 1.437 0 0 1 2.033 0Z" + /> + </Svg> + ) + }, +) diff --git a/src/components/moderation/ContentHider.tsx b/src/components/moderation/ContentHider.tsx index d3f74c0c5..9e94a413c 100644 --- a/src/components/moderation/ContentHider.tsx +++ b/src/components/moderation/ContentHider.tsx @@ -1,6 +1,6 @@ import React from 'react' -import {StyleProp, View, ViewStyle} from 'react-native' -import {ModerationUI} from '@atproto/api' +import {type StyleProp, View, type ViewStyle} from 'react-native' +import {type ModerationUI} from '@atproto/api' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' @@ -148,8 +148,8 @@ function ContentHiderActive({ modui.noOverride ? _(msg`Learn more about the moderation applied to this content`) : override - ? _(msg`Hides the content`) - : _(msg`Shows the content`) + ? _(msg`Hides the content`) + : _(msg`Shows the content`) }> {state => ( <View diff --git a/src/components/moderation/ReportDialog/index.tsx b/src/components/moderation/ReportDialog/index.tsx index acab1d21f..797ff533f 100644 --- a/src/components/moderation/ReportDialog/index.tsx +++ b/src/components/moderation/ReportDialog/index.tsx @@ -512,13 +512,13 @@ function StepTitle({ backgroundColor: active ? t.palette.primary_500 : completed - ? t.palette.primary_100 - : t.atoms.bg_contrast_25.backgroundColor, + ? t.palette.primary_100 + : t.atoms.bg_contrast_25.backgroundColor, borderColor: active ? t.palette.primary_500 : completed - ? t.palette.primary_400 - : t.atoms.border_contrast_low.borderColor, + ? t.palette.primary_400 + : t.atoms.border_contrast_low.borderColor, }, ]}> {completed ? ( @@ -533,8 +533,8 @@ function StepTitle({ color: active ? 'white' : completed - ? t.palette.primary_700 - : t.atoms.text_contrast_medium.color, + ? t.palette.primary_700 + : t.atoms.text_contrast_medium.color, fontVariant: ['tabular-nums'], width: 24, height: 24, diff --git a/src/components/verification/VerificationCheckButton.tsx b/src/components/verification/VerificationCheckButton.tsx index 9278a3072..2ccc730f6 100644 --- a/src/components/verification/VerificationCheckButton.tsx +++ b/src/components/verification/VerificationCheckButton.tsx @@ -130,8 +130,8 @@ export function Badge({ verifiedByHidden ? t.atoms.bg_contrast_100.backgroundColor : state.profile.isVerified - ? t.palette.primary_500 - : t.atoms.bg_contrast_100.backgroundColor + ? t.palette.primary_500 + : t.atoms.bg_contrast_100.backgroundColor } verifier={state.profile.role === 'verifier'} /> diff --git a/src/components/verification/VerificationsDialog.tsx b/src/components/verification/VerificationsDialog.tsx index 665bf3ba3..447e39e97 100644 --- a/src/components/verification/VerificationsDialog.tsx +++ b/src/components/verification/VerificationsDialog.tsx @@ -64,13 +64,13 @@ function Inner({ ? _(msg`You are verified`) : _(msg`Your verifications`) : state.profile.isVerified - ? _(msg`${userName} is verified`) - : _( - msg({ - message: `${userName}'s verifications`, - comment: `Possessive, meaning "the verifications of {userName}"`, - }), - ) + ? _(msg`${userName} is verified`) + : _( + msg({ + message: `${userName}'s verifications`, + comment: `Possessive, meaning "the verifications of {userName}"`, + }), + ) return ( <Dialog.ScrollableInner |