diff options
author | Chenyu Huang <itschenyu@gmail.com> | 2025-08-08 15:33:45 -0700 |
---|---|---|
committer | Chenyu Huang <itschenyu@gmail.com> | 2025-08-16 19:45:43 -0700 |
commit | 7182cd3d5e157d7ad80f2e5c4a458730c46939a0 (patch) | |
tree | 55cc28836cd05c5fb0b1d2784d456faa28c9911e /src/view | |
parent | cced762a7fb7a2729b63922abc34ae5406a58bce (diff) | |
download | voidsky-7182cd3d5e157d7ad80f2e5c4a458730c46939a0.tar.zst |
starter pack dialog flow from profileMenu
Diffstat (limited to 'src/view')
-rw-r--r-- | src/view/com/profile/ProfileMenu.tsx | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/view/com/profile/ProfileMenu.tsx b/src/view/com/profile/ProfileMenu.tsx index 879bf22f9..569823da6 100644 --- a/src/view/com/profile/ProfileMenu.tsx +++ b/src/view/com/profile/ProfileMenu.tsx @@ -27,6 +27,7 @@ import {EventStopper} from '#/view/com/util/EventStopper' import * as Toast from '#/view/com/util/Toast' import {Button, ButtonIcon} from '#/components/Button' import {useDialogControl} from '#/components/Dialog' +import {StarterPackDialog} from '#/components/dialogs/StarterPackDialog' import {ArrowOutOfBoxModified_Stroke2_Corner2_Rounded as ArrowOutOfBoxIcon} from '#/components/icons/ArrowOutOfBox' import {ChainLink_Stroke2_Corner0_Rounded as ChainLinkIcon} from '#/components/icons/ChainLink' import {CircleCheck_Stroke2_Corner0_Rounded as CircleCheckIcon} from '#/components/icons/CircleCheck' @@ -45,6 +46,7 @@ import { } from '#/components/icons/Person' import {PlusLarge_Stroke2_Corner0_Rounded as Plus} from '#/components/icons/Plus' import {SpeakerVolumeFull_Stroke2_Corner0_Rounded as Unmute} from '#/components/icons/Speaker' +import {StarterPack} from '#/components/icons/StarterPack' import {EditLiveDialog} from '#/components/live/EditLiveDialog' import {GoLiveDialog} from '#/components/live/GoLiveDialog' import * as Menu from '#/components/Menu' @@ -88,6 +90,7 @@ let ProfileMenu = ({ const blockPromptControl = Prompt.usePromptControl() const loggedOutWarningPromptControl = Prompt.usePromptControl() const goLiveDialogControl = useDialogControl() + const addToStarterPacksDialogControl = useDialogControl() const showLoggedOutWarning = React.useMemo(() => { return ( @@ -301,6 +304,15 @@ let ProfileMenu = ({ </> )} <Menu.Item + testID="profileHeaderDropdownStarterPackAddRemoveBtn" + label={_(msg`Add to starter packs`)} + onPress={addToStarterPacksDialogControl.open}> + <Menu.ItemText> + <Trans>Add to starter packs</Trans> + </Menu.ItemText> + <Menu.ItemIcon icon={StarterPack} /> + </Menu.Item> + <Menu.Item testID="profileHeaderDropdownListAddRemoveBtn" label={_(msg`Add to lists`)} onPress={onPressAddRemoveLists}> @@ -440,6 +452,14 @@ let ProfileMenu = ({ </Menu.Outer> </Menu.Root> + {currentAccount && ( + <StarterPackDialog + control={addToStarterPacksDialogControl} + accountDid={currentAccount.did} + targetDid={profile.did} + /> + )} + <ReportDialog control={reportDialogControl} subject={{ |