diff options
author | Samuel Newman <mozzius@protonmail.com> | 2025-04-23 19:22:08 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-23 11:22:08 -0500 |
commit | 70dbc94766b8f3c9d2c1b815fad66232523d28ab (patch) | |
tree | 6c860d092c29b48f6dda9c58364f78a8ef07de2c /src/screens/Settings/AccountSettings.tsx | |
parent | 118d385b1010190542e58fba1d640f75714b6ea9 (diff) | |
download | voidsky-70dbc94766b8f3c9d2c1b815fad66232523d28ab.tar.zst |
Modernise change email flow (#8106)
* use new verify email dialog in 2fa flow * alf change email flow * Fallback change email dialog * Update ChangeEmailDialog.tsx Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com> * Update ChangeEmailDialog.tsx Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com> * Update ChangeEmailDialog.tsx Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com> * Update ChangeEmailDialog.tsx Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com> * Update ChangeEmailDialog.tsx Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com> * Update ChangeEmailDialog.tsx Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com> * Update ChangeEmailDialog.tsx Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com> * Update ChangeEmailDialog.tsx Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com> * Update Email2FAToggle.tsx Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com> * don't use existing email as default value * increase max width of email dialogs * Use ALF verify email dialog for reminder (#5924) * use new verify email dialog for reminder * style tweaks, improve web * add a lil toast * Apply suggestions from code review Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com> * Ditch close and push up image --------- Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com> Co-authored-by: Eric Bailey <git@esb.lol> * delete old change/verify email modals (#8122) (cherry picked from commit fceb655b3bacad1bce210810234137b7233d263d) * Translate email placeholder Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com> * Align copy * Clean up error handling --------- Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com> Co-authored-by: Eric Bailey <git@esb.lol>
Diffstat (limited to 'src/screens/Settings/AccountSettings.tsx')
-rw-r--r-- | src/screens/Settings/AccountSettings.tsx | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/screens/Settings/AccountSettings.tsx b/src/screens/Settings/AccountSettings.tsx index a69c5cdd3..7c50bd8df 100644 --- a/src/screens/Settings/AccountSettings.tsx +++ b/src/screens/Settings/AccountSettings.tsx @@ -9,6 +9,7 @@ import * as SettingsList from '#/screens/Settings/components/SettingsList' import {atoms as a, useTheme} from '#/alf' import {useDialogControl} from '#/components/Dialog' import {BirthDateSettingsDialog} from '#/components/dialogs/BirthDateSettings' +import {ChangeEmailDialog} from '#/components/dialogs/ChangeEmailDialog' import {VerifyEmailDialog} from '#/components/dialogs/VerifyEmailDialog' import {At_Stroke2_Corner2_Rounded as AtIcon} from '#/components/icons/At' import {BirthdayCake_Stroke2_Corner2_Rounded as BirthdayCakeIcon} from '#/components/icons/BirthdayCake' @@ -31,6 +32,7 @@ export function AccountSettingsScreen({}: Props) { const {currentAccount} = useSession() const {openModal} = useModalControls() const verifyEmailControl = useDialogControl() + const changeEmailControl = useDialogControl() const birthdayControl = useDialogControl() const changeHandleControl = useDialogControl() const exportCarControl = useDialogControl() @@ -95,7 +97,7 @@ export function AccountSettingsScreen({}: Props) { )} <SettingsList.PressableItem label={_(msg`Change email`)} - onPress={() => openModal({name: 'change-email'})}> + onPress={() => changeEmailControl.open()}> <SettingsList.ItemIcon icon={PencilIcon} /> <SettingsList.ItemText> <Trans>Change email</Trans> @@ -165,7 +167,14 @@ export function AccountSettingsScreen({}: Props) { </SettingsList.Container> </Layout.Content> - <VerifyEmailDialog control={verifyEmailControl} /> + <ChangeEmailDialog + control={changeEmailControl} + verifyEmailControl={verifyEmailControl} + /> + <VerifyEmailDialog + control={verifyEmailControl} + changeEmailControl={changeEmailControl} + /> <BirthDateSettingsDialog control={birthdayControl} /> <ChangeHandleDialog control={changeHandleControl} /> <ExportCarDialog control={exportCarControl} /> |