Skip to content

MP-40 QA fixes -> dev #666

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 22 additions & 10 deletions src/apps/accounts/src/settings/tabs/account/security/Security.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { Dispatch, FC, SetStateAction, useEffect, useState } from 'react'
import { toast } from 'react-toastify'
import { KeyedMutator } from 'swr'
import { noop } from 'lodash'

import { Button, Collapsible, FormToggleSwitch, IconOutline, Tooltip } from '~/libs/ui'
import { Button, Collapsible, FormToggleSwitch, IconSolid, Tooltip } from '~/libs/ui'
import { diceIdLogo, MFAImage, SettingSection } from '~/apps/accounts/src/lib'
import { MemberMFAStatus, updateMemberMFAStatusAsync, useMemberMFAStatus, UserProfile } from '~/libs/core'

Expand Down Expand Up @@ -83,20 +84,31 @@ const Security: FC<SecurityProps> = (props: SecurityProps) => {
infoText='DICE ID authentication application.'
actionElement={(
<div className={styles.diceBtnWrap}>
<Button
label='Setup DICE ID Authentication'
secondary
size='lg'
className={styles.diceIdButton}
onClick={handleDiceModalStatus}
disabled={!mfaEnabled || mfaStatusData?.diceEnabled}
/>
{
!mfaStatusData?.diceEnabled ? (
<FormToggleSwitch
name='diceEnabled'
onChange={noop}
value={mfaStatusData?.diceEnabled as boolean}
disabled={mfaStatusData?.diceEnabled}
/>
) : (
<Button
label='Setup DICE ID Authentication'
secondary
size='lg'
className={styles.diceIdButton}
onClick={handleDiceModalStatus}
disabled={!mfaEnabled}
/>
)
}
{
mfaStatusData?.diceEnabled && (
<Tooltip
content='Please reach out to support@topcoder.com for deactivating Dice ID.'
>
<IconOutline.InformationCircleIcon />
<IconSolid.InformationCircleIcon />
</Tooltip>
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ const DiceSetupModal: FC<DiceSetupModalProps> = (props: DiceSetupModalProps) =>
https://www.diceid.com
</a>
</p>
<p>Please click Finish bellow.</p>
<p>Please click Finish below.</p>
</>
)
}
Expand All @@ -293,7 +293,7 @@ const DiceSetupModal: FC<DiceSetupModalProps> = (props: DiceSetupModalProps) =>
<br />
<br />
</p>
<p>Please click Finish bellow.</p>
<p>Please click Finish below.</p>
</>
)
}
Expand Down