Skip to content

Commit

Permalink
fix: mfa mobile scroll (#463)
Browse files Browse the repository at this point in the history
  • Loading branch information
filipslezaklab authored Dec 6, 2023
1 parent 9c2cf43 commit 6dfa4b3
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 65 deletions.
4 changes: 2 additions & 2 deletions web/src/pages/auth/MFARoute/MFANav/MFANav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const MFANav = () => {

const totpRoute = useMatch('/auth/mfa/totp');
const web3Route = useMatch('/auth/mfa/web3');
const webAuthNRoute = useMatch('/auth/mfa/webautn');
const webAuthNRoute = useMatch('/auth/mfa/webauthn');
const emailRoute = useMatch('/auth/mfa/email');
const recoveryRoute = useMatch('/auth/mfa/recovery');

Expand Down Expand Up @@ -104,7 +104,7 @@ export const MFANav = () => {
onClick={() => navigate(link.link, { replace: true })}
/>
))}
{!recoveryRoute !== null && (
{!recoveryRoute && (
<Button
text={LL.loginPage.mfa.controls.useRecoveryCode()}
size={ButtonSize.LARGE}
Expand Down
67 changes: 29 additions & 38 deletions web/src/pages/auth/MFARoute/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,77 +3,68 @@
#auth-container {
#mfa {
display: flex;
flex-flow: column nowrap;
flex-flow: column;
align-content: center;
justify-content: center;
align-items: center;
gap: 0;
gap: 24px;
height: 100%;
width: 100%;
box-sizing: border-box;
padding: 3rem 1.5rem;
padding: 15px 10px 30px 10px;

> h1 {
@include typography-legacy(28px, 39px, semiBold, var(--text-main), 'Poppins');

margin-bottom: 1.5rem;

@include media-breakpoint-up(md) {
margin-bottom: 2.7rem;
}
h1 {
@include typography(app-welcome-1);
color: var(--text-body-primary);
width: 100%;
text-align: center;
}

& > p {
@include regular-text;
@include typography(welcome-h2);

color: var(--gray-dark);
margin-bottom: 1.5rem;
line-height: 25px;
max-width: 334px;
text-align: center;

@include media-breakpoint-up(md) {
margin-bottom: 2.7rem;
}
width: 100%;
max-width: 334px;
}

.btn {
width: 284px;
min-width: 284px;

height: 50px;
min-height: 50px;

span,
p {
font-family: Roboto;
@include typography(app-button-l);
}
}

nav,
form {
width: 284px;
display: flex;
flex-flow: column;
align-items: center;
justify-content: flex-start;
gap: 24px;
min-width: 284px;

& > * {
min-width: 284px;
padding: 0;
margin: 0;
}
}

& > nav {
margin-top: 2.4rem;

& > span {
@include typography-legacy(12px, 14px, regular, var(--gray-light));
@include typography(app-modal-1);
color: var(--text-body-tertiary);

display: block;
width: 100%;
text-align: center;
margin-bottom: 2rem;
}

.btn {
margin-bottom: 2rem;
}
}

& > form {
.btn {
&:not(:last-child) {
margin-bottom: 2.4rem;
}
}
}
}
Expand Down
35 changes: 24 additions & 11 deletions web/src/pages/auth/style.scss
Original file line number Diff line number Diff line change
@@ -1,26 +1,36 @@
@use '../../shared/scss/helpers' as *;

#auth-container {
background-color: var(--bg-light);
background-color: var(--surface-frame-bg);
display: flex;
min-height: 100vh;
min-width: 100%;
display: inline-grid;
grid-auto-flow: row dense;
grid-template-rows: 1fr;
grid-auto-columns: 1fr;
align-content: center;
justify-content: center;
align-items: center;
justify-items: center;
min-height: 100dvh;
max-height: 100vh;
max-height: 100dvh;
overflow: auto;
@include media-breakpoint-up(lg) {
min-height: 100vh;
min-width: 100%;
max-height: 100vh;
height: max-content;
display: grid;
grid-template-rows: 100%;
grid-template-columns: 1fr 1fr;
align-content: center;
justify-content: center;
align-items: center;
justify-items: center;
}

.logo-container {
grid-row: 1;
grid-column: 1;
display: none;
flex-direction: column;
align-content: center;
align-items: center;
justify-content: center;
background-color: var(--primary);
background-color: var(--surface-main-primary);
flex-grow: 1;
flex-shrink: 0;
width: 100%;
Expand All @@ -39,6 +49,9 @@
& > section {
display: flex;
width: 100%;
height: 100%;
max-height: 100%;
grid-row: 1;
grid-column: 2;
}
}
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
@use '../../../../../../shared/scss/helpers' as *;

#manage-webauthn-modal {
padding-bottom: 2.6rem;
padding-bottom: 26px;

& > .content {
& > .message-box {
box-sizing: border-box;
min-height: 70px;
margin-bottom: 2rem;
margin-bottom: 20px;

@include media-breakpoint-up(lg) {
width: calc(100% - 6rem);
margin: 0 3rem 3.4rem;
width: calc(100% - 60px);
margin: 0 30px 34px;
}
}

Expand All @@ -21,15 +21,15 @@
box-sizing: border-box;

@include media-breakpoint-down(lg) {
padding: 0 1.5rem;
row-gap: 1rem;
margin-bottom: 3rem;
padding: 0 15px;
row-gap: 10px;
margin-bottom: 30px;
}

@include media-breakpoint-up(lg) {
padding: 0 3rem;
row-gap: 2rem;
margin-bottom: 3.4rem;
padding: 0 30px;
row-gap: 20px;
margin-bottom: 34px;
}

& > .row-box {
Expand All @@ -40,10 +40,10 @@
align-items: center;
align-content: start;
justify-content: start;
padding: 0;
padding: 0 20px;
box-sizing: border-box;

& > :nth-child(1) {
margin-left: 2rem;
width: 22px;
height: 22px;
}
Expand All @@ -55,8 +55,11 @@
color: #444a4e;
}

& > :nth-child(3) {
margin-left: 2rem;
.btn {
padding: 0;
width: 40px;
height: 40px;
justify-self: flex-end;
}
}
}
Expand Down

0 comments on commit 6dfa4b3

Please sign in to comment.