Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: open profile/repo in PDSls

Ben C 7652d1ac 3b1907bd

+34
+34
src/view/com/profile/ProfileMenu.tsx
··· 10 10 import {makeProfileLink} from '#/lib/routes/links' 11 11 import {type NavigationProp} from '#/lib/routes/types' 12 12 import {shareText, shareUrl} from '#/lib/sharing' 13 + import {useOpenLink} from '#/lib/hooks/useOpenLink' 13 14 import {toShareUrl, toShareUrlBsky} from '#/lib/strings/url-helpers' 14 15 import {type Shadow} from '#/state/cache/types' 15 16 import {useModalControls} from '#/state/modals' ··· 50 51 } from '#/components/icons/Person' 51 52 import {PlusLarge_Stroke2_Corner0_Rounded as Plus} from '#/components/icons/Plus' 52 53 import {SpeakerVolumeFull_Stroke2_Corner0_Rounded as Unmute} from '#/components/icons/Speaker' 54 + import {SquareArrowTopRight_Stroke2_Corner0_Rounded as ExternalIcon} from '#/components/icons/SquareArrowTopRight' 53 55 import {StarterPack} from '#/components/icons/StarterPack' 54 56 import * as Menu from '#/components/Menu' 55 57 import { ··· 70 72 import {Dot} from '#/features/nuxs/components/Dot' 71 73 import {Gradient} from '#/features/nuxs/components/Gradient' 72 74 import {useDevMode} from '#/storage/hooks/dev-mode' 75 + import { useShowExternalShareButtons } from '#/state/preferences/external-share-buttons' 73 76 74 77 let ProfileMenu = ({ 75 78 profile, ··· 118 121 const goLiveDialogControl = useDialogControl() 119 122 const goLiveDisabledDialogControl = useDialogControl() 120 123 const addToStarterPacksDialogControl = useDialogControl() 124 + 125 + const showExternalShareButtons = useShowExternalShareButtons() 126 + const openLink = useOpenLink() 121 127 122 128 const showLoggedOutWarning = useMemo(() => { 123 129 return ( ··· 256 262 navigation.navigate('ProfileSearch', {name: profile.handle}) 257 263 }, [navigation, profile.handle]) 258 264 265 + const onOpenProfileInPdsls = () => { 266 + openLink(`https://pdsls.dev/at://${profile.did}/app.bsky.actor.profile/self`, true) 267 + } 268 + 269 + const onOpenRepoInPdsls = () => { 270 + openLink(`https://pdsls.dev/at://${profile.did}`, true) 271 + } 272 + 259 273 const verificationCreatePromptControl = Prompt.usePromptControl() 260 274 const verificationRemovePromptControl = Prompt.usePromptControl() 261 275 const currentAccountVerifications = ··· 347 361 icon={IS_WEB ? ChainLinkIcon : ArrowOutOfBoxIcon} 348 362 /> 349 363 </Menu.Item> 364 + {showExternalShareButtons && <> 365 + <Menu.Item 366 + testID="profileDropdownOpenProfileInPdsls" 367 + label={_(msg`Open profile in PDSls`)} 368 + onPress={onOpenProfileInPdsls}> 369 + <Menu.ItemText> 370 + <Trans>Open profile in PDSls</Trans> 371 + </Menu.ItemText> 372 + <Menu.ItemIcon icon={ExternalIcon} position="right" /> 373 + </Menu.Item> 374 + <Menu.Item 375 + testID="profileDropdownOpenRepoInPdsls" 376 + label={_(msg`Open repo in PDSls`)} 377 + onPress={onOpenRepoInPdsls}> 378 + <Menu.ItemText> 379 + <Trans>Open repo in PDSls</Trans> 380 + </Menu.ItemText> 381 + <Menu.ItemIcon icon={ExternalIcon} position="right" /> 382 + </Menu.Item> 383 + </>} 350 384 <Menu.Item 351 385 testID="profileHeaderDropdownSearchBtn" 352 386 label={_(msg`Search posts`)}