Skip to content

MP-40 adds dice info tooltip when active -> dev #658

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 15, 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
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,24 @@
align-self: flex-start;
}

.diceIdButton {
align-self: center;
.diceBtnWrap {
display: flex;
align-items: center;
color: #767676;

@include ltelg {
margin-top: $sp-4;
}

.diceIdButton {
align-self: center;
}

svg {
width: 24px;
height: 24px;
margin-left: $sp-2;
}
}
}
}
}
29 changes: 20 additions & 9 deletions src/apps/accounts/src/settings/tabs/account/security/Security.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Dispatch, FC, SetStateAction, useEffect, useState } from 'react'
import { toast } from 'react-toastify'
import { KeyedMutator } from 'swr'

import { Button, Collapsible, FormToggleSwitch } from '~/libs/ui'
import { Button, Collapsible, FormToggleSwitch, IconOutline, 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 @@ -82,14 +82,25 @@ const Security: FC<SecurityProps> = (props: SecurityProps) => {
title='DICE ID Authenticator App'
infoText='DICE ID authentication application.'
actionElement={(
<Button
label='Setup DICE ID Authentication'
secondary
size='lg'
className={styles.diceIdButton}
onClick={handleDiceModalStatus}
disabled={!mfaEnabled || mfaStatusData?.diceEnabled}
/>
<div className={styles.diceBtnWrap}>
<Button
label='Setup DICE ID Authentication'
secondary
size='lg'
className={styles.diceIdButton}
onClick={handleDiceModalStatus}
disabled={!mfaEnabled || mfaStatusData?.diceEnabled}
/>
{
mfaStatusData?.diceEnabled && (
<Tooltip
content='Please reach out to support@topcoder.com for deactivating Dice ID.'
>
<IconOutline.InformationCircleIcon />
</Tooltip>
)
}
</div>
)}
/>

Expand Down