Email verification and change flows (#1560)

* fix 'Reposted by' text overflow

* Add email verification flow

* Implement change email flow

* Add verify email reminder on load

* Bump @atproto/api@0.6.20

* Trim the inputs

* Accessibility fixes

* Fix typo

* Fix: include the day in the sharding check

* Update auto behaviors

* Update yarn.lock

* Temporary error message

---------

Co-authored-by: Eric Bailey <git@esb.lol>
This commit is contained in:
Paul Frazee
2023-09-28 12:08:00 -07:00
committed by GitHub
parent 16763d1d41
commit cd3b0e54fb
14 changed files with 855 additions and 15 deletions
+22
View File
@@ -24,6 +24,7 @@ export interface ConfirmModal {
onPressCancel?: () => void | Promise<void>
confirmBtnText?: string
confirmBtnStyle?: StyleProp<ViewStyle>
cancelBtnText?: string
}
export interface EditProfileModal {
@@ -140,6 +141,15 @@ export interface BirthDateSettingsModal {
name: 'birth-date-settings'
}
export interface VerifyEmailModal {
name: 'verify-email'
showReminder?: boolean
}
export interface ChangeEmailModal {
name: 'change-email'
}
export type Modal =
// Account
| AddAppPasswordModal
@@ -148,6 +158,8 @@ export type Modal =
| EditProfileModal
| ProfilePreviewModal
| BirthDateSettingsModal
| VerifyEmailModal
| ChangeEmailModal
// Curation
| ContentFilteringSettingsModal
@@ -250,6 +262,7 @@ export class ShellUiModel {
})
this.setupClock()
this.setupLoginModals()
}
serialize(): unknown {
@@ -375,4 +388,13 @@ export class ShellUiModel {
})
}, 60_000)
}
setupLoginModals() {
this.rootStore.onSessionReady(() => {
if (this.rootStore.reminders.shouldRequestEmailConfirmation) {
this.openModal({name: 'verify-email', showReminder: true})
this.rootStore.reminders.setEmailConfirmationRequested()
}
})
}
}