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 fceb655b3b)
* 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>
This commit is contained in:
@@ -3,7 +3,7 @@ import {LayoutAnimation, Pressable, View} from 'react-native'
|
||||
import {Linking} from 'react-native'
|
||||
import {useReducedMotion} from 'react-native-reanimated'
|
||||
import {type AppBskyActorDefs, moderateProfile} from '@atproto/api'
|
||||
import {msg, Trans} from '@lingui/macro'
|
||||
import {msg, t, Trans} from '@lingui/macro'
|
||||
import {useLingui} from '@lingui/react'
|
||||
import {useNavigation} from '@react-navigation/native'
|
||||
import {type NativeStackScreenProps} from '@react-navigation/native-stack'
|
||||
@@ -18,6 +18,7 @@ import {
|
||||
import {sanitizeDisplayName} from '#/lib/strings/display-names'
|
||||
import {sanitizeHandle} from '#/lib/strings/handles'
|
||||
import {useProfileShadow} from '#/state/cache/profile-shadow'
|
||||
import * as persisted from '#/state/persisted'
|
||||
import {clearStorage} from '#/state/persisted'
|
||||
import {useModerationOpts} from '#/state/preferences/moderation-opts'
|
||||
import {useDeleteActorDeclaration} from '#/state/queries/messages/actor-declaration'
|
||||
@@ -359,6 +360,17 @@ function DevOptions() {
|
||||
Toast.show(_(msg`Storage cleared, you need to restart the app now.`))
|
||||
}
|
||||
|
||||
const onPressUnsnoozeReminder = () => {
|
||||
const lastEmailConfirm = new Date()
|
||||
// wind back 3 days
|
||||
lastEmailConfirm.setDate(lastEmailConfirm.getDate() - 3)
|
||||
persisted.write('reminders', {
|
||||
...persisted.get('reminders'),
|
||||
lastEmailConfirm: lastEmailConfirm.toISOString(),
|
||||
})
|
||||
Toast.show(t`You probably want to restart the app now.`)
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<SettingsList.PressableItem
|
||||
@@ -396,6 +408,13 @@ function DevOptions() {
|
||||
<Trans>Reset onboarding state</Trans>
|
||||
</SettingsList.ItemText>
|
||||
</SettingsList.PressableItem>
|
||||
<SettingsList.PressableItem
|
||||
onPress={onPressUnsnoozeReminder}
|
||||
label={_(msg`Unsnooze email reminder`)}>
|
||||
<SettingsList.ItemText>
|
||||
<Trans>Unsnooze email reminder</Trans>
|
||||
</SettingsList.ItemText>
|
||||
</SettingsList.PressableItem>
|
||||
<SettingsList.PressableItem
|
||||
onPress={() => clearAllStorage()}
|
||||
label={_(msg`Clear all storage data`)}>
|
||||
|
||||
Reference in New Issue
Block a user