Bluesky app fork with some witchin' additions 💫

the very awful square ui toggle (not well made n wip)

+629 -173
+5 -2
src/components/AccountList.tsx
··· 8 8 import {isJwtExpired} from '#/lib/jwt' 9 9 import {sanitizeDisplayName} from '#/lib/strings/display-names' 10 10 import {sanitizeHandle} from '#/lib/strings/handles' 11 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 11 12 import {useProfilesQuery} from '#/state/queries/profile' 12 13 import {type SessionAccount, useSession} from '#/state/session' 13 14 import {UserAvatar} from '#/view/com/util/UserAvatar' ··· 34 35 const {currentAccount, accounts} = useSession() 35 36 const t = useTheme() 36 37 const {_} = useLingui() 38 + const enableSquareButtons = useEnableSquareButtons() 37 39 const {data: profiles} = useProfilesQuery({ 38 40 handles: accounts.map(acc => acc.did), 39 41 }) ··· 81 83 <View 82 84 style={[ 83 85 t.atoms.bg_contrast_25, 84 - a.rounded_full, 86 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 85 87 {width: 48, height: 48}, 86 88 a.justify_center, 87 89 a.align_center, ··· 117 119 const {_} = useLingui() 118 120 const verification = useSimpleVerificationState({profile}) 119 121 const {isActive: live} = useActorStatus(profile) 122 + const enableSquareButtons = useEnableSquareButtons() 120 123 121 124 const onPress = useCallback(() => { 122 125 onSelect(account) ··· 201 204 height: 20, 202 205 backgroundColor: t.palette.positive_500, 203 206 }, 204 - a.rounded_full, 207 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 205 208 a.justify_center, 206 209 a.align_center, 207 210 ]}>
+4 -1
src/components/BlockedGeoOverlay.tsx
··· 7 7 import {logger} from '#/logger' 8 8 import {isWeb} from '#/platform/detection' 9 9 import {useDeviceGeolocationApi} from '#/state/geolocation' 10 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 10 11 import {atoms as a, useBreakpoints, useTheme, web} from '#/alf' 11 12 import {Button, ButtonIcon, ButtonText} from '#/components/Button' 12 13 import * as Dialog from '#/components/Dialog' ··· 27 28 const insets = useSafeAreaInsets() 28 29 const geoDialog = Dialog.useDialogControl() 29 30 const {setDeviceGeolocation} = useDeviceGeolocationApi() 31 + 32 + const enableSquareButtons = useEnableSquareButtons() 30 33 31 34 useEffect(() => { 32 35 // just counting overall hits here ··· 85 88 a.pl_md, 86 89 a.pr_lg, 87 90 a.py_sm, 88 - a.rounded_full, 91 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 89 92 a.flex_row, 90 93 a.align_center, 91 94 a.gap_xs,
+8 -5
src/components/Button.tsx
··· 14 14 type ViewStyle, 15 15 } from 'react-native' 16 16 17 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 17 18 import {atoms as a, flatten, select, useTheme} from '#/alf' 18 19 import {type Props as SVGIconProps} from '#/components/icons/common' 19 20 import {Text} from '#/components/Typography' ··· 150 151 if (!variant && color) { 151 152 variant = 'solid' 152 153 } 154 + 155 + const enableSquareButtons = useEnableSquareButtons() 153 156 154 157 const t = useTheme() 155 158 const [state, setState] = React.useState({ ··· 440 443 441 444 if (shape === 'default') { 442 445 if (size === 'large') { 443 - baseStyles.push(a.rounded_full, { 446 + baseStyles.push(enableSquareButtons ? a.rounded_sm : a.rounded_full, { 444 447 paddingVertical: 12, 445 448 paddingHorizontal: 24, 446 449 gap: 6, 447 450 }) 448 451 } else if (size === 'small') { 449 - baseStyles.push(a.rounded_full, { 452 + baseStyles.push(enableSquareButtons ? a.rounded_sm : a.rounded_full, { 450 453 paddingVertical: 8, 451 454 paddingHorizontal: 14, 452 455 gap: 5, 453 456 }) 454 457 } else if (size === 'tiny') { 455 - baseStyles.push(a.rounded_full, { 458 + baseStyles.push(enableSquareButtons ? a.rounded_sm : a.rounded_full, { 456 459 paddingVertical: 5, 457 460 paddingHorizontal: 10, 458 461 gap: 3, ··· 507 510 } 508 511 509 512 if (shape === 'round') { 510 - baseStyles.push(a.rounded_full) 513 + baseStyles.push(enableSquareButtons ? a.rounded_sm : a.rounded_full) 511 514 } else if (shape === 'square') { 512 515 if (size === 'tiny') { 513 516 baseStyles.push({ ··· 523 526 baseStyles, 524 527 hoverStyles, 525 528 } 526 - }, [t, variant, color, size, shape, disabled]) 529 + }, [t, variant, color, size, shape, disabled, enableSquareButtons]) 527 530 528 531 const context = React.useMemo<ButtonContext>( 529 532 () => ({
+4 -2
src/components/ContextMenu/index.tsx
··· 50 50 import {useNonReactiveCallback} from '#/lib/hooks/useNonReactiveCallback' 51 51 import {logger} from '#/logger' 52 52 import {isAndroid, isIOS} from '#/platform/detection' 53 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 53 54 import {atoms as a, platform, tokens, useTheme} from '#/alf' 54 55 import { 55 56 Context, ··· 824 825 825 826 export function ItemRadio({selected}: {selected: boolean}) { 826 827 const t = useTheme() 828 + const enableSquareButtons = useEnableSquareButtons() 827 829 return ( 828 830 <View 829 831 style={[ 830 832 a.justify_center, 831 833 a.align_center, 832 - a.rounded_full, 834 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 833 835 t.atoms.border_contrast_high, 834 836 { 835 837 borderWidth: 1, ··· 841 843 <View 842 844 style={[ 843 845 a.absolute, 844 - a.rounded_full, 846 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 845 847 {height: 14, width: 14}, 846 848 selected ? {backgroundColor: t.palette.primary_500} : {}, 847 849 ]}
+5 -1
src/components/Dialog/index.web.tsx
··· 16 16 import {logger} from '#/logger' 17 17 import {useA11y} from '#/state/a11y' 18 18 import {useDialogStateControlContext} from '#/state/dialogs' 19 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 19 20 import {atoms as a, flatten, useBreakpoints, useTheme, web} from '#/alf' 20 21 import {Button, ButtonIcon} from '#/components/Button' 21 22 import {Context} from '#/components/Dialog/context' ··· 277 278 export function Close() { 278 279 const {_} = useLingui() 279 280 const {close} = React.useContext(Context) 281 + 282 + const enableSquareButtons = useEnableSquareButtons() 283 + 280 284 return ( 281 285 <View 282 286 style={[ ··· 291 295 size="small" 292 296 variant="ghost" 293 297 color="secondary" 294 - shape="round" 298 + shape={enableSquareButtons ? 'square' : 'round'} 295 299 onPress={() => close()} 296 300 label={_(msg`Close active dialog`)}> 297 301 <ButtonIcon icon={X} size="md" />
+3 -1
src/components/IconCircle.tsx
··· 1 1 import {View} from 'react-native' 2 2 3 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 3 4 import { 4 5 atoms as a, 5 6 type TextStyleProp, ··· 20 21 iconStyle?: TextStyleProp['style'] 21 22 }) { 22 23 const t = useTheme() 24 + const enableSquareButtons = useEnableSquareButtons() 23 25 24 26 return ( 25 27 <View 26 28 style={[ 27 29 a.justify_center, 28 30 a.align_center, 29 - a.rounded_full, 31 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 30 32 { 31 33 width: size === 'lg' ? 52 : 64, 32 34 height: size === 'lg' ? 52 : 64,
+7 -3
src/components/InterestTabs.tsx
··· 10 10 11 11 import {useNonReactiveCallback} from '#/lib/hooks/useNonReactiveCallback' 12 12 import {isWeb} from '#/platform/detection' 13 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 13 14 import {DraggableScrollView} from '#/view/com/pager/DraggableScrollView' 14 15 import {atoms as a, tokens, useTheme, web} from '#/alf' 15 16 import {transparentifyColor} from '#/alf/util/colorGeneration' ··· 52 53 const [contentWidth, setContentWidth] = useState(0) 53 54 const pendingTabOffsets = useRef<{x: number; width: number}[]>([]) 54 55 const [tabOffsets, setTabOffsets] = useState<{x: number; width: number}[]>([]) 56 + 57 + const enableSquareButtons = useEnableSquareButtons() 55 58 56 59 const onInitialLayout = useNonReactiveCallback(() => { 57 60 const index = interests.indexOf(selectedInterest) ··· 264 267 t.atoms.bg, 265 268 a.h_full, 266 269 a.aspect_square, 267 - a.rounded_full, 270 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 268 271 ]}> 269 272 <ButtonIcon icon={ArrowLeft} /> 270 273 </Button> ··· 298 301 t.atoms.bg, 299 302 a.h_full, 300 303 a.aspect_square, 301 - a.rounded_full, 304 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 302 305 ]}> 303 306 <ButtonIcon icon={ArrowRight} /> 304 307 </Button> ··· 325 328 }) { 326 329 const t = useTheme() 327 330 const {_} = useLingui() 331 + const enableSquareButtons = useEnableSquareButtons() 328 332 const label = active 329 333 ? _( 330 334 msg({ ··· 355 359 {({hovered, pressed, focused}) => ( 356 360 <View 357 361 style={[ 358 - a.rounded_full, 362 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 359 363 a.px_lg, 360 364 a.py_sm, 361 365 a.border,
+4 -2
src/components/Menu/index.tsx
··· 11 11 import flattenReactChildren from 'react-keyed-flatten-children' 12 12 13 13 import {isAndroid, isIOS, isNative} from '#/platform/detection' 14 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 14 15 import {atoms as a, useTheme} from '#/alf' 15 16 import {Button, ButtonText} from '#/components/Button' 16 17 import * as Dialog from '#/components/Dialog' ··· 219 220 220 221 export function ItemRadio({selected}: {selected: boolean}) { 221 222 const t = useTheme() 223 + const enableSquareButtons = useEnableSquareButtons() 222 224 return ( 223 225 <View 224 226 style={[ 225 227 a.justify_center, 226 228 a.align_center, 227 - a.rounded_full, 229 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 228 230 t.atoms.border_contrast_high, 229 231 { 230 232 borderWidth: 1, ··· 236 238 <View 237 239 style={[ 238 240 a.absolute, 239 - a.rounded_full, 241 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 240 242 {height: 14, width: 14}, 241 243 selected 242 244 ? {
+4 -2
src/components/Menu/index.web.tsx
··· 11 11 import {DropdownMenu} from 'radix-ui' 12 12 13 13 import {useA11y} from '#/state/a11y' 14 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 14 15 import {atoms as a, flatten, useTheme, web} from '#/alf' 15 16 import type * as Dialog from '#/components/Dialog' 16 17 import {useInteractionState} from '#/components/hooks/useInteractionState' ··· 330 331 331 332 export function ItemRadio({selected}: {selected: boolean}) { 332 333 const t = useTheme() 334 + const enableSquareButtons = useEnableSquareButtons() 333 335 return ( 334 336 <View 335 337 style={[ 336 338 a.justify_center, 337 339 a.align_center, 338 - a.rounded_full, 340 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 339 341 t.atoms.border_contrast_high, 340 342 { 341 343 borderWidth: 1, ··· 347 349 <View 348 350 style={[ 349 351 a.absolute, 350 - a.rounded_full, 352 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 351 353 {height: 14, width: 14}, 352 354 selected 353 355 ? {
+4 -1
src/components/Pills.tsx
··· 4 4 import {Trans} from '@lingui/macro' 5 5 6 6 import {useModerationCauseDescription} from '#/lib/moderation/useModerationCauseDescription' 7 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 7 8 import {UserAvatar} from '#/view/com/util/UserAvatar' 8 9 import {atoms as a, useTheme, type ViewStyleProp} from '#/alf' 9 10 import {Button} from '#/components/Button' ··· 67 68 const isBlueskyLabel = 68 69 desc.sourceType === 'labeler' && desc.sourceDid === BSKY_LABELER_DID 69 70 71 + const enableSquareButtons = useEnableSquareButtons() 72 + 70 73 const {outer, avi, text} = React.useMemo(() => { 71 74 switch (size) { 72 75 case 'lg': { ··· 116 119 style={[ 117 120 a.flex_row, 118 121 a.align_center, 119 - a.rounded_full, 122 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 120 123 outer, 121 124 (hovered || pressed) && t.atoms.bg_contrast_50, 122 125 ]}>
+3 -1
src/components/PolicyUpdateOverlay/Badge.tsx
··· 1 1 import {View} from 'react-native' 2 2 import {Trans} from '@lingui/macro' 3 3 4 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 4 5 import {Logo} from '#/view/icons/Logo' 5 6 import {atoms as a, useTheme} from '#/alf' 6 7 import {Text} from '#/components/Typography' 7 8 8 9 export function Badge() { 9 10 const t = useTheme() 11 + const enableSquareButtons = useEnableSquareButtons() 10 12 return ( 11 13 <View style={[a.align_start]}> 12 14 <View ··· 14 16 a.pl_md, 15 17 a.pr_lg, 16 18 a.py_sm, 17 - a.rounded_full, 19 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 18 20 a.flex_row, 19 21 a.align_center, 20 22 a.gap_xs,
+3 -1
src/components/Post/Embed/VideoEmbed/VideoEmbedInner/VideoEmbedInnerNative.tsx
··· 7 7 8 8 import {HITSLOP_30} from '#/lib/constants' 9 9 import {useAutoplayDisabled} from '#/state/preferences' 10 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 10 11 import {atoms as a, useTheme} from '#/alf' 11 12 import {useIsWithinMessage} from '#/components/dms/MessageContext' 12 13 import {Mute_Stroke2_Corner0_Rounded as MuteIcon} from '#/components/icons/Mute' ··· 177 178 accessibilityHint: string 178 179 style?: StyleProp<ViewStyle> 179 180 }) { 181 + const enableSquareButtons = useEnableSquareButtons() 180 182 return ( 181 183 <View 182 184 style={[ 183 185 a.absolute, 184 - a.rounded_full, 186 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 185 187 a.justify_center, 186 188 { 187 189 backgroundColor: 'rgba(0, 0, 0, 0.5)',
+3 -1
src/components/Post/Embed/VideoEmbed/VideoEmbedInner/web-controls/ControlButton.tsx
··· 1 1 import {type SvgProps} from 'react-native-svg' 2 2 3 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 3 4 import {PressableWithHover} from '#/view/com/util/PressableWithHover' 4 5 import {atoms as a, useTheme, web} from '#/alf' 5 6 ··· 19 20 onPress: () => void 20 21 }) { 21 22 const t = useTheme() 23 + const enableSquareButtons = useEnableSquareButtons() 22 24 return ( 23 25 <PressableWithHover 24 26 accessibilityRole="button" ··· 27 29 onPress={onPress} 28 30 style={[ 29 31 a.p_xs, 30 - a.rounded_full, 32 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 31 33 web({transition: 'background-color 0.1s'}), 32 34 ]} 33 35 hoverStyle={{backgroundColor: 'rgba(255, 255, 255, 0.2)'}}>
+4 -2
src/components/Post/Embed/VideoEmbed/VideoEmbedInner/web-controls/Scrubber.tsx
··· 5 5 6 6 import {isFirefox, isTouchDevice} from '#/lib/browser' 7 7 import {clamp} from '#/lib/numbers' 8 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 8 9 import {atoms as a, useTheme, web} from '#/alf' 9 10 import {useInteractionState} from '#/components/hooks/useInteractionState' 10 11 import {formatTime} from './utils' ··· 33 34 const {_} = useLingui() 34 35 const t = useTheme() 35 36 const [scrubberActive, setScrubberActive] = useState(false) 37 + const enableSquareButtons = useEnableSquareButtons() 36 38 const { 37 39 state: hovered, 38 40 onIn: onStartHover, ··· 174 176 <View 175 177 style={[ 176 178 a.w_full, 177 - a.rounded_full, 179 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 178 180 a.overflow_hidden, 179 181 {backgroundColor: 'rgba(255, 255, 255, 0.4)'}, 180 182 {height: hovered || scrubberActive ? 6 : 3}, ··· 217 219 style={[ 218 220 a.w_full, 219 221 a.h_full, 220 - a.rounded_full, 222 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 221 223 {backgroundColor: t.palette.white}, 222 224 { 223 225 transform: [
+4 -1
src/components/Post/Embed/VideoEmbed/index.tsx
··· 5 5 import {msg, Trans} from '@lingui/macro' 6 6 import {useLingui} from '@lingui/react' 7 7 8 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 8 9 import {ErrorBoundary} from '#/view/com/util/ErrorBoundary' 9 10 import {ConstrainedImage} from '#/view/com/util/images/AutoSizedImage' 10 11 import {atoms as a} from '#/alf' ··· 66 67 const {_} = useLingui() 67 68 const ref = useRef<{togglePlayback: () => void}>(null) 68 69 70 + const enableSquareButtons = useEnableSquareButtons() 71 + 69 72 const [status, setStatus] = useState<'playing' | 'paused' | 'pending'>( 70 73 'pending', 71 74 ) ··· 116 119 {showSpinner ? ( 117 120 <View 118 121 style={[ 119 - a.rounded_full, 122 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 120 123 a.p_xs, 121 124 a.align_center, 122 125 a.justify_center,
+4 -1
src/components/PostControls/PostControlButton.tsx
··· 2 2 import {type GestureResponderEvent, type Insets, type View} from 'react-native' 3 3 4 4 import {useHaptics} from '#/lib/haptics' 5 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 5 6 import {atoms as a, useTheme} from '#/alf' 6 7 import {Button, type ButtonProps} from '#/components/Button' 7 8 import {type Props as SVGIconProps} from '#/components/icons/common' ··· 36 37 }) { 37 38 const t = useTheme() 38 39 const playHaptic = useHaptics() 40 + 41 + const enableSquareButtons = useEnableSquareButtons() 39 42 40 43 const ctx = useMemo( 41 44 () => ({ ··· 82 85 onLongPress={handleLongPress} 83 86 style={style} 84 87 hoverStyle={t.atoms.bg_contrast_25} 85 - shape="round" 88 + shape={enableSquareButtons ? 'square' : 'round'} 86 89 variant="ghost" 87 90 color="secondary" 88 91 {...props}
+3 -1
src/components/PostControls/ShareMenu/RecentChats.tsx
··· 10 10 import {sanitizeHandle} from '#/lib/strings/handles' 11 11 import {logger} from '#/logger' 12 12 import {useProfileShadow} from '#/state/cache/profile-shadow' 13 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 13 14 import {useModerationOpts} from '#/state/preferences/moderation-opts' 14 15 import {useListConvosQuery} from '#/state/queries/messages/list-conversations' 15 16 import {useSession} from '#/state/session' ··· 154 155 155 156 function ConvoSkeleton() { 156 157 const t = useTheme() 158 + const enableSquareButtons = useEnableSquareButtons() 157 159 return ( 158 160 <View 159 161 style={[ ··· 167 169 style={[ 168 170 t.atoms.bg_contrast_50, 169 171 {width: WIDTH - 8, height: WIDTH - 8}, 170 - a.rounded_full, 172 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 171 173 ]} 172 174 /> 173 175 <View
+5 -2
src/components/ProfileHoverCard/index.web.tsx
··· 18 18 import {sanitizeDisplayName} from '#/lib/strings/display-names' 19 19 import {sanitizeHandle} from '#/lib/strings/handles' 20 20 import {useProfileShadow} from '#/state/cache/profile-shadow' 21 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 21 22 import {useModerationOpts} from '#/state/preferences/moderation-opts' 22 23 import {usePrefetchProfileQuery, useProfileQuery} from '#/state/queries/profile' 23 24 import {useSession} from '#/state/session' ··· 460 461 const isLabeler = profile.associated?.labeler 461 462 const verification = useSimpleVerificationState({profile}) 462 463 464 + const enableSquareButtons = useEnableSquareButtons() 465 + 463 466 return ( 464 467 <View> 465 468 <View style={[a.flex_row, a.justify_between, a.align_start]}> ··· 482 485 size="small" 483 486 color="secondary" 484 487 variant="solid" 485 - style={[a.rounded_full]}> 488 + style={enableSquareButtons ? [a.rounded_sm] : [a.rounded_full]}> 486 489 <ButtonText>{_(msg`View profile`)}</ButtonText> 487 490 </Link> 488 491 ) : ( ··· 495 498 ? _(msg`Following`) 496 499 : _(msg`Follow`) 497 500 } 498 - style={[a.rounded_full]} 501 + style={enableSquareButtons ? [a.rounded_sm] : [a.rounded_full]} 499 502 onPress={profileShadow.viewer?.following ? unfollow : follow}> 500 503 <ButtonIcon 501 504 position="left"
+5 -2
src/components/Select/index.tsx
··· 10 10 import {msg, Trans} from '@lingui/macro' 11 11 import {useLingui} from '@lingui/react' 12 12 13 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 13 14 import {useTheme} from '#/alf' 14 15 import {atoms as a} from '#/alf' 15 16 import {Button, ButtonIcon, ButtonText} from '#/components/Button' ··· 172 173 const {_} = useLingui() 173 174 const [headerHeight, setHeaderHeight] = useState(50) 174 175 176 + const enableSquareButtons = useEnableSquareButtons() 177 + 175 178 const render = useCallback( 176 179 ({item, index}: {item: T; index: number}) => { 177 180 return renderItem(item, index, context.value) ··· 187 190 size="small" 188 191 color="primary" 189 192 variant="ghost" 190 - style={[a.rounded_full]}> 193 + style={[enableSquareButtons ? a.rounded_sm : a.rounded_full]}> 191 194 <ButtonText style={[a.text_md]}> 192 195 <Trans>Done</Trans> 193 196 </ButtonText> 194 197 </Button> 195 198 ), 196 - [control, _], 199 + [control, _, enableSquareButtons], 197 200 ) 198 201 199 202 return (
+8 -2
src/components/TrendingTopics.tsx
··· 5 5 import {useLingui} from '@lingui/react' 6 6 7 7 import {PressableScale} from '#/lib/custom-animations/PressableScale' 8 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 8 9 // import {makeProfileLink} from '#/lib/routes/links' 9 10 // import {feedUriToHref} from '#/lib/strings/url-helpers' 10 11 // import {Hashtag_Stroke2_Corner0_Rounded as Hashtag} from '#/components/icons/Hashtag' ··· 28 29 const hasIcon = topic.type === 'starter-pack' && !isSmall 29 30 const iconSize = 20 30 31 32 + const enableSquareButtons = useEnableSquareButtons() 33 + 31 34 return ( 32 35 <View 33 36 style={[ 34 37 a.flex_row, 35 38 a.align_center, 36 - a.rounded_full, 39 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 37 40 a.border, 38 41 t.atoms.border_contrast_medium, 39 42 t.atoms.bg, ··· 110 113 }) { 111 114 const t = useTheme() 112 115 const isSmall = size === 'small' 116 + 117 + const enableSquareButtons = useEnableSquareButtons() 118 + 113 119 return ( 114 120 <View 115 121 style={[ 116 - a.rounded_full, 122 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 117 123 a.border, 118 124 t.atoms.border_contrast_medium, 119 125 t.atoms.bg_contrast_25,
+4 -1
src/components/activity-notifications/SubscribeProfileButton.tsx
··· 5 5 6 6 import {useRequireEmailVerification} from '#/lib/hooks/useRequireEmailVerification' 7 7 import {createSanitizedDisplayName} from '#/lib/moderation/create-sanitized-display-name' 8 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 8 9 import {Button, ButtonIcon} from '#/components/Button' 9 10 import {useDialogControl} from '#/components/Dialog' 10 11 import {BellPlus_Stroke2_Corner0_Rounded as BellPlusIcon} from '#/components/icons/BellPlus' ··· 66 67 67 68 const Icon = isSubscribed ? BellRingingIcon : BellPlusIcon 68 69 70 + const enableSquareButtons = useEnableSquareButtons() 71 + 69 72 return ( 70 73 <> 71 74 <Tooltip.Outer ··· 78 81 testID="dmBtn" 79 82 size="small" 80 83 color="secondary" 81 - shape="round" 84 + shape={enableSquareButtons ? 'square' : 'round'} 82 85 label={_(msg`Get notified when ${name} posts`)} 83 86 onPress={wrappedOnPress}> 84 87 <ButtonIcon icon={Icon} size="md" />
+3 -1
src/components/ageAssurance/AgeAssuranceAdmonition.tsx
··· 4 4 5 5 import {useAgeAssurance} from '#/state/ageAssurance/useAgeAssurance' 6 6 import {logger} from '#/state/ageAssurance/util' 7 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 7 8 import {atoms as a, select, useTheme, type ViewStyleProp} from '#/alf' 8 9 import {useDialogControl} from '#/components/ageAssurance/AgeAssuranceInitDialog' 9 10 import type * as Dialog from '#/components/Dialog' ··· 38 39 }) { 39 40 const t = useTheme() 40 41 const {_} = useLingui() 42 + const enableSquareButtons = useEnableSquareButtons() 41 43 42 44 return ( 43 45 <> ··· 67 69 style={[ 68 70 a.align_center, 69 71 a.justify_center, 70 - a.rounded_full, 72 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 71 73 { 72 74 width: 32, 73 75 height: 32,
+3 -1
src/components/ageAssurance/AgeAssuranceBadge.tsx
··· 1 1 import {View} from 'react-native' 2 2 import {Trans} from '@lingui/macro' 3 3 4 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 4 5 import {atoms as a, select, useTheme} from '#/alf' 5 6 import {ShieldCheck_Stroke2_Corner0_Rounded as Shield} from '#/components/icons/Shield' 6 7 import {Text} from '#/components/Typography' 7 8 8 9 export function AgeAssuranceBadge() { 9 10 const t = useTheme() 11 + const enableSquareButtons = useEnableSquareButtons() 10 12 11 13 return ( 12 14 <View ··· 17 19 a.px_sm, 18 20 a.py_xs, 19 21 a.pr_sm, 20 - a.rounded_full, 22 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 21 23 { 22 24 backgroundColor: select(t.name, { 23 25 light: t.palette.primary_100,
+4 -1
src/components/ageAssurance/AgeAssuranceDismissibleFeedBanner.tsx
··· 5 5 6 6 import {useAgeAssurance} from '#/state/ageAssurance/useAgeAssurance' 7 7 import {logger} from '#/state/ageAssurance/util' 8 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 8 9 import {Nux, useNux, useSaveNux} from '#/state/queries/nuxs' 9 10 import {atoms as a, select, useTheme} from '#/alf' 10 11 import {useAgeAssuranceCopy} from '#/components/ageAssurance/useAgeAssuranceCopy' ··· 55 56 const {visible, close} = useInternalState() 56 57 const copy = useAgeAssuranceCopy() 57 58 59 + const enableSquareButtons = useEnableSquareButtons() 60 + 58 61 if (!visible) return null 59 62 60 63 return ( ··· 82 85 style={[ 83 86 a.align_center, 84 87 a.justify_center, 85 - a.rounded_full, 88 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 86 89 { 87 90 width: 42, 88 91 height: 42,
+4 -1
src/components/ageAssurance/AgeAssuranceDismissibleNotice.tsx
··· 4 4 5 5 import {useAgeAssurance} from '#/state/ageAssurance/useAgeAssurance' 6 6 import {logger} from '#/state/ageAssurance/util' 7 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 7 8 import {Nux, useNux, useSaveNux} from '#/state/queries/nuxs' 8 9 import {atoms as a, type ViewStyleProp} from '#/alf' 9 10 import {AgeAssuranceAdmonition} from '#/components/ageAssurance/AgeAssuranceAdmonition' ··· 19 20 const copy = useAgeAssuranceCopy() 20 21 const {mutate: save, variables} = useSaveNux() 21 22 const hidden = !!variables 23 + 24 + const enableSquareButtons = useEnableSquareButtons() 22 25 23 26 if (!isReady) return null 24 27 if (isDeclaredUnderage) return null ··· 37 40 size="tiny" 38 41 variant="solid" 39 42 color="secondary_inverted" 40 - shape="round" 43 + shape={enableSquareButtons ? 'square' : 'round'} 41 44 onPress={() => { 42 45 save({ 43 46 id: Nux.AgeAssuranceDismissibleNotice,
+5 -2
src/components/dialogs/GifSelect.tsx
··· 14 14 import {logEvent} from '#/lib/statsig/statsig' 15 15 import {cleanError} from '#/lib/strings/errors' 16 16 import {isWeb} from '#/platform/detection' 17 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 17 18 import { 18 19 type Gif, 19 20 tenorUrlToBskyGifUrl, ··· 97 98 const trendingQuery = useFeaturedGifsQuery() 98 99 const searchQuery = useGifSearchQuery(search) 99 100 101 + const enableSquareButtons = useEnableSquareButtons() 102 + 100 103 const { 101 104 data, 102 105 fetchNextPage, ··· 154 157 size="small" 155 158 variant="ghost" 156 159 color="secondary" 157 - shape="round" 160 + shape={enableSquareButtons ? 'square' : 'round'} 158 161 onPress={() => control.close()} 159 162 label={_(msg`Close GIF dialog`)}> 160 163 <ButtonIcon icon={Arrow} size="md" /> ··· 183 186 </TextField.Root> 184 187 </View> 185 188 ) 186 - }, [gtMobile, t.atoms.bg, _, control]) 189 + }, [gtMobile, t.atoms.bg, _, control, enableSquareButtons]) 187 190 188 191 return ( 189 192 <>
+4 -1
src/components/dialogs/MutedWords.tsx
··· 6 6 7 7 import {logger} from '#/logger' 8 8 import {isNative} from '#/platform/detection' 9 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 9 10 import { 10 11 usePreferencesQuery, 11 12 useRemoveMutedWordMutation, ··· 426 427 const isExpired = expiryDate && expiryDate < new Date() 427 428 const formatDistance = useFormatDistance() 428 429 430 + const enableSquareButtons = useEnableSquareButtons() 431 + 429 432 const remove = React.useCallback(async () => { 430 433 control.close() 431 434 removeMutedWord(word) ··· 529 532 <Button 530 533 label={_(msg`Remove mute word from your list`)} 531 534 size="tiny" 532 - shape="round" 535 + shape={enableSquareButtons ? 'square' : 'round'} 533 536 variant="outline" 534 537 color="secondary" 535 538 onPress={() => control.open()}
+7 -2
src/components/dialogs/SearchablePeopleList.tsx
··· 14 14 import {sanitizeDisplayName} from '#/lib/strings/display-names' 15 15 import {sanitizeHandle} from '#/lib/strings/handles' 16 16 import {isWeb} from '#/platform/detection' 17 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 17 18 import {useModerationOpts} from '#/state/preferences/moderation-opts' 18 19 import {useActorAutocompleteQuery} from '#/state/queries/actor-autocomplete' 19 20 import {useListConvosQuery} from '#/state/queries/messages/list-conversations' ··· 85 86 const inputRef = useRef<TextInput>(null) 86 87 87 88 const [searchText, setSearchText] = useState('') 89 + 90 + const enableSquareButtons = useEnableSquareButtons() 88 91 89 92 const { 90 93 data: results, ··· 294 297 <Button 295 298 label={_(msg`Close`)} 296 299 size="small" 297 - shape="round" 300 + shape={enableSquareButtons ? 'square' : 'round'} 298 301 variant={isWeb ? 'ghost' : 'solid'} 299 302 color="secondary" 300 303 style={[ ··· 331 334 title, 332 335 searchText, 333 336 control, 337 + enableSquareButtons, 334 338 ]) 335 339 336 340 return ( ··· 423 427 424 428 function ProfileCardSkeleton() { 425 429 const t = useTheme() 430 + const enableSquareButtons = useEnableSquareButtons() 426 431 427 432 return ( 428 433 <View ··· 436 441 ]}> 437 442 <View 438 443 style={[ 439 - a.rounded_full, 444 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 440 445 {width: 42, height: 42}, 441 446 t.atoms.bg_contrast_25, 442 447 ]}
+4 -1
src/components/dialogs/StarterPackDialog.tsx
··· 13 13 import {type NavigationProp} from '#/lib/routes/types' 14 14 import {logger} from '#/logger' 15 15 import {isWeb} from '#/platform/detection' 16 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 16 17 import { 17 18 invalidateActorStarterPacksWithMembershipQuery, 18 19 useActorStarterPacksWithMembershipsQuery, ··· 132 133 const control = Dialog.useDialogContext() 133 134 const {_} = useLingui() 134 135 136 + const enableSquareButtons = useEnableSquareButtons() 137 + 135 138 const { 136 139 data, 137 140 isError, ··· 181 184 variant="ghost" 182 185 color="secondary" 183 186 size="small" 184 - shape="round"> 187 + shape={enableSquareButtons ? 'square' : 'round'}> 185 188 <ButtonIcon icon={XIcon} /> 186 189 </Button> 187 190 </View>
+7 -3
src/components/dialogs/lists/CreateOrEditListDialog.tsx
··· 11 11 import {logger} from '#/logger' 12 12 import {isWeb} from '#/platform/detection' 13 13 import {type ImageMeta} from '#/state/gallery' 14 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 14 15 import { 15 16 useListCreateMutation, 16 17 useListMetadataMutation, ··· 119 120 return 'app.bsky.graph.defs#curatelist' 120 121 }, [list, purpose]) 121 122 const isCurateList = activePurpose === 'app.bsky.graph.defs#curatelist' 123 + 124 + const enableSquareButtons = useEnableSquareButtons() 122 125 123 126 const {_} = useLingui() 124 127 const t = useTheme() ··· 276 279 size="small" 277 280 color="primary" 278 281 variant="ghost" 279 - style={[a.rounded_full]} 282 + style={[enableSquareButtons ? a.rounded_sm : a.rounded_full]} 280 283 testID="editProfileCancelBtn"> 281 284 <ButtonText style={[a.text_md]}> 282 285 <Trans>Cancel</Trans> 283 286 </ButtonText> 284 287 </Button> 285 288 ), 286 - [onPressCancel, _], 289 + [onPressCancel, _, enableSquareButtons], 287 290 ) 288 291 289 292 const saveButton = useCallback( ··· 301 304 size="small" 302 305 color="primary" 303 306 variant="ghost" 304 - style={[a.rounded_full]} 307 + style={[enableSquareButtons ? a.rounded_sm : a.rounded_full]} 305 308 testID="editProfileSaveBtn"> 306 309 <ButtonText style={[a.text_md, !dirty && t.atoms.text_contrast_low]}> 307 310 <Trans>Save</Trans> ··· 318 321 isUpdatingList, 319 322 displayNameTooLong, 320 323 descriptionTooLong, 324 + enableSquareButtons, 321 325 ], 322 326 ) 323 327
+4 -1
src/components/dialogs/nuxs/ActivitySubscriptions.tsx
··· 5 5 import {useLingui} from '@lingui/react' 6 6 7 7 import {isWeb} from '#/platform/detection' 8 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 8 9 import {atoms as a, useTheme, web} from '#/alf' 9 10 import {Button, ButtonText} from '#/components/Button' 10 11 import * as Dialog from '#/components/Dialog' ··· 17 18 const {_} = useLingui() 18 19 const nuxDialogs = useNuxDialogContext() 19 20 const control = Dialog.useDialogControl() 21 + 22 + const enableSquareButtons = useEnableSquareButtons() 20 23 21 24 Dialog.useAutoOpen(control) 22 25 ··· 55 58 a.pl_sm, 56 59 a.pr_md, 57 60 a.py_sm, 58 - a.rounded_full, 61 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 59 62 a.flex_row, 60 63 a.align_center, 61 64 a.gap_xs,
+4 -1
src/components/dialogs/nuxs/InitialVerificationAnnouncement.tsx
··· 7 7 import {urls} from '#/lib/constants' 8 8 import {logger} from '#/logger' 9 9 import {isNative} from '#/platform/detection' 10 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 10 11 import {atoms as a, useBreakpoints, useTheme} from '#/alf' 11 12 import {Button, ButtonText} from '#/components/Button' 12 13 import * as Dialog from '#/components/Dialog' ··· 22 23 const {gtMobile} = useBreakpoints() 23 24 const nuxDialogs = useNuxDialogContext() 24 25 const control = Dialog.useDialogControl() 26 + 27 + const enableSquareButtons = useEnableSquareButtons() 25 28 26 29 Dialog.useAutoOpen(control) 27 30 ··· 44 47 a.pl_sm, 45 48 a.pr_md, 46 49 a.py_sm, 47 - a.rounded_full, 50 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 48 51 a.flex_row, 49 52 a.align_center, 50 53 a.gap_xs,
+5 -2
src/components/dms/ActionsWrapper.web.tsx
··· 5 5 import {useLingui} from '@lingui/react' 6 6 7 7 import {useConvoActive} from '#/state/messages/convo' 8 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 8 9 import {useSession} from '#/state/session' 9 10 import * as Toast from '#/view/com/util/Toast' 10 11 import {atoms as a, useTheme} from '#/alf' ··· 30 31 const {currentAccount} = useSession() 31 32 32 33 const [showActions, setShowActions] = useState(false) 34 + 35 + const enableSquareButtons = useEnableSquareButtons() 33 36 34 37 const onMouseEnter = useCallback(() => { 35 38 setShowActions(true) ··· 99 102 style={[ 100 103 {opacity: showMenuTrigger}, 101 104 a.p_xs, 102 - a.rounded_full, 105 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 103 106 (state.hovered || state.pressed) && t.atoms.bg_contrast_25, 104 107 ]}> 105 108 <EmojiSmileIcon ··· 121 124 style={[ 122 125 {opacity: showMenuTrigger}, 123 126 a.p_xs, 124 - a.rounded_full, 127 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 125 128 (state.hovered || state.pressed) && t.atoms.bg_contrast_25, 126 129 ]}> 127 130 <DotsHorizontalIcon
+4 -1
src/components/dms/ChatEmptyPill.tsx
··· 13 13 import {ShrinkAndPop} from '#/lib/custom-animations/ShrinkAndPop' 14 14 import {useHaptics} from '#/lib/haptics' 15 15 import {isWeb} from '#/platform/detection' 16 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 16 17 import {atoms as a, useTheme} from '#/alf' 17 18 import {Text} from '#/components/Typography' 18 19 ··· 27 28 const [promptIndex, setPromptIndex] = React.useState(lastIndex) 28 29 29 30 const scale = useSharedValue(1) 31 + 32 + const enableSquareButtons = useEnableSquareButtons() 30 33 31 34 const prompts = React.useMemo(() => { 32 35 return [ ··· 79 82 style={[ 80 83 a.px_xl, 81 84 a.py_md, 82 - a.rounded_full, 85 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 83 86 t.atoms.bg_contrast_25, 84 87 a.align_center, 85 88 animatedStyle,
+4 -1
src/components/dms/ConvoMenu.tsx
··· 7 7 8 8 import {type NavigationProp} from '#/lib/routes/types' 9 9 import {type Shadow} from '#/state/cache/types' 10 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 10 11 import { 11 12 useConvoQuery, 12 13 useMarkAsReadMutation, ··· 70 71 71 72 const {listBlocks} = blockInfo 72 73 74 + const enableSquareButtons = useEnableSquareButtons() 75 + 73 76 return ( 74 77 <> 75 78 <Menu.Root control={control}> ··· 86 89 }} 87 90 size="small" 88 91 color="secondary" 89 - shape="round" 92 + shape={enableSquareButtons ? 'square' : 'round'} 90 93 variant="ghost" 91 94 style={[a.bg_transparent]}> 92 95 <ButtonIcon icon={DotsHorizontal} size="md" />
+4 -1
src/components/dms/EmojiPopup.android.tsx
··· 4 4 import {msg, Trans} from '@lingui/macro' 5 5 import {useLingui} from '@lingui/react' 6 6 7 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 7 8 import {atoms as a, useTheme} from '#/alf' 8 9 import {Button, ButtonIcon} from '#/components/Button' 9 10 import {TimesLarge_Stroke2_Corner0_Rounded as CloseIcon} from '#/components/icons/Times' ··· 20 21 const [modalVisible, setModalVisible] = useState(false) 21 22 const {_} = useLingui() 22 23 const t = useTheme() 24 + 25 + const enableSquareButtons = useEnableSquareButtons() 23 26 24 27 return ( 25 28 <> ··· 60 63 size="small" 61 64 variant="ghost" 62 65 color="secondary" 63 - shape="round"> 66 + shape={enableSquareButtons ? 'square' : 'round'}> 64 67 <ButtonIcon icon={CloseIcon} /> 65 68 </Button> 66 69 </View>
+6 -3
src/components/dms/EmojiReactionPicker.tsx
··· 4 4 import {msg} from '@lingui/macro' 5 5 import {useLingui} from '@lingui/react' 6 6 7 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 7 8 import {useSession} from '#/state/session' 8 9 import {atoms as a, tokens, useTheme} from '#/alf' 9 10 import * as ContextMenu from '#/components/ContextMenu' ··· 55 56 56 57 const bgColor = t.scheme === 'light' ? t.atoms.bg : t.atoms.bg_contrast_25 57 58 59 + const enableSquareButtons = useEnableSquareButtons() 60 + 58 61 return ( 59 62 <View 60 63 onLayout={evt => setLayout(evt.nativeEvent.layout)} 61 64 style={[ 62 65 bgColor, 63 - a.rounded_full, 66 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 64 67 a.absolute, 65 68 {bottom: '100%'}, 66 69 isFromSelf ? a.right_0 : a.left_0, ··· 90 93 {hovered => ( 91 94 <View 92 95 style={[ 93 - a.rounded_full, 96 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 94 97 hovered 95 98 ? { 96 99 backgroundColor: alreadyReacted ··· 119 122 }}> 120 123 <View 121 124 style={[ 122 - a.rounded_full, 125 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 123 126 t.scheme === 'light' 124 127 ? t.atoms.bg_contrast_25 125 128 : t.atoms.bg_contrast_50,
+6 -3
src/components/dms/EmojiReactionPicker.web.tsx
··· 6 6 import {useLingui} from '@lingui/react' 7 7 import {DropdownMenu} from 'radix-ui' 8 8 9 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 9 10 import {useSession} from '#/state/session' 10 11 import {type Emoji} from '#/view/com/composer/text-input/web/EmojiPicker' 11 12 import {useWebPreloadEmoji} from '#/view/com/composer/text-input/web/useWebPreloadEmoji' ··· 55 56 56 57 const [prevOpen, setPrevOpen] = useState(control.isOpen) 57 58 59 + const enableSquareButtons = useEnableSquareButtons() 60 + 58 61 if (control.isOpen !== prevOpen) { 59 62 setPrevOpen(control.isOpen) 60 63 if (!control.isOpen) { ··· 87 90 </DropdownMenu.Content> 88 91 </DropdownMenu.Portal> 89 92 ) : ( 90 - <Menu.Outer style={[a.rounded_full]}> 93 + <Menu.Outer style={[enableSquareButtons ? a.rounded_sm : a.rounded_full]}> 91 94 <View style={[a.flex_row, a.gap_xs]}> 92 95 {['👍', '😆', '❤️', '👀', '😢'].map(emoji => { 93 96 const alreadyReacted = hasAlreadyReacted( ··· 109 112 style={flatten([ 110 113 a.flex, 111 114 a.flex_col, 112 - a.rounded_full, 115 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 113 116 a.justify_center, 114 117 a.align_center, 115 118 a.transition_transform, ··· 135 138 role="button" 136 139 onPress={() => setExpanded(true)} 137 140 style={flatten([ 138 - a.rounded_full, 141 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 139 142 {height: 34, width: 34}, 140 143 a.justify_center, 141 144 a.align_center,
+5 -2
src/components/dms/MessageProfileButton.tsx
··· 8 8 import {useRequireEmailVerification} from '#/lib/hooks/useRequireEmailVerification' 9 9 import {type NavigationProp} from '#/lib/routes/types' 10 10 import {logEvent} from '#/lib/statsig/statsig' 11 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 11 12 import {useGetConvoAvailabilityQuery} from '#/state/queries/messages/get-convo-availability' 12 13 import {useGetConvoForMembers} from '#/state/queries/messages/get-convo-for-members' 13 14 import * as Toast from '#/view/com/util/Toast' ··· 25 26 const t = useTheme() 26 27 const navigation = useNavigation<NavigationProp>() 27 28 const requireEmailVerification = useRequireEmailVerification() 29 + 30 + const enableSquareButtons = useEnableSquareButtons() 28 31 29 32 const {data: convoAvailability} = useGetConvoAvailabilityQuery(profile.did) 30 33 const {mutate: initiateConvo} = useGetConvoForMembers({ ··· 72 75 a.justify_center, 73 76 a.align_center, 74 77 t.atoms.bg_contrast_25, 75 - a.rounded_full, 78 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 76 79 // Matches size of button below to avoid layout shift 77 80 {width: 33, height: 33}, 78 81 ]}> ··· 93 96 size="small" 94 97 color="secondary" 95 98 variant="solid" 96 - shape="round" 99 + shape={enableSquareButtons ? 'square' : 'round'} 97 100 label={_(msg`Message ${profile.handle}`)} 98 101 style={[a.justify_center]} 99 102 onPress={wrappedOnPress}>
+4 -1
src/components/dms/NewMessagesPill.tsx
··· 15 15 } from '#/lib/custom-animations/ScaleAndFade' 16 16 import {useHaptics} from '#/lib/haptics' 17 17 import {isAndroid, isIOS, isWeb} from '#/platform/detection' 18 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 18 19 import {atoms as a, useTheme} from '#/alf' 19 20 import {Text} from '#/components/Typography' 20 21 ··· 32 33 const bottomOffset = isWeb ? 0 : bottomInset + bottomBarHeight 33 34 34 35 const scale = useSharedValue(1) 36 + 37 + const enableSquareButtons = useEnableSquareButtons() 35 38 36 39 const onPressIn = React.useCallback(() => { 37 40 if (isWeb) return ··· 68 71 <AnimatedPressable 69 72 style={[ 70 73 a.py_sm, 71 - a.rounded_full, 74 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 72 75 a.shadow_sm, 73 76 a.border, 74 77 t.atoms.bg_contrast_50,
+4 -1
src/components/forms/SearchInput.tsx
··· 5 5 6 6 import {HITSLOP_10} from '#/lib/constants' 7 7 import {isNative} from '#/platform/detection' 8 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 8 9 import {atoms as a, useTheme} from '#/alf' 9 10 import {Button, ButtonIcon} from '#/components/Button' 10 11 import * as TextField from '#/components/forms/TextField' ··· 24 25 const t = useTheme() 25 26 const {_} = useLingui() 26 27 const showClear = value && value.length > 0 28 + 29 + const enableSquareButtons = useEnableSquareButtons() 27 30 28 31 return ( 29 32 <View style={[a.w_full, a.relative]}> ··· 70 73 label={_(msg`Clear search query`)} 71 74 hitSlop={HITSLOP_10} 72 75 size="tiny" 73 - shape="round" 76 + shape={enableSquareButtons ? 'square' : 'round'} 74 77 variant="ghost" 75 78 color="secondary"> 76 79 <ButtonIcon icon={X} size="xs" />
+7 -4
src/components/forms/Toggle/index.tsx
··· 11 11 import {HITSLOP_10} from '#/lib/constants' 12 12 import {useHaptics} from '#/lib/haptics' 13 13 import {isNative} from '#/platform/detection' 14 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 14 15 import { 15 16 atoms as a, 16 17 native, ··· 395 396 export function Switch() { 396 397 const t = useTheme() 397 398 const {selected, hovered, disabled, isInvalid} = useItemContext() 399 + const enableSquareButtons = useEnableSquareButtons() 398 400 const {baseStyles, baseHoverStyles, indicatorStyles} = useMemo(() => { 399 401 const base: ViewStyle[] = [] 400 402 const baseHover: ViewStyle[] = [] ··· 469 471 <View 470 472 style={[ 471 473 a.relative, 472 - a.rounded_full, 474 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 473 475 t.atoms.bg, 474 476 { 475 477 height: 28, ··· 488 490 }), 489 491 ).easing(Easing.inOut(Easing.cubic))} 490 492 style={[ 491 - a.rounded_full, 493 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 492 494 { 493 495 backgroundColor: t.palette.white, 494 496 height: 22, ··· 504 506 505 507 export function Radio() { 506 508 const t = useTheme() 509 + const enableSquareButtons = useEnableSquareButtons() 507 510 const {selected, hovered, focused, disabled, isInvalid} = 508 511 useContext(ItemContext) 509 512 const {baseStyles, baseHoverStyles, indicatorStyles} = ··· 520 523 style={[ 521 524 a.justify_center, 522 525 a.align_center, 523 - a.rounded_full, 526 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 524 527 t.atoms.border_contrast_high, 525 528 a.transition_color, 526 529 { ··· 536 539 <View 537 540 style={[ 538 541 a.absolute, 539 - a.rounded_full, 542 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 540 543 {height: 12, width: 12}, 541 544 {backgroundColor: t.palette.white}, 542 545 indicatorStyles,
+4 -1
src/components/interstitials/Trending.tsx
··· 4 4 import {useLingui} from '@lingui/react' 5 5 6 6 import {logEvent} from '#/lib/statsig/statsig' 7 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 7 8 import { 8 9 useTrendingSettings, 9 10 useTrendingSettingsApi, ··· 34 35 const {setTrendingDisabled} = useTrendingSettingsApi() 35 36 const {data: trending, error, isLoading} = useTrendingTopics() 36 37 const noTopics = !isLoading && !error && !trending?.topics?.length 38 + 39 + const enableSquareButtons = useEnableSquareButtons() 37 40 38 41 const onConfirmHide = React.useCallback(() => { 39 42 logEvent('trendingTopics:hide', {context: 'interstitial'}) ··· 114 117 size="tiny" 115 118 variant="ghost" 116 119 color="secondary" 117 - shape="round" 120 + shape={enableSquareButtons ? 'square' : 'round'} 118 121 onPress={() => trendingPrompt.open()}> 119 122 <ButtonIcon icon={X} /> 120 123 </Button>
+4 -1
src/components/interstitials/TrendingVideos.tsx
··· 8 8 import {VIDEO_FEED_URI} from '#/lib/constants' 9 9 import {makeCustomFeedLink} from '#/lib/routes/links' 10 10 import {logEvent} from '#/lib/statsig/statsig' 11 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 11 12 import {useTrendingSettingsApi} from '#/state/preferences/trending' 12 13 import {usePostFeedQuery} from '#/state/queries/post-feed' 13 14 import {RQKEY} from '#/state/queries/post-feed' ··· 191 192 return makeCustomFeedLink(urip.host, urip.rkey, undefined, 'discover') 192 193 }, []) 193 194 195 + const enableSquareButtons = useEnableSquareButtons() 196 + 194 197 return ( 195 198 <View style={[{width: CARD_WIDTH * 2}]}> 196 199 <Link ··· 222 225 <Button 223 226 color="primary" 224 227 size="small" 225 - shape="round" 228 + shape={enableSquareButtons ? 'square' : 'round'} 226 229 label={_(msg`View more trending videos`)}> 227 230 <ButtonIcon icon={ChevronRight} /> 228 231 </Button>
+8 -4
src/components/moderation/ReportDialog/index.tsx
··· 10 10 import {sanitizeHandle} from '#/lib/strings/handles' 11 11 import {Logger} from '#/logger' 12 12 import {isNative} from '#/platform/detection' 13 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 13 14 import {useMyLabelersQuery} from '#/state/queries/preferences' 14 15 import {CharProgress} from '#/view/com/composer/char-progress/CharProgress' 15 16 import {UserAvatar} from '#/view/com/util/UserAvatar' ··· 105 106 const copy = useCopyForSubject(props.subject) 106 107 const {categories, getCategory} = useReportOptions() 107 108 const [state, dispatch] = React.useReducer(reducer, initialState) 109 + 110 + const enableSquareButtons = useEnableSquareButtons() 108 111 109 112 /** 110 113 * Submission handling ··· 290 293 size="tiny" 291 294 variant="solid" 292 295 color="secondary" 293 - shape="round" 296 + shape={enableSquareButtons ? 'square' : 'round'} 294 297 onPress={() => { 295 298 dispatch({type: 'clearCategory'}) 296 299 }}> ··· 370 373 size="tiny" 371 374 variant="solid" 372 375 color="secondary" 373 - shape="round" 376 + shape={enableSquareButtons ? 'square' : 'round'} 374 377 onPress={() => { 375 378 dispatch({type: 'clearOption'}) 376 379 }}> ··· 425 428 size="tiny" 426 429 variant="solid" 427 430 color="secondary" 428 - shape="round" 431 + shape={enableSquareButtons ? 'square' : 'round'} 429 432 onPress={() => { 430 433 dispatch({type: 'clearLabeler'}) 431 434 }}> ··· 605 608 const t = useTheme() 606 609 const active = activeIndex1 === index 607 610 const completed = activeIndex1 > index 611 + const enableSquareButtons = useEnableSquareButtons() 608 612 return ( 609 613 <View style={[a.flex_row, a.gap_sm, a.pr_3xl]}> 610 614 <View 611 615 style={[ 612 616 a.justify_center, 613 617 a.align_center, 614 - a.rounded_full, 618 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 615 619 a.border, 616 620 { 617 621 width: 24,
+5 -2
src/components/moderation/ScreenHider.tsx
··· 13 13 import {useWebMediaQueries} from '#/lib/hooks/useWebMediaQueries' 14 14 import {useModerationCauseDescription} from '#/lib/moderation/useModerationCauseDescription' 15 15 import {type NavigationProp} from '#/lib/routes/types' 16 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 16 17 import {CenteredView} from '#/view/com/util/Views' 17 18 import {atoms as a, useTheme, web} from '#/alf' 18 19 import {Button, ButtonText} from '#/components/Button' ··· 44 45 const control = useModerationDetailsDialogControl() 45 46 const blur = modui.blurs[0] 46 47 const desc = useModerationCauseDescription(blur) 48 + 49 + const enableSquareButtons = useEnableSquareButtons() 47 50 48 51 if (!blur || override) { 49 52 return ( ··· 156 159 variant="solid" 157 160 color="primary" 158 161 size="large" 159 - style={[a.rounded_full]} 162 + style={[enableSquareButtons ? a.rounded_sm : a.rounded_full]} 160 163 label={_(msg`Go back`)} 161 164 onPress={() => { 162 165 if (navigation.canGoBack()) { ··· 174 177 variant="solid" 175 178 color="secondary" 176 179 size="large" 177 - style={[a.rounded_full]} 180 + style={[enableSquareButtons ? a.rounded_sm : a.rounded_full]} 178 181 label={_(msg`Show anyway`)} 179 182 onPress={() => setOverride(v => !v)}> 180 183 <ButtonText>
+4 -1
src/components/verification/VerificationsDialog.tsx
··· 6 6 import {urls} from '#/lib/constants' 7 7 import {getUserDisplayName} from '#/lib/getUserDisplayName' 8 8 import {logger} from '#/logger' 9 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 9 10 import {useModerationOpts} from '#/state/preferences/moderation-opts' 10 11 import {useProfileQuery} from '#/state/queries/profile' 11 12 import {useSession} from '#/state/session' ··· 194 195 const verificationRemovePromptControl = useDialogControl() 195 196 const canAdminister = verification.issuer === currentAccount?.did 196 197 198 + const enableSquareButtons = useEnableSquareButtons() 199 + 197 200 return ( 198 201 <View 199 202 style={{ ··· 253 256 size="small" 254 257 variant="outline" 255 258 color="negative" 256 - shape="round" 259 + shape={enableSquareButtons ? 'square' : 'round'} 257 260 onPress={() => { 258 261 verificationRemovePromptControl.open() 259 262 }}>
+4 -1
src/components/video/PlayButtonIcon.tsx
··· 1 1 import {View} from 'react-native' 2 2 3 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 3 4 import {atoms as a, useTheme} from '#/alf' 4 5 import {Play_Filled_Corner0_Rounded as PlayIcon} from '#/components/icons/Play' 5 6 ··· 8 9 const bg = t.name === 'light' ? t.palette.contrast_25 : t.palette.contrast_975 9 10 const fg = t.name === 'light' ? t.palette.contrast_975 : t.palette.contrast_25 10 11 12 + const enableSquareButtons = useEnableSquareButtons() 13 + 11 14 return ( 12 15 <> 13 16 <View 14 17 style={[ 15 - a.rounded_full, 18 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 16 19 { 17 20 backgroundColor: bg, 18 21 shadowColor: 'black',
+4 -1
src/screens/Hashtag.tsx
··· 13 13 import {cleanError} from '#/lib/strings/errors' 14 14 import {sanitizeHandle} from '#/lib/strings/handles' 15 15 import {enforceLen} from '#/lib/strings/helpers' 16 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 16 17 import {useSearchPostsQuery} from '#/state/queries/search-posts' 17 18 import {useSession} from '#/state/session' 18 19 import {useSetMinimalShellMode} from '#/state/shell' ··· 69 70 70 71 const [activeTab, setActiveTab] = React.useState(0) 71 72 const setMinimalShellMode = useSetMinimalShellMode() 73 + 74 + const enableSquareButtons = useEnableSquareButtons() 72 75 73 76 useFocusEffect( 74 77 React.useCallback(() => { ··· 133 136 size="small" 134 137 variant="ghost" 135 138 color="primary" 136 - shape="round" 139 + shape={enableSquareButtons ? 'square' : 'round'} 137 140 onPress={onShare} 138 141 hitSlop={HITSLOP_10} 139 142 style={[{right: -3}]}>
+4 -1
src/screens/Messages/ChatList.tsx
··· 17 17 import {listenSoftReset} from '#/state/events' 18 18 import {MESSAGE_SCREEN_POLL_INTERVAL} from '#/state/messages/convo/const' 19 19 import {useMessagesEventBus} from '#/state/messages/events' 20 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 20 21 import {useLeftConvos} from '#/state/queries/messages/leave-conversation' 21 22 import {useListConvosQuery} from '#/state/queries/messages/list-conversations' 22 23 import {useSession} from '#/state/session' ··· 363 364 const {gtMobile} = useBreakpoints() 364 365 const requireEmailVerification = useRequireEmailVerification() 365 366 367 + const enableSquareButtons = useEnableSquareButtons() 368 + 366 369 const openChatControl = useCallback(() => { 367 370 newChatControl.open() 368 371 }, [newChatControl]) ··· 381 384 size="small" 382 385 variant="ghost" 383 386 color="secondary" 384 - shape="round" 387 + shape={enableSquareButtons ? 'square' : 'round'} 385 388 style={[a.justify_center]}> 386 389 <ButtonIcon icon={SettingsIcon} size="lg" /> 387 390 </Link>
+5 -1
src/screens/Messages/components/ChatListItem.tsx
··· 22 22 } from '#/lib/strings/url-helpers' 23 23 import {isNative} from '#/platform/detection' 24 24 import {useProfileShadow} from '#/state/cache/profile-shadow' 25 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 25 26 import {useModerationOpts} from '#/state/preferences/moderation-opts' 26 27 import { 27 28 precacheConvoQuery, ··· 104 105 const {gtMobile} = useBreakpoints() 105 106 const profile = useProfileShadow(profileUnshadowed) 106 107 const {mutate: markAsRead} = useMarkAsReadMutation() 108 + 109 + const enableSquareButtons = useEnableSquareButtons() 110 + 107 111 const moderation = React.useMemo( 108 112 () => moderateProfile(profile, moderationOpts), 109 113 [profile, moderationOpts], ··· 494 498 <View 495 499 style={[ 496 500 a.absolute, 497 - a.rounded_full, 501 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 498 502 { 499 503 backgroundColor: isDimStyle 500 504 ? t.palette.contrast_200
+3 -1
src/screens/Messages/components/InboxPreview.tsx
··· 3 3 import {msg, Trans} from '@lingui/macro' 4 4 import {useLingui} from '@lingui/react' 5 5 6 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 6 7 import {atoms as a, useTheme} from '#/alf' 7 8 import {AvatarStack} from '#/components/AvatarStack' 8 9 import {ButtonIcon, ButtonText} from '#/components/Button' ··· 17 18 }) { 18 19 const {_} = useLingui() 19 20 const t = useTheme() 21 + const enableSquareButtons = useEnableSquareButtons() 20 22 return ( 21 23 <Link 22 24 label={_(msg`Chat request inbox`)} ··· 43 45 <View 44 46 style={[ 45 47 a.absolute, 46 - a.rounded_full, 48 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 47 49 a.z_20, 48 50 { 49 51 top: -4,
+4 -1
src/screens/Messages/components/MessageInput.tsx
··· 24 24 useMessageDraft, 25 25 useSaveMessageDraft, 26 26 } from '#/state/messages/message-drafts' 27 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 27 28 import {type EmojiPickerPosition} from '#/view/com/composer/text-input/web/EmojiPicker' 28 29 import * as Toast from '#/view/com/util/Toast' 29 30 import {android, atoms as a, useTheme} from '#/alf' ··· 64 65 const [shouldEnforceClear, setShouldEnforceClear] = useState(false) 65 66 66 67 const {needsEmailVerification} = useEmail() 68 + 69 + const enableSquareButtons = useEnableSquareButtons() 67 70 68 71 useSaveMessageDraft(message) 69 72 useExtractEmbedFromFacets(message, setEmbed) ··· 193 196 accessibilityHint="" 194 197 hitSlop={HITSLOP_10} 195 198 style={[ 196 - a.rounded_full, 199 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 197 200 a.align_center, 198 201 a.justify_center, 199 202 {height: 30, width: 30, backgroundColor: t.palette.primary_500},
+5 -2
src/screens/Messages/components/MessageInput.web.tsx
··· 13 13 useMessageDraft, 14 14 useSaveMessageDraft, 15 15 } from '#/state/messages/message-drafts' 16 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 16 17 import {textInputWebEmitter} from '#/view/com/composer/text-input/textInputWebEmitter' 17 18 import { 18 19 type Emoji, ··· 51 52 const [isHovered, setIsHovered] = React.useState(false) 52 53 const [textAreaHeight, setTextAreaHeight] = React.useState(38) 53 54 const textAreaRef = React.useRef<HTMLTextAreaElement>(null) 55 + 56 + const enableSquareButtons = useEnableSquareButtons() 54 57 55 58 const onSubmit = React.useCallback(() => { 56 59 if (!hasEmbed && message.trim() === '') { ··· 168 171 }) 169 172 }} 170 173 style={[ 171 - a.rounded_full, 174 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 172 175 a.overflow_hidden, 173 176 a.align_center, 174 177 a.justify_center, ··· 235 238 accessibilityLabel={_(msg`Send message`)} 236 239 accessibilityHint="" 237 240 style={[ 238 - a.rounded_full, 241 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 239 242 a.align_center, 240 243 a.justify_center, 241 244 {
+4 -1
src/screens/Messages/components/MessageInputEmbed.tsx
··· 21 21 isBskyPostUrl, 22 22 makeRecordUri, 23 23 } from '#/lib/strings/url-helpers' 24 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 24 25 import {useModerationOpts} from '#/state/preferences/moderation-opts' 25 26 import {usePostQuery} from '#/state/queries/post' 26 27 import {PostMeta} from '#/view/com/util/PostMeta' ··· 104 105 }) { 105 106 const t = useTheme() 106 107 const {_} = useLingui() 108 + 109 + const enableSquareButtons = useEnableSquareButtons() 107 110 108 111 const {data: post, status} = usePostQuery(embedUri) 109 112 ··· 217 220 size="tiny" 218 221 variant="solid" 219 222 color="secondary" 220 - shape="round"> 223 + shape={enableSquareButtons ? 'square' : 'round'}> 221 224 <ButtonIcon icon={X} /> 222 225 </Button> 223 226 </View>
+5 -1
src/screens/PostThread/components/HeaderDropdown.tsx
··· 3 3 4 4 import {HITSLOP_10} from '#/lib/constants' 5 5 import {logger} from '#/logger' 6 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 6 7 import {type ThreadPreferences} from '#/state/queries/preferences/useThreadPreferences' 7 8 import {Button, ButtonIcon} from '#/components/Button' 8 9 import {SettingsSliderVertical_Stroke2_Corner0_Rounded as SettingsSlider} from '#/components/icons/SettingsSlider' ··· 18 19 'sort' | 'setSort' | 'view' | 'setView' 19 20 >): React.ReactNode { 20 21 const {_} = useLingui() 22 + 23 + const enableSquareButtons = useEnableSquareButtons() 24 + 21 25 return ( 22 26 <Menu.Root> 23 27 <Menu.Trigger label={_(msg`Thread options`)}> ··· 27 31 size="small" 28 32 variant="ghost" 29 33 color="secondary" 30 - shape="round" 34 + shape={enableSquareButtons ? 'square' : 'round'} 31 35 hitSlop={HITSLOP_10} 32 36 onPress={() => { 33 37 logger.metric('thread:click:headerMenuOpen', {})
+3 -1
src/screens/PostThread/components/ThreadComposePrompt.tsx
··· 6 6 import {PressableScale} from '#/lib/custom-animations/PressableScale' 7 7 import {useHaptics} from '#/lib/haptics' 8 8 import {useHideBottomBarBorderForScreen} from '#/lib/hooks/useHideBottomBarBorder' 9 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 9 10 import {useProfileQuery} from '#/state/queries/profile' 10 11 import {useSession} from '#/state/session' 11 12 import {UserAvatar} from '#/view/com/util/UserAvatar' ··· 27 28 const {gtMobile} = useBreakpoints() 28 29 const t = useTheme() 29 30 const playHaptic = useHaptics() 31 + const enableSquareButtons = useEnableSquareButtons() 30 32 const { 31 33 state: hovered, 32 34 onIn: onHoverIn, ··· 76 78 a.align_center, 77 79 a.p_sm, 78 80 a.gap_sm, 79 - a.rounded_full, 81 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 80 82 (!gtMobile || hovered) && t.atoms.bg_contrast_25, 81 83 native([a.border, t.atoms.border_contrast_low]), 82 84 a.transition_color,
+3 -1
src/screens/PostThread/components/ThreadItemAnchor.tsx
··· 31 31 import {useDisableQuotesMetrics} from '#/state/preferences/disable-quotes-metrics' 32 32 import {useDisableRepostsMetrics} from '#/state/preferences/disable-reposts-metrics' 33 33 import {useDisableSavesMetrics} from '#/state/preferences/disable-saves-metrics' 34 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 34 35 import {type ThreadItem} from '#/state/queries/usePostThread/types' 35 36 import {useSession} from '#/state/session' 36 37 import {type OnPostSuccessData} from '#/state/shell/composer' ··· 621 622 const t = useTheme() 622 623 const {_, i18n} = useLingui() 623 624 const control = Prompt.usePromptControl() 625 + const enableSquareButtons = useEnableSquareButtons() 624 626 625 627 const indexedAt = new Date(post.indexedAt) 626 628 const createdAt = bsky.dangerousIsType<AppBskyFeedPost.Record>( ··· 655 657 style={[ 656 658 a.flex_row, 657 659 a.align_center, 658 - a.rounded_full, 660 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 659 661 t.atoms.bg_contrast_25, 660 662 (hovered || pressed) && t.atoms.bg_contrast_50, 661 663 {
+4 -1
src/screens/PostThread/components/ThreadItemAnchorFollowButton.tsx
··· 6 6 7 7 import {logger} from '#/logger' 8 8 import {useProfileShadow} from '#/state/cache/profile-shadow' 9 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 9 10 import { 10 11 useProfileFollowMutationQueue, 11 12 useProfileQuery, ··· 45 46 const isFollowing = !!profile.viewer?.following 46 47 const isFollowedBy = !!profile.viewer?.followedBy 47 48 const [wasFollowing, setWasFollowing] = React.useState<boolean>(isFollowing) 49 + 50 + const enableSquareButtons = useEnableSquareButtons() 48 51 49 52 // This prevents the button from disappearing as soon as we follow. 50 53 const showFollowBtn = React.useMemo( ··· 115 118 size="small" 116 119 variant="solid" 117 120 color={isFollowing ? 'secondary' : 'secondary_inverted'} 118 - style={[a.rounded_full]}> 121 + style={enableSquareButtons ? [a.rounded_sm] : [a.rounded_full]}> 119 122 {gtMobile && ( 120 123 <ButtonIcon 121 124 icon={isFollowing ? Check : Plus}
+6 -3
src/screens/Profile/Header/EditProfileDialog.tsx
··· 10 10 import {logger} from '#/logger' 11 11 import {type ImageMeta} from '#/state/gallery' 12 12 import {useEnableSquareAvatars} from '#/state/preferences/enable-square-avatars' 13 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 13 14 import {useProfileUpdateMutation} from '#/state/queries/profile' 14 15 import {ErrorMessage} from '#/view/com/util/error/ErrorMessage' 15 16 import * as Toast from '#/view/com/util/Toast' ··· 101 102 const {_} = useLingui() 102 103 const t = useTheme() 103 104 const control = Dialog.useDialogContext() 105 + const enableSquareButtons = useEnableSquareButtons() 104 106 const verification = useSimpleVerificationState({ 105 107 profile, 106 108 }) ··· 223 225 size="small" 224 226 color="primary" 225 227 variant="ghost" 226 - style={[a.rounded_full]} 228 + style={[enableSquareButtons ? a.rounded_sm : a.rounded_full]} 227 229 testID="editProfileCancelBtn"> 228 230 <ButtonText style={[a.text_md]}> 229 231 <Trans>Cancel</Trans> 230 232 </ButtonText> 231 233 </Button> 232 234 ), 233 - [onPressCancel, _], 235 + [onPressCancel, _, enableSquareButtons], 234 236 ) 235 237 236 238 const saveButton = useCallback( ··· 247 249 size="small" 248 250 color="primary" 249 251 variant="ghost" 250 - style={[a.rounded_full]} 252 + style={[enableSquareButtons ? a.rounded_sm : a.rounded_full]} 251 253 testID="editProfileSaveBtn"> 252 254 <ButtonText style={[a.text_md, !dirty && t.atoms.text_contrast_low]}> 253 255 <Trans>Save</Trans> ··· 263 265 isUpdatingProfile, 264 266 displayNameTooLong, 265 267 descriptionTooLong, 268 + enableSquareButtons, 266 269 ], 267 270 ) 268 271
+5 -2
src/screens/Profile/Header/ProfileHeaderLabeler.tsx
··· 18 18 import {isIOS} from '#/platform/detection' 19 19 import {useProfileShadow} from '#/state/cache/profile-shadow' 20 20 import {type Shadow} from '#/state/cache/types' 21 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 21 22 import {useLabelerSubscriptionMutation} from '#/state/queries/labeler' 22 23 import {useLikeMutation, useUnlikeMutation} from '#/state/queries/like' 23 24 import {usePreferencesQuery} from '#/state/queries/preferences' ··· 67 68 const playHaptic = useHaptics() 68 69 const cantSubscribePrompt = Prompt.usePromptControl() 69 70 const isSelf = currentAccount?.did === profile.did 71 + 72 + const enableSquareButtons = useEnableSquareButtons() 70 73 71 74 const moderation = useMemo( 72 75 () => moderateProfile(profile, moderationOpts), ··· 179 182 variant="solid" 180 183 onPress={editProfileControl.open} 181 184 label={_(msg`Edit profile`)} 182 - style={a.rounded_full}> 185 + style={enableSquareButtons ? a.rounded_sm : a.rounded_full}> 183 186 <ButtonText> 184 187 <Trans>Edit Profile</Trans> 185 188 </ButtonText> ··· 266 269 size="small" 267 270 color="secondary" 268 271 variant="solid" 269 - shape="round" 272 + shape={enableSquareButtons ? 'square' : 'round'} 270 273 label={_(msg`Like this labeler`)} 271 274 disabled={!hasSession || isLikePending || isUnlikePending} 272 275 onPress={onToggleLiked}>
+12 -3
src/screens/Profile/Header/ProfileHeaderStandard.tsx
··· 16 16 import {logger} from '#/logger' 17 17 import {isIOS} from '#/platform/detection' 18 18 import {useProfileShadow} from '#/state/cache/profile-shadow' 19 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 19 20 import { 20 21 useProfileBlockMutationQueue, 21 22 useProfileFollowMutationQueue, ··· 84 85 const playHaptic = useHaptics() 85 86 86 87 const editProfileControl = useDialogControl() 88 + 89 + const enableSquareButtons = useEnableSquareButtons() 87 90 88 91 const onPressFollow = () => { 89 92 playHaptic() ··· 194 197 variant="solid" 195 198 onPress={editProfileControl.open} 196 199 label={_(msg`Edit profile`)} 197 - style={[a.rounded_full]}> 200 + style={ 201 + enableSquareButtons ? [a.rounded_sm] : [a.rounded_full] 202 + }> 198 203 <ButtonText> 199 204 <Trans>Edit Profile</Trans> 200 205 </ButtonText> ··· 214 219 label={_(msg`Unblock`)} 215 220 disabled={!hasSession} 216 221 onPress={() => unblockPromptControl.open()} 217 - style={[a.rounded_full]}> 222 + style={ 223 + enableSquareButtons ? [a.rounded_sm] : [a.rounded_full] 224 + }> 218 225 <ButtonText> 219 226 <Trans context="action">Unblock</Trans> 220 227 </ButtonText> ··· 245 252 onPress={ 246 253 profile.viewer?.following ? onPressUnfollow : onPressFollow 247 254 } 248 - style={[a.rounded_full]}> 255 + style={ 256 + enableSquareButtons ? [a.rounded_sm] : [a.rounded_full] 257 + }> 249 258 {!profile.viewer?.following && ( 250 259 <ButtonIcon position="left" icon={Plus} /> 251 260 )}
+3 -1
src/screens/Profile/Header/Shell.tsx
··· 23 23 import {type Shadow} from '#/state/cache/types' 24 24 import {useLightboxControls} from '#/state/lightbox' 25 25 import {useEnableSquareAvatars} from '#/state/preferences/enable-square-avatars' 26 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 26 27 import { 27 28 maybeModifyHighQualityImage, 28 29 useHighQualityImages, ··· 68 69 const liveStatusControl = useDialogControl() 69 70 const highQualityImages = useHighQualityImages() 70 71 const enableSquareAvatars = useEnableSquareAvatars() 72 + const enableSquareButtons = useEnableSquareButtons() 71 73 72 74 const aviRef = useAnimatedRef() 73 75 const bannerRef = useAnimatedRef() ··· 233 235 style={[ 234 236 a.align_center, 235 237 a.justify_center, 236 - a.rounded_full, 238 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 237 239 { 238 240 width: 31, 239 241 height: 31,
+6 -2
src/screens/Profile/components/ProfileFeedHeader.tsx
··· 12 12 import {toShareUrl} from '#/lib/strings/url-helpers' 13 13 import {logger} from '#/logger' 14 14 import {isWeb} from '#/platform/detection' 15 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 15 16 import {type FeedSourceFeedInfo} from '#/state/queries/feed' 16 17 import {useLikeMutation, useUnlikeMutation} from '#/state/queries/like' 17 18 import { ··· 55 56 56 57 export function ProfileFeedHeaderSkeleton() { 57 58 const t = useTheme() 59 + const enableSquareButtons = useEnableSquareButtons() 58 60 59 61 return ( 60 62 <Layout.Header.Outer> ··· 69 71 style={[ 70 72 a.justify_center, 71 73 a.align_center, 72 - a.rounded_full, 74 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 73 75 t.atoms.bg_contrast_25, 74 76 { 75 77 height: 34, ··· 400 402 const isLiked = !!likeUri 401 403 const feedRkey = React.useMemo(() => new AtUri(info.uri).rkey, [info.uri]) 402 404 405 + const enableSquareButtons = useEnableSquareButtons() 406 + 403 407 const onToggleLiked = async () => { 404 408 try { 405 409 playHaptic() ··· 472 476 size="small" 473 477 variant="ghost" 474 478 color="secondary" 475 - shape="round" 479 + shape={enableSquareButtons ? 'square' : 'round'} 476 480 onPress={onPressShare}> 477 481 <ButtonIcon icon={Share} size="lg" /> 478 482 </Button>
+6 -3
src/screens/ProfileList/components/Header.tsx
··· 7 7 import {useHaptics} from '#/lib/haptics' 8 8 import {makeListLink} from '#/lib/routes/links' 9 9 import {logger} from '#/logger' 10 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 10 11 import {useListBlockMutation, useListMuteMutation} from '#/state/queries/list' 11 12 import { 12 13 useAddSavedFeedsMutation, ··· 40 41 const isBlocking = !!list.viewer?.blocked 41 42 const isMuting = !!list.viewer?.muted 42 43 const playHaptic = useHaptics() 44 + 45 + const enableSquareButtons = useEnableSquareButtons() 43 46 44 47 const {mutateAsync: muteList, isPending: isMutePending} = 45 48 useListMuteMutation() ··· 157 160 onPress={onTogglePinned} 158 161 disabled={isPending} 159 162 size="small" 160 - style={[a.rounded_full]}> 163 + style={[enableSquareButtons ? a.rounded_sm : a.rounded_full]}> 161 164 {!isPinned && <ButtonIcon icon={isPending ? Loader : PinIcon} />} 162 165 <ButtonText> 163 166 {isPinned ? <Trans>Unpin</Trans> : <Trans>Pin to home</Trans>} ··· 171 174 label={_(msg`Unblock`)} 172 175 onPress={onUnsubscribeBlock} 173 176 size="small" 174 - style={[a.rounded_full]} 177 + style={[enableSquareButtons ? a.rounded_sm : a.rounded_full]} 175 178 disabled={isBlockPending}> 176 179 {isBlockPending && <ButtonIcon icon={Loader} />} 177 180 <ButtonText> ··· 185 188 label={_(msg`Unmute`)} 186 189 onPress={onUnsubscribeMute} 187 190 size="small" 188 - style={[a.rounded_full]} 191 + style={[enableSquareButtons ? a.rounded_sm : a.rounded_full]} 189 192 disabled={isMutePending}> 190 193 {isMutePending && <ButtonIcon icon={Loader} />} 191 194 <ButtonText>
+4 -1
src/screens/ProfileList/components/MoreOptionsMenu.tsx
··· 8 8 import {toShareUrl} from '#/lib/strings/url-helpers' 9 9 import {logger} from '#/logger' 10 10 import {isWeb} from '#/platform/detection' 11 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 11 12 import { 12 13 useListBlockMutation, 13 14 useListDeleteMutation, ··· 60 61 const isMuting = !!list.viewer?.muted 61 62 const isPinned = Boolean(savedFeedConfig?.pinned) 62 63 const isOwner = currentAccount?.did === list.creator.did 64 + 65 + const enableSquareButtons = useEnableSquareButtons() 63 66 64 67 const onPressShare = () => { 65 68 const {rkey} = new AtUri(list.uri) ··· 153 156 testID="moreOptionsBtn" 154 157 size="small" 155 158 color="secondary" 156 - shape="round" 159 + shape={enableSquareButtons ? 'square' : 'round'} 157 160 {...props}> 158 161 <ButtonIcon icon={DotGridIcon} /> 159 162 </Button>
+4 -1
src/screens/ProfileList/components/SubscribeMenu.tsx
··· 3 3 import {useLingui} from '@lingui/react' 4 4 5 5 import {logger} from '#/logger' 6 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 6 7 import {useListBlockMutation, useListMuteMutation} from '#/state/queries/list' 7 8 import {atoms as a} from '#/alf' 8 9 import {Button, ButtonIcon, ButtonText} from '#/components/Button' ··· 24 25 useListBlockMutation() 25 26 26 27 const isPending = isMutePending || isBlockPending 28 + 29 + const enableSquareButtons = useEnableSquareButtons() 27 30 28 31 const onSubscribeMute = async () => { 29 32 try { ··· 73 76 testID="subscribeBtn" 74 77 size="small" 75 78 color="primary_subtle" 76 - style={[a.rounded_full]} 79 + style={[enableSquareButtons ? a.rounded_sm : a.rounded_full]} 77 80 disabled={isPending} 78 81 {...props}> 79 82 {isPending && <ButtonIcon icon={Loader} />}
+3 -1
src/screens/Search/components/ModuleHeader.tsx
··· 5 5 import {PressableScale} from '#/lib/custom-animations/PressableScale' 6 6 import {makeCustomFeedLink} from '#/lib/routes/links' 7 7 import {logger} from '#/logger' 8 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 8 9 import {UserAvatar} from '#/view/com/util/UserAvatar' 9 10 import {atoms as a, native, useTheme, type ViewStyleProp} from '#/alf' 10 11 import {Button, ButtonIcon} from '#/components/Button' ··· 126 127 metricsTag: 'suggestedAccounts' | 'suggestedFeeds' 127 128 onPress?: () => void 128 129 }) { 130 + const enableSquareButtons = useEnableSquareButtons() 129 131 return ( 130 132 <Button 131 133 label={label} 132 134 size="small" 133 135 variant="ghost" 134 136 color="secondary" 135 - shape="round" 137 + shape={enableSquareButtons ? 'square' : 'round'} 136 138 PressableComponent={native(PressableScale)} 137 139 onPress={() => { 138 140 logger.metric(
+7 -2
src/screens/Search/components/SearchHistory.tsx
··· 7 7 import {makeProfileLink} from '#/lib/routes/links' 8 8 import {sanitizeDisplayName} from '#/lib/strings/display-names' 9 9 import {sanitizeHandle} from '#/lib/strings/handles' 10 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 10 11 import {useModerationOpts} from '#/state/preferences/moderation-opts' 11 12 import {UserAvatar} from '#/view/com/util/UserAvatar' 12 13 import {BlockDrawerGesture} from '#/view/shell/BlockDrawerGesture' ··· 37 38 }) { 38 39 const {_} = useLingui() 39 40 const moderationOpts = useModerationOpts() 41 + 42 + const enableSquareButtons = useEnableSquareButtons() 40 43 41 44 return ( 42 45 <Layout.Content ··· 96 99 size="small" 97 100 variant="ghost" 98 101 color="secondary" 99 - shape="round"> 102 + shape={enableSquareButtons ? 'square' : 'round'}> 100 103 <ButtonIcon icon={XIcon} /> 101 104 </Button> 102 105 </View> ··· 129 132 ) 130 133 const verification = useSimpleVerificationState({profile}) 131 134 135 + const enableSquareButtons = useEnableSquareButtons() 136 + 132 137 return ( 133 138 <View style={[a.relative]}> 134 139 <Link ··· 169 174 size="tiny" 170 175 variant="outline" 171 176 color="secondary" 172 - shape="round" 177 + shape={enableSquareButtons ? 'square' : 'round'} 173 178 onPress={onRemove} 174 179 style={[ 175 180 a.absolute,
+8 -3
src/screens/Search/components/StarterPackCard.tsx
··· 9 9 import {useLingui} from '@lingui/react' 10 10 11 11 import {sanitizeHandle} from '#/lib/strings/handles' 12 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 12 13 import {useModerationOpts} from '#/state/preferences/moderation-opts' 13 14 import {useSession} from '#/state/session' 14 15 import {LoadingPlaceholder} from '#/view/com/util/LoadingPlaceholder' ··· 144 145 const widthPerc = 100 / circlesCount 145 146 const [size, setSize] = React.useState<number | null>(null) 146 147 148 + const enableSquareButtons = useEnableSquareButtons() 149 + 147 150 const isPending = (numPending && profiles.length === 0) || !moderationOpts 148 151 149 152 const items = isPending ··· 186 189 <View 187 190 onLayout={e => setSize(e.nativeEvent.layout.width)} 188 191 style={[ 189 - a.rounded_full, 192 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 190 193 t.atoms.bg_contrast_25, 191 194 { 192 195 paddingTop: '100%', ··· 201 204 style={[a.absolute, a.inset_0]} 202 205 /> 203 206 ) : ( 204 - <MediaInsetBorder style={[a.rounded_full]} /> 207 + <MediaInsetBorder 208 + style={[enableSquareButtons ? a.rounded_sm : a.rounded_full]} 209 + /> 205 210 )} 206 211 </View> 207 212 </View> ··· 231 236 style={[ 232 237 a.absolute, 233 238 a.inset_0, 234 - a.rounded_full, 239 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 235 240 a.align_center, 236 241 a.justify_center, 237 242 {
+5 -2
src/screens/Search/modules/ExploreInterestsCard.tsx
··· 4 4 import {useLingui} from '@lingui/react' 5 5 6 6 import {useInterestsDisplayNames} from '#/lib/interests' 7 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 7 8 import {Nux, useSaveNux} from '#/state/queries/nuxs' 8 9 import {usePreferencesQuery} from '#/state/queries/preferences' 9 10 import {atoms as a, useTheme} from '#/alf' ··· 22 23 const {mutateAsync: saveNux} = useSaveNux() 23 24 const trendingPrompt = Prompt.usePromptControl() 24 25 const [closing, setClosing] = useState(false) 26 + 27 + const enableSquareButtons = useEnableSquareButtons() 25 28 26 29 const onClose = () => { 27 30 trendingPrompt.open() ··· 77 80 style={[ 78 81 a.justify_center, 79 82 a.align_center, 80 - a.rounded_full, 83 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 81 84 t.atoms.bg_contrast_25, 82 85 a.px_lg, 83 86 {height: 32}, ··· 111 114 size="small" 112 115 variant="ghost" 113 116 color="secondary" 114 - shape="round" 117 + shape={enableSquareButtons ? 'square' : 'round'} 115 118 onPress={onClose} 116 119 style={[ 117 120 a.absolute,
+8 -2
src/screens/Search/modules/ExploreTrendingTopics.tsx
··· 5 5 import {useLingui} from '@lingui/react' 6 6 7 7 import {logger} from '#/logger' 8 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 8 9 import {useModerationOpts} from '#/state/preferences/moderation-opts' 9 10 import {useTrendingSettings} from '#/state/preferences/trending' 10 11 import {useGetTrendsQuery} from '#/state/queries/trending/useGetTrendsQuery' ··· 158 159 function TrendingIndicator({type}: {type: TrendingIndicatorType | 'skeleton'}) { 159 160 const t = useTheme() 160 161 const {_} = useLingui() 162 + 163 + const enableSquareButtons = useEnableSquareButtons() 164 + 161 165 const pillStyles = [ 162 166 a.flex_row, 163 167 a.align_center, 164 168 a.gap_xs, 165 - a.rounded_full, 169 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 166 170 {height: 28, paddingHorizontal: 10}, 167 171 ] 168 172 ··· 246 250 const t = useTheme() 247 251 const gutters = useGutters([0, 'base']) 248 252 253 + const enableSquareButtons = useEnableSquareButtons() 254 + 249 255 return ( 250 256 <View 251 257 style={[ ··· 263 269 <LoadingPlaceholder 264 270 width={12} 265 271 height={12} 266 - style={[a.rounded_full]} 272 + style={[enableSquareButtons ? a.rounded_sm : a.rounded_full]} 267 273 /> 268 274 </View> 269 275 <LoadingPlaceholder width={90} height={17} />
+3 -1
src/screens/Search/modules/ExploreTrendingVideos.tsx
··· 9 9 import {VIDEO_FEED_URI} from '#/lib/constants' 10 10 import {makeCustomFeedLink} from '#/lib/routes/links' 11 11 import {logger} from '#/logger' 12 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 12 13 import {RQKEY, usePostFeedQuery} from '#/state/queries/post-feed' 13 14 import {BlockDrawerGesture} from '#/view/shell/BlockDrawerGesture' 14 15 import {atoms as a, tokens, useGutters, useTheme} from '#/alf' ··· 151 152 }) { 152 153 const t = useTheme() 153 154 const {_} = useLingui() 155 + const enableSquareButtons = useEnableSquareButtons() 154 156 const items = useMemo(() => { 155 157 return data.pages 156 158 .flatMap(page => page.slices) ··· 215 217 style={[ 216 218 a.align_center, 217 219 a.justify_center, 218 - a.rounded_full, 220 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 219 221 { 220 222 width: 34, 221 223 height: 34,
+19
src/screens/Settings/DeerSettings.tsx
··· 62 62 useSetEnableSquareAvatars, 63 63 } from '#/state/preferences/enable-square-avatars' 64 64 import { 65 + useEnableSquareButtons, 66 + useSetEnableSquareButtons, 67 + } from '#/state/preferences/enable-square-buttons' 68 + import { 65 69 useHideFeedsPromoTab, 66 70 useSetHideFeedsPromoTab, 67 71 } from '#/state/preferences/hide-feeds-promo-tab' ··· 282 286 283 287 const enableSquareAvatars = useEnableSquareAvatars() 284 288 const setEnableSquareAvatars = useSetEnableSquareAvatars() 289 + 290 + const enableSquareButtons = useEnableSquareButtons() 291 + const setEnableSquareButtons = useSetEnableSquareButtons() 285 292 286 293 const constellationInstance = useConstellationInstance() 287 294 const setConstellationInstanceControl = Dialog.useDialogControl() ··· 599 606 style={[a.w_full]}> 600 607 <Toggle.LabelText style={[a.flex_1]}> 601 608 <Trans>Enable square avatars</Trans> 609 + </Toggle.LabelText> 610 + <Toggle.Platform /> 611 + </Toggle.Item> 612 + 613 + <Toggle.Item 614 + name="enable_square_buttons" 615 + label={_(msg`Enable square buttons`)} 616 + value={enableSquareButtons} 617 + onChange={value => setEnableSquareButtons(value)} 618 + style={[a.w_full]}> 619 + <Toggle.LabelText style={[a.flex_1]}> 620 + <Trans>Enable square buttons</Trans> 602 621 </Toggle.LabelText> 603 622 <Toggle.Platform /> 604 623 </Toggle.Item>
+4 -1
src/screens/Settings/InterestsSettings.tsx
··· 12 12 useInterestsDisplayNames, 13 13 } from '#/lib/interests' 14 14 import {type CommonNavigatorParams} from '#/lib/routes/types' 15 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 15 16 import { 16 17 preferencesQueryKey, 17 18 usePreferencesQuery, ··· 187 188 const interestsDisplayNames = useInterestsDisplayNames() 188 189 const ctx = Toggle.useItemContext() 189 190 191 + const enableSquareButtons = useEnableSquareButtons() 192 + 190 193 const styles = useMemo(() => { 191 194 const hovered: ViewStyle[] = [t.atoms.bg_contrast_100] 192 195 const focused: ViewStyle[] = [] ··· 208 211 return ( 209 212 <View 210 213 style={[ 211 - a.rounded_full, 214 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 212 215 a.py_md, 213 216 a.px_xl, 214 217 t.atoms.bg_contrast_50,
+4 -1
src/screens/Settings/Settings.tsx
··· 22 22 import {useProfileShadow} from '#/state/cache/profile-shadow' 23 23 import * as persisted from '#/state/persisted' 24 24 import {clearStorage} from '#/state/persisted' 25 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 25 26 import {useModerationOpts} from '#/state/preferences/moderation-opts' 26 27 import {useDeleteActorDeclaration} from '#/state/queries/messages/actor-declaration' 27 28 import {useProfileQuery, useProfilesQuery} from '#/state/queries/profile' ··· 601 602 const {removeAccount} = useSessionApi() 602 603 const {isActive: live} = useActorStatus(profile) 603 604 605 + const enableSquareButtons = useEnableSquareButtons() 606 + 604 607 const onSwitchAccount = () => { 605 608 if (pendingDid) return 606 609 onPressSwitchAccount(account, 'Settings') ··· 638 641 a.absolute, 639 642 {top: 10, right: tokens.space.lg}, 640 643 a.p_xs, 641 - a.rounded_full, 644 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 642 645 (state.hovered || state.pressed) && t.atoms.bg_contrast_25, 643 646 ]}> 644 647 <DotsHorizontal size="md" style={t.atoms.text} />
+6 -3
src/screens/Settings/components/ChangeHandleDialog.tsx
··· 19 19 import {cleanError} from '#/lib/strings/errors' 20 20 import {createFullHandle, validateServiceHandle} from '#/lib/strings/handles' 21 21 import {sanitizeHandle} from '#/lib/strings/handles' 22 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 22 23 import {useFetchDid, useUpdateHandleMutation} from '#/state/queries/handle' 23 24 import {RQKEY as RQKEY_PROFILE} from '#/state/queries/profile' 24 25 import {useServiceQuery} from '#/state/queries/service' ··· 62 63 const control = Dialog.useDialogContext() 63 64 const {_} = useLingui() 64 65 const agent = useAgent() 66 + const enableSquareButtons = useEnableSquareButtons() 65 67 const { 66 68 data: serviceInfo, 67 69 error: serviceInfoError, ··· 80 82 size="small" 81 83 color="primary" 82 84 variant="ghost" 83 - style={[a.rounded_full]}> 85 + style={[enableSquareButtons ? a.rounded_sm : a.rounded_full]}> 84 86 <ButtonText style={[a.text_md]}> 85 87 <Trans>Cancel</Trans> 86 88 </ButtonText> 87 89 </Button> 88 90 ), 89 - [control, _], 91 + [control, _, enableSquareButtons], 90 92 ) 91 93 92 94 return ( ··· 624 626 function SuccessMessage({text}: {text: string}) { 625 627 const {gtMobile} = useBreakpoints() 626 628 const t = useTheme() 629 + const enableSquareButtons = useEnableSquareButtons() 627 630 return ( 628 631 <View 629 632 style={[ ··· 639 642 <View 640 643 style={[ 641 644 {height: 20, width: 20}, 642 - a.rounded_full, 645 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 643 646 a.align_center, 644 647 a.justify_center, 645 648 {backgroundColor: t.palette.positive_500},
+4 -1
src/screens/StarterPack/StarterPackScreen.tsx
··· 29 29 import {logger} from '#/logger' 30 30 import {isWeb} from '#/platform/detection' 31 31 import {updateProfileShadow} from '#/state/cache/profile-shadow' 32 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 32 33 import {useModerationOpts} from '#/state/preferences/moderation-opts' 33 34 import {getAllListMembers} from '#/state/queries/list-members' 34 35 import {useResolvedStarterPackShortLink} from '#/state/queries/resolve-short-link' ··· 522 523 const deleteDialogControl = useDialogControl() 523 524 const navigation = useNavigation<NavigationProp>() 524 525 526 + const enableSquareButtons = useEnableSquareButtons() 527 + 525 528 const { 526 529 mutate: deleteStarterPack, 527 530 isPending: isDeletePending, ··· 570 573 variant="solid" 571 574 color="secondary" 572 575 size="small" 573 - shape="round"> 576 + shape={enableSquareButtons ? 'square' : 'round'}> 574 577 <ButtonIcon icon={Ellipsis} /> 575 578 </Button> 576 579 )}
+3 -1
src/screens/StarterPack/Wizard/index.tsx
··· 32 32 } from '#/lib/strings/starter-pack' 33 33 import {logger} from '#/logger' 34 34 import {isNative} from '#/platform/detection' 35 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 35 36 import {useModerationOpts} from '#/state/preferences/moderation-opts' 36 37 import {useAllListMembersQuery} from '#/state/queries/list-members' 37 38 import {useProfileQuery} from '#/state/queries/profile' ··· 417 418 const {bottom: bottomInset} = useSafeAreaInsets() 418 419 const {currentAccount} = useSession() 419 420 const items = state.currentStep === 'Profiles' ? state.profiles : state.feeds 421 + const enableSquareButtons = useEnableSquareButtons() 420 422 421 423 const minimumItems = state.currentStep === 'Profiles' ? 8 : 0 422 424 ··· 459 461 <View 460 462 key={index} 461 463 style={[ 462 - a.rounded_full, 464 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 463 465 { 464 466 borderWidth: 0.5, 465 467 borderColor: t.atoms.bg.backgroundColor,
+4 -1
src/screens/Topic.tsx
··· 12 12 import {shareUrl} from '#/lib/sharing' 13 13 import {cleanError} from '#/lib/strings/errors' 14 14 import {enforceLen} from '#/lib/strings/helpers' 15 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 15 16 import {useSearchPostsQuery} from '#/state/queries/search-posts' 16 17 import {useSetMinimalShellMode} from '#/state/shell' 17 18 import {Pager} from '#/view/com/pager/Pager' ··· 37 38 }: NativeStackScreenProps<CommonNavigatorParams, 'Topic'>) { 38 39 const {topic} = route.params 39 40 const {_} = useLingui() 41 + 42 + const enableSquareButtons = useEnableSquareButtons() 40 43 41 44 const headerTitle = React.useMemo(() => { 42 45 return enforceLen(decodeURIComponent(topic), 24, true, 'middle') ··· 103 106 size="small" 104 107 variant="ghost" 105 108 color="primary" 106 - shape="round" 109 + shape={enableSquareButtons ? 'square' : 'round'} 107 110 onPress={onShare} 108 111 hitSlop={HITSLOP_10} 109 112 style={[{right: -3}]}>
+4 -1
src/screens/VideoFeed/components/Header.tsx
··· 7 7 import {HITSLOP_30} from '#/lib/constants' 8 8 import {type NavigationProp} from '#/lib/routes/types' 9 9 import {sanitizeHandle} from '#/lib/strings/handles' 10 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 10 11 import {useFeedSourceInfoQuery} from '#/state/queries/feed' 11 12 import {UserAvatar} from '#/view/com/util/UserAvatar' 12 13 import {type VideoFeedSourceContext} from '#/screens/VideoFeed/types' ··· 144 145 const {_} = useLingui() 145 146 const navigation = useNavigation<NavigationProp>() 146 147 148 + const enableSquareButtons = useEnableSquareButtons() 149 + 147 150 const onPressBack = useCallback( 148 151 (evt: GestureResponderEvent) => { 149 152 onPress?.(evt) ··· 164 167 size="small" 165 168 variant="ghost" 166 169 color="secondary" 167 - shape="round" 170 + shape={enableSquareButtons ? 'square' : 'round'} 168 171 onPress={onPressBack} 169 172 hitSlop={HITSLOP_30} 170 173 style={[
+3 -1
src/screens/VideoFeed/index.tsx
··· 71 71 useFeedFeedbackContext, 72 72 } from '#/state/feed-feedback' 73 73 import {useFeedFeedback} from '#/state/feed-feedback' 74 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 74 75 import {useFeedInfo} from '#/state/queries/feed' 75 76 import {usePostLikeMutationQueue} from '#/state/queries/post' 76 77 import { ··· 1110 1111 const navigation = useNavigation<NavigationProp>() 1111 1112 const {_} = useLingui() 1112 1113 const t = useTheme() 1114 + const enableSquareButtons = useEnableSquareButtons() 1113 1115 return ( 1114 1116 <View 1115 1117 style={[ ··· 1123 1125 <View 1124 1126 style={[ 1125 1127 {height: 100, width: 100}, 1126 - a.rounded_full, 1128 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 1127 1129 t.atoms.bg_contrast_700, 1128 1130 a.align_center, 1129 1131 a.justify_center,
+2
src/state/persisted/schema.ts
··· 142 142 disableReplyMetrics: z.boolean().optional(), 143 143 hideSimilarAccountsRecomm: z.boolean().optional(), 144 144 enableSquareAvatars: z.boolean().optional(), 145 + enableSquareButtons: z.boolean().optional(), 145 146 deerVerification: z 146 147 .object({ 147 148 enabled: z.boolean(), ··· 220 221 disableReplyMetrics: false, 221 222 hideSimilarAccountsRecomm: false, 222 223 enableSquareAvatars: false, 224 + enableSquareButtons: false, 223 225 deerVerification: { 224 226 enabled: false, 225 227 // https://social.daniela.lol/profile/did:plc:p2cp5gopk7mgjegy6wadk3ep/post/3lndyqyyr4k2k
+50
src/state/preferences/enable-square-buttons.tsx
··· 1 + import React from 'react' 2 + 3 + import * as persisted from '#/state/persisted' 4 + 5 + // Preference: enableSquareButtons – when true, disables notifications sent when liking/reposting a post someone else reposted 6 + 7 + type StateContext = persisted.Schema['enableSquareButtons'] 8 + // Same setter signature used across other preference modules 9 + type SetContext = (v: persisted.Schema['enableSquareButtons']) => void 10 + 11 + const stateContext = React.createContext<StateContext>( 12 + persisted.defaults.enableSquareButtons, 13 + ) 14 + const setContext = React.createContext<SetContext>( 15 + (_: persisted.Schema['enableSquareButtons']) => {}, 16 + ) 17 + 18 + export function Provider({children}: React.PropsWithChildren<{}>) { 19 + const [state, setState] = React.useState(persisted.get('enableSquareButtons')) 20 + 21 + const setStateWrapped = React.useCallback( 22 + (value: persisted.Schema['enableSquareButtons']) => { 23 + setState(value) 24 + persisted.write('enableSquareButtons', value) 25 + }, 26 + [setState], 27 + ) 28 + 29 + React.useEffect(() => { 30 + return persisted.onUpdate('enableSquareButtons', next => { 31 + setState(next) 32 + }) 33 + }, [setStateWrapped]) 34 + 35 + return ( 36 + <stateContext.Provider value={state}> 37 + <setContext.Provider value={setStateWrapped}> 38 + {children} 39 + </setContext.Provider> 40 + </stateContext.Provider> 41 + ) 42 + } 43 + 44 + export function useEnableSquareButtons() { 45 + return React.useContext(stateContext) 46 + } 47 + 48 + export function useSetEnableSquareButtons() { 49 + return React.useContext(setContext) 50 + }
+4 -1
src/state/preferences/index.tsx
··· 14 14 import {Provider as DisableSavesMetricsProvider} from './disable-saves-metrics' 15 15 import {Provider as DisableViaRepostNotificationProvider} from './disable-via-repost-notification' 16 16 import {Provider as EnableSquareAvatarsProvider} from './enable-square-avatars' 17 + import {Provider as EnableSquareButtonsProvider} from './enable-square-buttons' 17 18 import {Provider as ExternalEmbedsProvider} from './external-embeds-prefs' 18 19 import {Provider as GoLinksProvider} from './go-links-enabled' 19 20 import {Provider as HiddenPostsProvider} from './hidden-posts' ··· 85 86 <DisableReplyMetricsProvider> 86 87 <HideSimilarAccountsRecommProvider> 87 88 <EnableSquareAvatarsProvider> 88 - {children} 89 + <EnableSquareButtonsProvider> 90 + {children} 91 + </EnableSquareButtonsProvider> 89 92 </EnableSquareAvatarsProvider> 90 93 </HideSimilarAccountsRecommProvider> 91 94 </DisableReplyMetricsProvider>
+23 -6
src/view/com/composer/Composer.tsx
··· 86 86 } from '#/state/gallery' 87 87 import {useModalControls} from '#/state/modals' 88 88 import {useRequireAltTextEnabled} from '#/state/preferences' 89 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 89 90 import { 90 91 fromPostLanguages, 91 92 toPostLanguages, ··· 855 856 : _(msg`What's up?`) 856 857 const discardPromptControl = Prompt.usePromptControl() 857 858 859 + const enableSquareButtons = useEnableSquareButtons() 860 + 858 861 const dispatchPost = useCallback( 859 862 (action: PostAction) => { 860 863 dispatch({ ··· 968 971 size="small" 969 972 color="secondary" 970 973 variant="ghost" 971 - shape="round" 974 + shape={enableSquareButtons ? 'square' : 'round'} 972 975 style={[a.absolute, {top: 0, right: 0}]} 973 976 onPress={() => { 974 977 if ( ··· 1039 1042 }) { 1040 1043 const pal = usePalette('default') 1041 1044 const {_} = useLingui() 1045 + 1046 + const enableSquareButtons = useEnableSquareButtons() 1047 + 1042 1048 return ( 1043 1049 <Animated.View 1044 1050 style={topBarAnimatedStyle} ··· 1050 1056 color="primary" 1051 1057 shape="default" 1052 1058 size="small" 1053 - style={[a.rounded_full, a.py_sm, {paddingLeft: 7, paddingRight: 7}]} 1059 + style={[ 1060 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 1061 + a.py_sm, 1062 + {paddingLeft: 7, paddingRight: 7}, 1063 + ]} 1054 1064 onPress={onCancel} 1055 1065 accessibilityHint={_( 1056 1066 msg`Closes post composer and discards post draft`, ··· 1107 1117 color="primary" 1108 1118 shape="default" 1109 1119 size="small" 1110 - style={[a.rounded_full, a.py_sm]} 1120 + style={[ 1121 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 1122 + a.py_sm, 1123 + ]} 1111 1124 onPress={onPublish} 1112 1125 disabled={!canPost || isPublishQueued}> 1113 1126 <ButtonText style={[a.text_md]}> ··· 1365 1378 let selectedAssetsCount = 0 1366 1379 let isMediaSelectionDisabled = false 1367 1380 1381 + const enableSquareButtons = useEnableSquareButtons() 1382 + 1368 1383 if (media?.type === 'images') { 1369 1384 isMediaSelectionDisabled = isMaxImages 1370 1385 selectedAssetsCount = images.length ··· 1476 1491 label={_(msg`Open emoji picker`)} 1477 1492 accessibilityHint={_(msg`Opens emoji picker`)} 1478 1493 variant="ghost" 1479 - shape="round" 1494 + shape={enableSquareButtons ? 'square' : 'round'} 1480 1495 color="primary"> 1481 1496 <EmojiSmileIcon size="lg" /> 1482 1497 </Button> ··· 1492 1507 onPress={onAddPost} 1493 1508 style={[a.p_sm]} 1494 1509 variant="ghost" 1495 - shape="round" 1510 + shape={enableSquareButtons ? 'square' : 'round'} 1496 1511 color="primary"> 1497 1512 <PlusIcon size="lg" /> 1498 1513 </Button> ··· 1774 1789 const t = useTheme() 1775 1790 const {_} = useLingui() 1776 1791 1792 + const enableSquareButtons = useEnableSquareButtons() 1793 + 1777 1794 const videoError = 1778 1795 videoState.status === 'error' ? videoState.error : undefined 1779 1796 const error = standardError || videoError ··· 1811 1828 size="tiny" 1812 1829 color="secondary" 1813 1830 variant="ghost" 1814 - shape="round" 1831 + shape={enableSquareButtons ? 'square' : 'round'} 1815 1832 style={[a.absolute, {top: 0, right: 0}]} 1816 1833 onPress={onClearError}> 1817 1834 <ButtonIcon icon={XIcon} />
+4 -1
src/view/com/composer/ExternalEmbedRemoveBtn.tsx
··· 2 2 import {msg} from '@lingui/macro' 3 3 import {useLingui} from '@lingui/react' 4 4 5 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 5 6 import {atoms as a, useTheme, type ViewStyleProp} from '#/alf' 6 7 import {Button, ButtonIcon} from '#/components/Button' 7 8 import {TimesLarge_Stroke2_Corner0_Rounded as X} from '#/components/icons/Times' ··· 12 13 }: {onRemove: () => void} & ViewStyleProp) { 13 14 const t = useTheme() 14 15 const {_} = useLingui() 16 + 17 + const enableSquareButtons = useEnableSquareButtons() 15 18 16 19 return ( 17 20 <View style={[a.absolute, {top: 8, right: 8}, a.z_50, style]}> ··· 21 24 size="small" 22 25 variant="solid" 23 26 color="secondary" 24 - shape="round" 27 + shape={enableSquareButtons ? 'square' : 'round'} 25 28 style={[t.atoms.shadow_sm]}> 26 29 <ButtonIcon icon={X} size="sm" /> 27 30 </Button>
+4 -1
src/view/com/composer/SelectMediaButton.tsx
··· 12 12 import {openUnifiedPicker} from '#/lib/media/picker' 13 13 import {extractDataUriMime} from '#/lib/media/util' 14 14 import {isNative, isWeb} from '#/platform/detection' 15 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 15 16 import {MAX_IMAGES} from '#/view/com/composer/state/composer' 16 17 import {atoms as a, useTheme} from '#/alf' 17 18 import {Button} from '#/components/Button' ··· 460 461 selectionCountRemaining, 461 462 ]) 462 463 464 + const enableSquareButtons = useEnableSquareButtons() 465 + 463 466 return ( 464 467 <Button 465 468 testID="openMediaBtn" ··· 480 483 )} 481 484 style={a.p_sm} 482 485 variant="ghost" 483 - shape="round" 486 + shape={enableSquareButtons ? 'square' : 'round'} 484 487 color="primary" 485 488 disabled={disabled}> 486 489 <ImageIcon
+7 -4
src/view/com/composer/photos/EditImageDialog.web.tsx
··· 11 11 type ImageTransformation, 12 12 manipulateImage, 13 13 } from '#/state/gallery' 14 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 14 15 import {atoms as a, useTheme} from '#/alf' 15 16 import {Button, ButtonIcon, ButtonText} from '#/components/Button' 16 17 import * as Dialog from '#/components/Dialog' ··· 37 38 const [pending, setPending] = useState(false) 38 39 const ref = useRef<{save: () => Promise<void>}>(null) 39 40 41 + const enableSquareButtons = useEnableSquareButtons() 42 + 40 43 const cancelButton = useCallback( 41 44 () => ( 42 45 <Button ··· 46 49 size="small" 47 50 color="primary" 48 51 variant="ghost" 49 - style={[a.rounded_full]} 52 + style={enableSquareButtons ? [a.rounded_sm] : [a.rounded_full]} 50 53 testID="cropImageCancelBtn"> 51 54 <ButtonText style={[a.text_md]}> 52 55 <Trans>Cancel</Trans> 53 56 </ButtonText> 54 57 </Button> 55 58 ), 56 - [control, _, pending], 59 + [control, _, pending, enableSquareButtons], 57 60 ) 58 61 59 62 const saveButton = useCallback( ··· 69 72 size="small" 70 73 color="primary" 71 74 variant="ghost" 72 - style={[a.rounded_full]} 75 + style={enableSquareButtons ? [a.rounded_sm] : [a.rounded_full]} 73 76 testID="cropImageSaveBtn"> 74 77 <ButtonText style={[a.text_md]}> 75 78 <Trans>Save</Trans> ··· 77 80 {pending && <ButtonIcon icon={Loader} />} 78 81 </Button> 79 82 ), 80 - [_, pending], 83 + [_, pending, enableSquareButtons], 81 84 ) 82 85 83 86 return (
+21 -2
src/view/com/composer/photos/Gallery.tsx
··· 18 18 import {colors, s} from '#/lib/styles' 19 19 import {isNative} from '#/platform/detection' 20 20 import {type ComposerImage, cropImage} from '#/state/gallery' 21 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 21 22 import {Text} from '#/view/com/util/text/Text' 22 23 import {tokens, useTheme} from '#/alf' 23 24 import * as Dialog from '#/components/Dialog' ··· 144 145 const altTextControl = Dialog.useDialogControl() 145 146 const editControl = Dialog.useDialogControl() 146 147 148 + const enableSquareButtons = useEnableSquareButtons() 149 + 147 150 const onImageEdit = () => { 148 151 if (isNative) { 149 152 cropImage(image).then(next => { ··· 195 198 accessibilityLabel={_(msg`Edit image`)} 196 199 accessibilityHint="" 197 200 onPress={onImageEdit} 198 - style={styles.imageControl}> 201 + style={ 202 + enableSquareButtons 203 + ? styles.imageControlSquare 204 + : styles.imageControl 205 + }> 199 206 <FontAwesomeIcon icon="pen" size={12} style={{color: colors.white}} /> 200 207 </TouchableOpacity> 201 208 <TouchableOpacity ··· 204 211 accessibilityLabel={_(msg`Remove image`)} 205 212 accessibilityHint="" 206 213 onPress={onRemove} 207 - style={styles.imageControl}> 214 + style={ 215 + enableSquareButtons 216 + ? styles.imageControlSquare 217 + : styles.imageControl 218 + }> 208 219 <FontAwesomeIcon 209 220 icon="xmark" 210 221 size={16} ··· 281 292 width: 24, 282 293 height: 24, 283 294 borderRadius: tokens.borderRadius.md, 295 + backgroundColor: 'rgba(0, 0, 0, 0.75)', 296 + alignItems: 'center', 297 + justifyContent: 'center', 298 + }, 299 + imageControlSquare: { 300 + width: 24, 301 + height: 24, 302 + borderRadius: tokens.borderRadius.sm, 284 303 backgroundColor: 'rgba(0, 0, 0, 0.75)', 285 304 alignItems: 'center', 286 305 justifyContent: 'center',
+4 -1
src/view/com/composer/photos/OpenCameraBtn.tsx
··· 9 9 import {logger} from '#/logger' 10 10 import {isMobileWeb, isNative} from '#/platform/detection' 11 11 import {type ComposerImage, createComposerImage} from '#/state/gallery' 12 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 12 13 import {atoms as a, useTheme} from '#/alf' 13 14 import {Button} from '#/components/Button' 14 15 import {Camera_Stroke2_Corner0_Rounded as Camera} from '#/components/icons/Camera' ··· 24 25 const [mediaPermissionRes, requestMediaPermission] = 25 26 MediaLibrary.usePermissions({granularPermissions: ['photo']}) 26 27 const t = useTheme() 28 + 29 + const enableSquareButtons = useEnableSquareButtons() 27 30 28 31 const onPressTakePicture = useCallback(async () => { 29 32 try { ··· 71 74 accessibilityHint={_(msg`Opens camera on device`)} 72 75 style={a.p_sm} 73 76 variant="ghost" 74 - shape="round" 77 + shape={enableSquareButtons ? 'square' : 'round'} 75 78 color="primary" 76 79 disabled={disabled}> 77 80 <Camera size="lg" style={disabled && t.atoms.text_contrast_low} />
+4 -1
src/view/com/composer/photos/SelectGifBtn.tsx
··· 4 4 import {useLingui} from '@lingui/react' 5 5 6 6 import {logEvent} from '#/lib/statsig/statsig' 7 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 7 8 import {type Gif} from '#/state/queries/tenor' 8 9 import {atoms as a, useTheme} from '#/alf' 9 10 import {Button} from '#/components/Button' ··· 20 21 const {_} = useLingui() 21 22 const ref = useRef<{open: () => void}>(null) 22 23 const t = useTheme() 24 + 25 + const enableSquareButtons = useEnableSquareButtons() 23 26 24 27 const onPressSelectGif = useCallback(async () => { 25 28 logEvent('composer:gif:open', {}) ··· 36 39 accessibilityHint={_(msg`Opens GIF select dialog`)} 37 40 style={a.p_sm} 38 41 variant="ghost" 39 - shape="round" 42 + shape={enableSquareButtons ? 'square' : 'round'} 40 43 color="primary" 41 44 disabled={disabled}> 42 45 <GifIcon size="lg" style={disabled && t.atoms.text_contrast_low} />
+4 -1
src/view/com/composer/select-language/PostLanguageSelectDialog.tsx
··· 7 7 import {languageName} from '#/locale/helpers' 8 8 import {type Language, LANGUAGES, LANGUAGES_MAP_CODE2} from '#/locale/languages' 9 9 import {isNative, isWeb} from '#/platform/detection' 10 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 10 11 import { 11 12 toPostLanguages, 12 13 useLanguagePrefs, ··· 92 93 const setLangPrefs = useLanguagePrefsApi() 93 94 const t = useTheme() 94 95 const {_} = useLingui() 96 + 97 + const enableSquareButtons = useEnableSquareButtons() 95 98 96 99 const handleClose = () => { 97 100 control.close(() => { ··· 200 203 variant="ghost" 201 204 size="small" 202 205 color="secondary" 203 - shape="round" 206 + shape={enableSquareButtons ? 'square' : 'round'} 204 207 label={_(msg`Close dialog`)} 205 208 onPress={handleClose}> 206 209 <ButtonIcon icon={XIcon} />
+4 -1
src/view/com/composer/videos/SubtitleDialog.tsx
··· 8 8 import {LANGUAGES} from '#/locale/languages' 9 9 import {isWeb} from '#/platform/detection' 10 10 import {useLanguagePrefs} from '#/state/preferences' 11 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 11 12 import {atoms as a, useTheme, web} from '#/alf' 12 13 import {Button, ButtonIcon, ButtonText} from '#/components/Button' 13 14 import * as Dialog from '#/components/Dialog' ··· 212 213 [setCaptions, language], 213 214 ) 214 215 216 + const enableSquareButtons = useEnableSquareButtons() 217 + 215 218 return ( 216 219 <View 217 220 style={[ ··· 260 263 <Button 261 264 label={_(msg`Remove subtitle file`)} 262 265 size="tiny" 263 - shape="round" 266 + shape={enableSquareButtons ? 'square' : 'round'} 264 267 variant="outline" 265 268 color="secondary" 266 269 onPress={() =>
+16 -1
src/view/com/lightbox/ImageViewing/components/ImageDefaultHeader.tsx
··· 12 12 import {useLingui} from '@lingui/react' 13 13 14 14 import {createHitslop} from '#/lib/constants' 15 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 15 16 16 17 type Props = { 17 18 onRequestClose: () => void ··· 21 22 22 23 const ImageDefaultHeader = ({onRequestClose}: Props) => { 23 24 const {_} = useLingui() 25 + const enableSquareButtons = useEnableSquareButtons() 24 26 return ( 25 27 <SafeAreaView style={styles.root}> 26 28 <TouchableOpacity 27 - style={[styles.closeButton, styles.blurredBackground]} 29 + style={[ 30 + enableSquareButtons ? styles.closeButtonSquare : styles.closeButton, 31 + styles.blurredBackground, 32 + ]} 28 33 onPress={onRequestClose} 29 34 hitSlop={HIT_SLOP} 30 35 accessibilityRole="button" ··· 50 55 alignItems: 'center', 51 56 justifyContent: 'center', 52 57 borderRadius: 22, 58 + backgroundColor: '#00000077', 59 + }, 60 + closeButtonSquare: { 61 + marginRight: 10, 62 + marginTop: 10, 63 + width: 44, 64 + height: 44, 65 + alignItems: 'center', 66 + justifyContent: 'center', 67 + borderRadius: 11, 53 68 backgroundColor: '#00000077', 54 69 }, 55 70 blurredBackground: {
+4 -2
src/view/com/lists/MyLists.tsx
··· 15 15 import {cleanError} from '#/lib/strings/errors' 16 16 import {s} from '#/lib/styles' 17 17 import {logger} from '#/logger' 18 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 18 19 import {useModerationOpts} from '#/state/preferences/moderation-opts' 19 20 import {type MyListsFilter, useMyListsQuery} from '#/state/queries/my-lists' 20 21 import {atoms as a, useTheme} from '#/alf' ··· 49 50 const {data, isFetching, isFetched, isError, error, refetch} = 50 51 useMyListsQuery(filter) 51 52 const isEmpty = !isFetching && !data?.length 53 + const enableSquareButtons = useEnableSquareButtons() 52 54 53 55 const items = React.useMemo(() => { 54 56 let items: any[] = [] ··· 107 109 style={[ 108 110 a.align_center, 109 111 a.justify_center, 110 - a.rounded_full, 112 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 111 113 t.atoms.bg_contrast_25, 112 114 { 113 115 width: 32, ··· 159 161 </View> 160 162 ) 161 163 }, 162 - [t, renderItem, error, onRefresh, emptyText], 164 + [t, renderItem, error, onRefresh, emptyText, enableSquareButtons], 163 165 ) 164 166 165 167 if (inline) {
+6 -2
src/view/com/posts/PostFeedItemCarousel.tsx
··· 3 3 import {msg, Plural} from '@lingui/macro' 4 4 import {useLingui} from '@lingui/react' 5 5 6 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 6 7 import {type FeedPostSlice} from '#/state/queries/post-feed' 7 8 import {BlockDrawerGesture} from '#/view/shell/BlockDrawerGesture' 8 9 import {atoms as a, useTheme} from '#/alf' ··· 22 23 const {_} = useLingui() 23 24 const ref = React.useRef<ScrollView>(null) 24 25 const [scrollX, setScrollX] = React.useState(0) 26 + 27 + const enableSquareButtons = useEnableSquareButtons() 25 28 26 29 const scrollTo = React.useCallback( 27 30 (item: number) => { ··· 68 71 size="tiny" 69 72 variant="ghost" 70 73 color="secondary" 71 - shape="round" 74 + shape={enableSquareButtons ? 'square' : 'round'} 72 75 onPress={() => scrollLeft()}> 73 76 <ButtonIcon icon={ChevronLeft} /> 74 77 </Button> ··· 77 80 size="tiny" 78 81 variant="ghost" 79 82 color="secondary" 80 - shape="round" 83 + shape={enableSquareButtons ? 'square' : 'round'} 81 84 onPress={() => scrollRight()}> 82 85 <ButtonIcon icon={ChevronRight} /> 83 86 </Button> ··· 135 138 isCarouselItem={true} 136 139 rootPost={slice.items[0].post} 137 140 showReplyTo={false} 141 + reqId={undefined} 138 142 /> 139 143 </View> 140 144 )
+4 -1
src/view/com/profile/ProfileMenu.tsx
··· 20 20 useDeerVerificationTrusted, 21 21 useSetDeerVerificationTrust, 22 22 } from '#/state/preferences/deer-verification' 23 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 23 24 import { 24 25 RQKEY as profileQueryKey, 25 26 useProfileBlockMutationQueue, ··· 235 236 236 237 const status = useActorStatus(profile) 237 238 239 + const enableSquareButtons = useEnableSquareButtons() 240 + 238 241 return ( 239 242 <EventStopper onKeyDown={false}> 240 243 <Menu.Root> ··· 249 252 variant="solid" 250 253 color="secondary" 251 254 size="small" 252 - shape="round"> 255 + shape={enableSquareButtons ? 'square' : 'round'}> 253 256 <ButtonIcon icon={Ellipsis} size="sm" /> 254 257 </Button> 255 258 )
+7 -1
src/view/com/util/LoadingPlaceholder.tsx
··· 8 8 } from 'react-native' 9 9 10 10 import {s} from '#/lib/styles' 11 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 11 12 import {atoms as a, useTheme} from '#/alf' 12 13 import {Bubble_Stroke2_Corner2_Rounded as Bubble} from '#/components/icons/Bubble' 13 14 import { ··· 277 278 }) { 278 279 const t = useTheme() 279 280 const random = useMemo(() => Math.random(), []) 281 + const enableSquareButtons = useEnableSquareButtons() 280 282 return ( 281 283 <View style={[a.flex_row, a.gap_md, a.px_lg, a.mt_lg, t.atoms.bg, style]}> 282 - <LoadingPlaceholder width={52} height={52} style={a.rounded_full} /> 284 + <LoadingPlaceholder 285 + width={52} 286 + height={52} 287 + style={enableSquareButtons ? a.rounded_sm : a.rounded_full} 288 + /> 283 289 <View> 284 290 <LoadingPlaceholder width={140} height={12} style={a.mt_xs} /> 285 291 <LoadingPlaceholder width={120} height={8} style={a.mt_sm} />
+3 -1
src/view/com/util/error/ErrorScreen.tsx
··· 7 7 import {useLingui} from '@lingui/react' 8 8 9 9 import {usePalette} from '#/lib/hooks/usePalette' 10 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 10 11 import {atoms as a, useTheme} from '#/alf' 11 12 import {Button, ButtonIcon, ButtonText} from '#/components/Button' 12 13 import {ArrowRotateCounterClockwise_Stroke2_Corner0_Rounded as ArrowRotateCounterClockwiseIcon} from '#/components/icons/ArrowRotateCounterClockwise' ··· 31 32 const t = useTheme() 32 33 const pal = usePalette('default') 33 34 const {_} = useLingui() 35 + const enableSquareButtons = useEnableSquareButtons() 34 36 35 37 return ( 36 38 <Layout.Center testID={testID}> ··· 49 51 <View style={[a.mb_md, a.align_center]}> 50 52 <View 51 53 style={[ 52 - a.rounded_full, 54 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 53 55 {width: 50, height: 50}, 54 56 a.align_center, 55 57 a.justify_center,
+4 -1
src/view/com/util/fab/FABInner.tsx
··· 16 16 import {clamp} from '#/lib/numbers' 17 17 import {gradients} from '#/lib/styles' 18 18 import {isWeb} from '#/platform/detection' 19 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 19 20 import {ios} from '#/alf' 20 21 import {atoms as a} from '#/alf' 21 22 ··· 30 31 const {isMobile, isTablet} = useWebMediaQueries() 31 32 const playHaptic = useHaptics() 32 33 const fabMinimalShellTransform = useMinimalShellFabTransform() 34 + 35 + const enableSquareButtons = useEnableSquareButtons() 33 36 34 37 const size = isTablet ? styles.sizeLarge : styles.sizeRegular 35 38 ··· 57 60 playHaptic('Heavy') 58 61 })} 59 62 targetScale={0.9} 60 - style={[a.rounded_full, style]} 63 + style={[enableSquareButtons ? a.rounded_sm : a.rounded_full, style]} 61 64 {...props}> 62 65 <LinearGradient 63 66 colors={[gradients.blueLight.start, gradients.blueLight.end]}
+7 -2
src/view/com/util/load-latest/LoadLatestBtn.tsx
··· 9 9 import {useWebMediaQueries} from '#/lib/hooks/useWebMediaQueries' 10 10 import {clamp} from '#/lib/numbers' 11 11 import {useGate} from '#/lib/statsig/statsig' 12 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 12 13 import {useSession} from '#/state/session' 13 14 import {atoms as a, useLayoutBreakpoints, useTheme, web} from '#/alf' 14 15 import {useInteractionState} from '#/components/hooks/useInteractionState' ··· 31 32 const fabMinimalShellTransform = useMinimalShellFabTransform() 32 33 const insets = useSafeAreaInsets() 33 34 const t = useTheme() 35 + const enableSquareButtons = useEnableSquareButtons() 34 36 const { 35 37 state: hovered, 36 38 onIn: onHoverIn, ··· 77 79 width: 42, 78 80 height: 42, 79 81 }, 80 - a.rounded_full, 82 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 81 83 a.align_center, 82 84 a.justify_center, 83 85 a.border, ··· 91 93 targetScale={0.9} 92 94 onPointerEnter={onHoverIn} 93 95 onPointerLeave={onHoverOut}> 94 - <SubtleHover hover={hovered} style={[a.rounded_full]} /> 96 + <SubtleHover 97 + hover={hovered} 98 + style={[enableSquareButtons ? a.rounded_sm : a.rounded_full]} 99 + /> 95 100 <ArrowIcon 96 101 size="md" 97 102 style={[
+7 -3
src/view/screens/DebugMod.tsx
··· 24 24 type CommonNavigatorParams, 25 25 type NativeStackScreenProps, 26 26 } from '#/lib/routes/types' 27 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 27 28 import {useModerationOpts} from '#/state/preferences/moderation-opts' 28 29 import {moderationOptsOverrideContext} from '#/state/preferences/moderation-opts' 29 30 import {type FeedNotification} from '#/state/queries/notifications/types' ··· 85 86 const [view, setView] = React.useState<string[]>(['post']) 86 87 const labelStrings = useGlobalLabelStrings() 87 88 const {currentAccount} = useSession() 89 + 90 + const enableSquareButtons = useEnableSquareButtons() 88 91 89 92 const isTargetMe = 90 93 scenario[0] === 'label' && scenarioSwitches.includes('targetMe') ··· 449 452 <View 450 453 style={[ 451 454 a.border, 452 - a.rounded_full, 455 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 453 456 a.px_md, 454 457 a.py_sm, 455 458 t.atoms.border_contrast_medium, ··· 615 618 > 616 619 }) { 617 620 const t = useTheme() 621 + const enableSquareButtons = useEnableSquareButtons() 618 622 return ( 619 623 <View 620 624 style={[ ··· 634 638 <View 635 639 style={[ 636 640 a.border, 637 - a.rounded_full, 641 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 638 642 a.px_md, 639 643 a.py_sm, 640 644 t.atoms.border_contrast_medium, ··· 670 674 <View 671 675 style={[ 672 676 a.border, 673 - a.rounded_full, 677 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 674 678 a.px_md, 675 679 a.py_sm, 676 680 t.atoms.border_contrast_medium,
+4 -1
src/view/screens/Feeds.tsx
··· 17 17 import {cleanError} from '#/lib/strings/errors' 18 18 import {s} from '#/lib/styles' 19 19 import {isNative, isWeb} from '#/platform/detection' 20 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 20 21 import { 21 22 type SavedFeedItem, 22 23 useGetPopularFeedsQuery, ··· 135 136 } = useSearchPopularFeedsMutation() 136 137 const {hasSession} = useSession() 137 138 const listRef = React.useRef<ListMethods>(null) 139 + 140 + const enableSquareButtons = useEnableSquareButtons() 138 141 139 142 /** 140 143 * A search query is present. We may not have search results yet. ··· 519 522 size="small" 520 523 variant="ghost" 521 524 color="secondary" 522 - shape="round" 525 + shape={enableSquareButtons ? 'square' : 'round'} 523 526 style={[a.justify_center, {right: -3}]}> 524 527 <ButtonIcon icon={Gear} size="lg" /> 525 528 </Link>
+4 -1
src/view/screens/Notifications.tsx
··· 16 16 import {logger} from '#/logger' 17 17 import {isNative} from '#/platform/detection' 18 18 import {emitSoftReset, listenSoftReset} from '#/state/events' 19 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 19 20 import {RQKEY as NOTIFS_RQKEY} from '#/state/queries/notifications/feed' 20 21 import {useNotificationSettingsQuery} from '#/state/queries/notifications/settings' 21 22 import { ··· 60 61 const initialActiveTab = lastActiveTab 61 62 const [activeTab, setActiveTab] = useState(initialActiveTab) 62 63 const isLoading = activeTab === 0 ? isLoadingAll : isLoadingMentions 64 + 65 + const enableSquareButtons = useEnableSquareButtons() 63 66 64 67 const onPageSelected = useCallback( 65 68 (index: number) => { ··· 137 140 size="small" 138 141 variant="ghost" 139 142 color="secondary" 140 - shape="round" 143 + shape={enableSquareButtons ? 'square' : 'round'} 141 144 style={[a.justify_center]}> 142 145 <ButtonIcon icon={isLoading ? Loader : SettingsIcon} size="lg" /> 143 146 </Link>
+3 -1
src/view/screens/Storybook/Links.tsx
··· 1 1 import {View} from 'react-native' 2 2 3 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 3 4 import {atoms as a, useTheme} from '#/alf' 4 5 import {ButtonText} from '#/components/Button' 5 6 import {InlineLinkText, Link} from '#/components/Link' ··· 7 8 8 9 export function Links() { 9 10 const t = useTheme() 11 + const enableSquareButtons = useEnableSquareButtons() 10 12 return ( 11 13 <View style={[a.gap_md, a.align_start]}> 12 14 <H1>Links</H1> ··· 55 57 <View 56 58 style={[ 57 59 {width: 32, height: 32}, 58 - a.rounded_full, 60 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 59 61 t.atoms.bg_contrast_200, 60 62 ]} 61 63 />
+3 -1
src/view/shell/Drawer.tsx
··· 15 15 import {colors} from '#/lib/styles' 16 16 import {isWeb} from '#/platform/detection' 17 17 import {emitSoftReset} from '#/state/events' 18 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 18 19 import {useKawaiiMode} from '#/state/preferences/kawaii' 19 20 import {useUnreadNotifications} from '#/state/queries/notifications/unread' 20 21 import {useProfileQuery} from '#/state/queries/profile' ··· 615 616 616 617 function MenuItem({icon, label, count, bold, onPress}: MenuItemProps) { 617 618 const t = useTheme() 619 + const enableSquareButtons = useEnableSquareButtons() 618 620 return ( 619 621 <Button 620 622 testID={`menuItemButton-${label}`} ··· 644 646 ]}> 645 647 <View 646 648 style={[ 647 - a.rounded_full, 649 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 648 650 { 649 651 right: count.length === 1 ? 6 : 0, 650 652 paddingHorizontal: 4,
+13 -2
src/view/shell/bottom-bar/BottomBar.tsx
··· 21 21 import {useGate} from '#/lib/statsig/statsig' 22 22 import {emitSoftReset} from '#/state/events' 23 23 import {useHomeBadge} from '#/state/home-badge' 24 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 24 25 import {useUnreadMessageCount} from '#/state/queries/messages/list-conversations' 25 26 import {useUnreadNotifications} from '#/state/queries/notifications/unread' 26 27 import {useProfileQuery} from '#/state/queries/profile' ··· 396 397 accessibilityHint, 397 398 accessibilityLabel, 398 399 }: BtnProps) { 400 + const enableSquareButtons = useEnableSquareButtons() 399 401 return ( 400 402 <PressableScale 401 403 testID={testID} ··· 410 412 accessibilityShowsLargeContentViewer> 411 413 {icon} 412 414 {notificationCount ? ( 413 - <View style={[styles.notificationCount, a.rounded_full]}> 415 + <View 416 + style={[ 417 + styles.notificationCount, 418 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 419 + ]}> 414 420 <Text style={styles.notificationCountLabel}>{notificationCount}</Text> 415 421 </View> 416 422 ) : hasNew ? ( 417 - <View style={[styles.hasNewBadge, a.rounded_full]} /> 423 + <View 424 + style={[ 425 + styles.hasNewBadge, 426 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 427 + ]} 428 + /> 418 429 ) : null} 419 430 </PressableScale> 420 431 )
+12 -4
src/view/shell/desktop/LeftNav.tsx
··· 21 21 import {isInvalidHandle, sanitizeHandle} from '#/lib/strings/handles' 22 22 import {emitSoftReset} from '#/state/events' 23 23 import {useHomeBadge} from '#/state/home-badge' 24 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 24 25 import {useFetchHandle} from '#/state/queries/handle' 25 26 import {useUnreadMessageCount} from '#/state/queries/messages/list-conversations' 26 27 import {useUnreadNotifications} from '#/state/queries/notifications/unread' ··· 103 104 104 105 const {isActive: live} = useActorStatus(profile) 105 106 107 + const enableSquareButtons = useEnableSquareButtons() 108 + 106 109 return ( 107 110 <View style={[a.my_md, !leftNavMinimal && [a.w_full, a.align_start]]}> 108 111 {!isLoading && profile ? ( ··· 118 121 a.w_full, 119 122 a.transition_color, 120 123 active ? t.atoms.bg_contrast_25 : a.transition_delay_50ms, 121 - a.rounded_full, 124 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 122 125 a.justify_between, 123 126 a.align_center, 124 127 a.flex_row, ··· 379 382 const {currentAccount} = useSession() 380 383 const {leftNavMinimal} = useLayoutBreakpoints() 381 384 const [pathName] = useMemo(() => router.matchPath(href), [href]) 385 + 386 + const enableSquareButtons = useEnableSquareButtons() 387 + 382 388 const currentRouteInfo = useNavigationState(state => { 383 389 if (!state) { 384 390 return {name: 'Home'} ··· 465 471 a.absolute, 466 472 a.text_xs, 467 473 a.font_semi_bold, 468 - a.rounded_full, 474 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 469 475 a.text_center, 470 476 a.leading_tight, 471 477 a.z_20, ··· 493 499 <View 494 500 style={[ 495 501 a.absolute, 496 - a.rounded_full, 502 + enableSquareButtons ? a.rounded_sm : a.rounded_full, 497 503 a.z_20, 498 504 { 499 505 backgroundColor: t.palette.primary_500, ··· 528 534 const [isFetchingHandle, setIsFetchingHandle] = useState(false) 529 535 const fetchHandle = useFetchHandle() 530 536 537 + const enableSquareButtons = useEnableSquareButtons() 538 + 531 539 const getProfileHandle = async () => { 532 540 const routes = getState()?.routes 533 541 const currentRoute = routes?.[routes?.length - 1] ··· 577 585 size="large" 578 586 variant="solid" 579 587 color="primary" 580 - style={[a.rounded_full]}> 588 + style={enableSquareButtons ? [a.rounded_sm] : [a.rounded_full]}> 581 589 <ButtonIcon icon={EditBig} position="left" /> 582 590 <ButtonText> 583 591 <Trans context="action">New Post</Trans>
+5 -2
src/view/shell/desktop/SidebarTrendingTopics.tsx
··· 4 4 import {useLingui} from '@lingui/react' 5 5 6 6 import {logEvent} from '#/lib/statsig/statsig' 7 + import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 7 8 import { 8 9 useTrendingSettings, 9 10 useTrendingSettingsApi, ··· 39 40 const {data: trending, error, isLoading} = useTrendingTopics() 40 41 const noTopics = !isLoading && !error && !trending?.topics?.length 41 42 43 + const enableSquareButtons = useEnableSquareButtons() 44 + 42 45 const onConfirmHide = React.useCallback(() => { 43 46 logEvent('trendingTopics:hide', {context: 'sidebar'}) 44 47 setTrendingDisabled(true) ··· 63 66 size="tiny" 64 67 variant="ghost" 65 68 color="secondary" 66 - shape="round" 69 + shape={enableSquareButtons ? 'square' : 'round'} 67 70 onPress={() => trendingPrompt.open()}> 68 71 <ButtonIcon icon={X} /> 69 72 </Button> ··· 82 85 <TrendingTopicLink 83 86 key={topic.link} 84 87 topic={topic} 85 - style={a.rounded_full} 88 + style={enableSquareButtons ? a.rounded_sm : a.rounded_full} 86 89 onPress={() => { 87 90 logEvent('trendingTopic:click', {context: 'sidebar'}) 88 91 }}>