Skip to content

Commit 58d3ad8

Browse files
authored
Merge pull request #658 from topcoder-platform/accounts-app
MP-40 adds dice info tooltip when active -> dev
2 parents fce5a24 + 164ae79 commit 58d3ad8

File tree

2 files changed

+35
-12
lines changed

2 files changed

+35
-12
lines changed

src/apps/accounts/src/settings/tabs/account/security/Security.module.scss

+15-3
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,24 @@
2020
align-self: flex-start;
2121
}
2222

23-
.diceIdButton {
24-
align-self: center;
23+
.diceBtnWrap {
24+
display: flex;
25+
align-items: center;
26+
color: #767676;
2527

2628
@include ltelg {
2729
margin-top: $sp-4;
2830
}
31+
32+
.diceIdButton {
33+
align-self: center;
34+
}
35+
36+
svg {
37+
width: 24px;
38+
height: 24px;
39+
margin-left: $sp-2;
40+
}
2941
}
3042
}
31-
}
43+
}

src/apps/accounts/src/settings/tabs/account/security/Security.tsx

+20-9
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Dispatch, FC, SetStateAction, useEffect, useState } from 'react'
22
import { toast } from 'react-toastify'
33
import { KeyedMutator } from 'swr'
44

5-
import { Button, Collapsible, FormToggleSwitch } from '~/libs/ui'
5+
import { Button, Collapsible, FormToggleSwitch, IconOutline, Tooltip } from '~/libs/ui'
66
import { diceIdLogo, MFAImage, SettingSection } from '~/apps/accounts/src/lib'
77
import { MemberMFAStatus, updateMemberMFAStatusAsync, useMemberMFAStatus, UserProfile } from '~/libs/core'
88

@@ -82,14 +82,25 @@ const Security: FC<SecurityProps> = (props: SecurityProps) => {
8282
title='DICE ID Authenticator App'
8383
infoText='DICE ID authentication application.'
8484
actionElement={(
85-
<Button
86-
label='Setup DICE ID Authentication'
87-
secondary
88-
size='lg'
89-
className={styles.diceIdButton}
90-
onClick={handleDiceModalStatus}
91-
disabled={!mfaEnabled || mfaStatusData?.diceEnabled}
92-
/>
85+
<div className={styles.diceBtnWrap}>
86+
<Button
87+
label='Setup DICE ID Authentication'
88+
secondary
89+
size='lg'
90+
className={styles.diceIdButton}
91+
onClick={handleDiceModalStatus}
92+
disabled={!mfaEnabled || mfaStatusData?.diceEnabled}
93+
/>
94+
{
95+
mfaStatusData?.diceEnabled && (
96+
<Tooltip
97+
content='Please reach out to [email protected] for deactivating Dice ID.'
98+
>
99+
<IconOutline.InformationCircleIcon />
100+
</Tooltip>
101+
)
102+
}
103+
</div>
93104
)}
94105
/>
95106

0 commit comments

Comments
 (0)