Skip to content

Commit c23e977

Browse files
committed
mfa fixes
1 parent b1e60dc commit c23e977

File tree

4 files changed

+56
-56
lines changed

4 files changed

+56
-56
lines changed
Loading

src/assets/images/account/security/google-play.svg

Lines changed: 0 additions & 46 deletions
This file was deleted.

src/shared/components/Settings/Account/Security/index.jsx

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { SettingBannerV2 as Collapse } from 'components/Settings/SettingsBanner'
77
import MfaImage from 'assets/images/account/security/mfa.svg';
88
import DiceLogo from 'assets/images/account/security/dicelogo.png';
99
import DiceLogoBig from 'assets/images/account/security/dicelogobig.png';
10-
import GooglePlay from 'assets/images/account/security/google-play.svg';
10+
import GooglePlay from 'assets/images/account/security/google-play.png';
1111
import AppleStore from 'assets/images/account/security/apple-store.svg';
1212
import UnsuccessfulIcon from 'assets/images/account/security/unsuccessful.svg';
1313
import Modal from './Modal';
@@ -163,7 +163,7 @@ export default function Security({
163163
</div>
164164
<div styleName="app-store">
165165
<div styleName="market">
166-
<a href="https://play.google.com/store/apps/details?id=com.diwallet1" target="_blank" rel="noreferrer"><GooglePlay /></a>
166+
<a href="https://play.google.com/store/apps/details?id=com.diwallet1" target="_blank" rel="noreferrer"><img src={GooglePlay} alt="Google Play Store" /></a>
167167
<QRCode size={190} value="https://play.google.com/store/apps/details?id=com.diwallet1" />
168168
</div>
169169
<div styleName="market">
@@ -201,6 +201,7 @@ export default function Security({
201201
<div styleName="step-content">
202202
Once the connection is established, the service will offer you a Verifiable Credential.
203203
<br />Press the ACCEPT button in your DICE ID App.
204+
<br />If you DECLINE the invitation, please try again after 5 minutes.
204205
</div>
205206
</div>
206207
</Modal>,
@@ -303,8 +304,27 @@ export default function Security({
303304
Security
304305
</h2>
305306
<div styleName="factor-container">
306-
<div styleName="icon-wrapper">
307-
<MfaImage />
307+
<div styleName="first-line">
308+
<div styleName="icon-wrapper">
309+
<MfaImage />
310+
</div>
311+
<div className="onoffswitch" styleName="mfa-switch-mobile">
312+
<input
313+
type="checkbox"
314+
name="eprf-onoffswitch"
315+
id="pre-onoffswitch-mfa"
316+
value="mfaEnabled"
317+
checked={mfaChecked}
318+
onChange={onUpdateMfaOption}
319+
className="onoffswitch-checkbox"
320+
disabled={mfaChecked && diceChecked}
321+
/>
322+
<label htmlFor="pre-onoffswitch-mfa" className="onoffswitch-label" styleName={mfaChecked && diceChecked ? 'disabled-toggle' : ''}>
323+
<span className="onoffswitch-inner" />
324+
<span className="onoffswitch-switch" />
325+
<input type="hidden" />
326+
</label>
327+
</div>
308328
</div>
309329
<div styleName="info">
310330
<div styleName="info-first-line">
@@ -315,7 +335,7 @@ export default function Security({
315335
If enabled, MFA will be enforced during the Topcoder login process.
316336
</div>
317337
</div>
318-
<div className="onoffswitch" styleName="on-off-switch">
338+
<div className="onoffswitch" styleName="mfa-switch">
319339
<input
320340
type="checkbox"
321341
name="eprf-onoffswitch"
@@ -350,7 +370,7 @@ export default function Security({
350370
</div>
351371
{diceChecked
352372
? (
353-
<div className="onoffswitch">
373+
<div className="onoffswitch" styleName="dice-switch">
354374
<input
355375
type="checkbox"
356376
name="pre-onoffswitch-dice"

src/shared/components/Settings/Account/Security/styles.scss

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,17 @@
4040
margin-top: 24px;
4141
}
4242

43+
.first-line {
44+
display: flex;
45+
flex-direction: row;
46+
justify-content: space-between;
47+
width: auto;
48+
49+
@media (max-width: #{$screen-md - 1px}) {
50+
width: 100%;
51+
}
52+
}
53+
4354
.icon-wrapper {
4455
display: flex;
4556
align-items: center;
@@ -107,15 +118,30 @@
107118
}
108119
}
109120

110-
.on-off-switch {
121+
.mfa-switch {
122+
display: unset;
123+
111124
@media (max-width: #{$screen-md - 1px}) {
112-
display: block;
113-
position: absolute;
114-
align-self: flex-end;
125+
display: none;
126+
}
127+
}
128+
129+
.mfa-switch-mobile {
130+
display: none;
131+
132+
@media (max-width: #{$screen-md - 1px}) {
133+
display: unset;
134+
align-self: flex-start;
115135
margin-top: 10px;
116136
}
117137
}
118138

139+
.dice-switch {
140+
@media (max-width: #{$screen-md - 1px}) {
141+
display: none;
142+
}
143+
}
144+
119145
.disabled-toggle {
120146
cursor: not-allowed;
121147
background-color: #7fb5a6 !important;

0 commit comments

Comments
 (0)