Skip to content

Commit

Permalink
Revert "Update the email verification dialog (#5663)"
Browse files Browse the repository at this point in the history
This reverts commit 2ebe8f4.
  • Loading branch information
haileyok committed Oct 12, 2024
1 parent 968eece commit 6550029
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 276 deletions.
254 changes: 0 additions & 254 deletions src/components/dialogs/VerifyEmailDialog.tsx

This file was deleted.

37 changes: 19 additions & 18 deletions src/view/com/composer/videos/SelectVideoBtn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@ import {useVideoLibraryPermission} from '#/lib/hooks/usePermissions'
import {getHostnameFromUrl} from '#/lib/strings/url-helpers'
import {isWeb} from '#/platform/detection'
import {isNative} from '#/platform/detection'
import {useModalControls} from '#/state/modals'
import {useSession} from '#/state/session'
import {atoms as a, useTheme} from '#/alf'
import {Button} from '#/components/Button'
import {useDialogControl} from '#/components/Dialog'
import {VerifyEmailDialog} from '#/components/dialogs/VerifyEmailDialog'
import {VideoClip_Stroke2_Corner0_Rounded as VideoClipIcon} from '#/components/icons/VideoClip'
import * as Prompt from '#/components/Prompt'

Expand Down Expand Up @@ -122,24 +121,26 @@ export function SelectVideoBtn({onSelectVideo, disabled, setError}: Props) {

function VerifyEmailPrompt({control}: {control: Prompt.PromptControlProps}) {
const {_} = useLingui()
const verifyEmailDialogControl = useDialogControl()
const {openModal} = useModalControls()

return (
<>
<Prompt.Basic
control={control}
title={_(msg`Verified email required`)}
description={_(
msg`To upload videos to Bluesky, you must first verify your email.`,
)}
confirmButtonCta={_(msg`Verify now`)}
confirmButtonColor="primary"
onConfirm={() => {
verifyEmailDialogControl.open()
}}
/>
<VerifyEmailDialog control={verifyEmailDialogControl} />
</>
<Prompt.Basic
control={control}
title={_(msg`Verified email required`)}
description={_(
msg`To upload videos to Bluesky, you must first verify your email.`,
)}
confirmButtonCta={_(msg`Verify now`)}
confirmButtonColor="primary"
onConfirm={() => {
control.close(() => {
openModal({
name: 'verify-email',
showReminder: false,
})
})
}}
/>
)
}

Expand Down
6 changes: 2 additions & 4 deletions src/view/screens/Settings/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ import {DeactivateAccountDialog} from '#/screens/Settings/components/DeactivateA
import {atoms as a, useTheme} from '#/alf'
import {useDialogControl} from '#/components/Dialog'
import {BirthDateSettingsDialog} from '#/components/dialogs/BirthDateSettings'
import {VerifyEmailDialog} from '#/components/dialogs/VerifyEmailDialog'
import {Email2FAToggle} from './Email2FAToggle'
import {ExportCarDialog} from './ExportCarDialog'

Expand Down Expand Up @@ -928,7 +927,7 @@ function EmailConfirmationNotice() {
const palInverted = usePalette('inverted')
const {_} = useLingui()
const {isMobile} = useWebMediaQueries()
const verifyEmailDialogControl = useDialogControl()
const {openModal} = useModalControls()

return (
<View style={{marginBottom: 20}}>
Expand Down Expand Up @@ -960,7 +959,7 @@ function EmailConfirmationNotice() {
accessibilityRole="button"
accessibilityLabel={_(msg`Verify my email`)}
accessibilityHint={_(msg`Opens modal for email verification`)}
onPress={() => verifyEmailDialogControl.open()}>
onPress={() => openModal({name: 'verify-email'})}>
<FontAwesomeIcon
icon="envelope"
color={palInverted.colors.text}
Expand All @@ -975,7 +974,6 @@ function EmailConfirmationNotice() {
<Trans>Protect your account by verifying your email.</Trans>
</Text>
</View>
<VerifyEmailDialog control={verifyEmailDialogControl} />
</View>
)
}
Expand Down

0 comments on commit 6550029

Please sign in to comment.