Add new state
This commit is contained in:
@@ -13,13 +13,11 @@ import {useRefreshSession} from '#/components/dialogs/EmailDialog/data/useRefres
|
|||||||
*/
|
*/
|
||||||
import {Update} from '#/components/dialogs/EmailDialog/screens/Update'
|
import {Update} from '#/components/dialogs/EmailDialog/screens/Update'
|
||||||
import {Verify} from '#/components/dialogs/EmailDialog/screens/Verify'
|
import {Verify} from '#/components/dialogs/EmailDialog/screens/Verify'
|
||||||
import {type Screen,ScreenID} from '#/components/dialogs/EmailDialog/types'
|
import {type Screen, ScreenID} from '#/components/dialogs/EmailDialog/types'
|
||||||
|
|
||||||
export {useDialogControl} from '#/components/Dialog'
|
export {useDialogControl} from '#/components/Dialog'
|
||||||
export {
|
export type {Screen} from '#/components/dialogs/EmailDialog/types'
|
||||||
ScreenID as EmailDialogScreenID,
|
export {ScreenID as EmailDialogScreenID} from '#/components/dialogs/EmailDialog/types'
|
||||||
type Screen,
|
|
||||||
} from '#/components/dialogs/EmailDialog/types'
|
|
||||||
|
|
||||||
export function useEmailDialogControl() {
|
export function useEmailDialogControl() {
|
||||||
return useStatefulDialogControl<Screen>()
|
return useStatefulDialogControl<Screen>()
|
||||||
|
|||||||
@@ -17,8 +17,16 @@ export type Screen =
|
|||||||
instructions?: ReactNode[]
|
instructions?: ReactNode[]
|
||||||
hideInitialCodeButton?: boolean
|
hideInitialCodeButton?: boolean
|
||||||
}
|
}
|
||||||
|
| {
|
||||||
|
id: ScreenID.Enable2FA
|
||||||
|
}
|
||||||
|
| {
|
||||||
|
id: ScreenID.Disable2FA
|
||||||
|
}
|
||||||
|
|
||||||
export enum ScreenID {
|
export enum ScreenID {
|
||||||
Update = 'Update', // normal, instructs to click link first
|
Update = 'Update',
|
||||||
Verify = 'Verify', // as a separate step, instructs to click link first
|
Verify = 'Verify',
|
||||||
|
Enable2FA = 'Enable2FA',
|
||||||
|
Disable2FA = 'Disable2FA',
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user