) => {
const { ui, client } = useStore();
+ const { isDesktop } = useDevice();
const { has_any_real_account, is_virtual } = client;
const { setMobileLanguageMenuOpen, toggleReadyToDepositModal, toggleNeedRealAccountForCashierModal } = ui;
const real_account_needed_for_cashier = useIsRealAccountNeededForCashier();
const is_trade_text = text === localize('Trade');
const deriv_static_url = getStaticUrl(link_to);
const traders_hub_path = window.location.pathname === routes.traders_hub;
- const is_languages_link_on_mobile = isMobile() && link_to === routes.languages;
+ const is_languages_link_on_responsive = !isDesktop && link_to === routes.languages;
const is_external_link = deriv_static_url && isExternalLink(link_to);
const is_cashier_link = [
routes.cashier_deposit,
@@ -49,7 +51,7 @@ const MenuLink = observer(
if (is_hidden) return null;
- if (is_languages_link_on_mobile) {
+ if (is_languages_link_on_responsive) {
return (
moduleLoader(() =>
- import(
- /* webpackChunkName: "trading-assessment-existing-user-modal" */ './trading-assessment-existing-user.jsx'
- )
+ import(/* webpackChunkName: "trading-assessment-existing-user-modal" */ './trading-assessment-existing-user')
)
);
diff --git a/packages/core/src/App/Containers/Modals/trading-assessment-existing-user/index.js b/packages/core/src/App/Containers/Modals/trading-assessment-existing-user/index.js
new file mode 100644
index 000000000000..9c842b78610a
--- /dev/null
+++ b/packages/core/src/App/Containers/Modals/trading-assessment-existing-user/index.js
@@ -0,0 +1,3 @@
+import TradingAssessmentExistingUser from './trading-assessment-existing-user';
+
+export default TradingAssessmentExistingUser;
diff --git a/packages/core/src/App/Containers/Modals/trading-assessment-existing-user.jsx b/packages/core/src/App/Containers/Modals/trading-assessment-existing-user/trading-assessment-existing-user.jsx
similarity index 94%
rename from packages/core/src/App/Containers/Modals/trading-assessment-existing-user.jsx
rename to packages/core/src/App/Containers/Modals/trading-assessment-existing-user/trading-assessment-existing-user.jsx
index 14bc7e3be1ad..004a3e1dd2bb 100644
--- a/packages/core/src/App/Containers/Modals/trading-assessment-existing-user.jsx
+++ b/packages/core/src/App/Containers/Modals/trading-assessment-existing-user/trading-assessment-existing-user.jsx
@@ -1,16 +1,18 @@
import React from 'react';
-import { Modal, DesktopWrapper, MobileDialog, MobileWrapper } from '@deriv/components';
+import { Modal, MobileDialog } from '@deriv/components';
import { Localize, localize } from '@deriv/translations';
import TradingAssessmentForm from '@deriv/account/src/Components/trading-assessment/trading-assessment-form';
import tradingAssessmentConfig from '@deriv/account/src/Configs/trading-assessment-config';
import RiskToleranceWarningModal from '@deriv/account/src/Components/trading-assessment/risk-tolerance-warning-modal';
-import TradingExperienceModal from './trading-experience-modal.jsx';
+import TradingExperienceModal from '../trading-experience-modal';
+import './trading-assessment-existing-user.scss';
import { observer, useStore } from '@deriv/stores';
-import 'Sass/details-form.scss';
+import { useDevice } from '@deriv-com/ui';
const TradingAssessmentExistingUser = observer(() => {
// Get the Trading assessment questions and initial_value
const { client, ui } = useStore();
+ const { isDesktop } = useDevice();
const {
setFinancialAndTradingAssessment,
updateAccountStatus,
@@ -97,7 +99,7 @@ const TradingAssessmentExistingUser = observer(() => {
} else if (should_show_trade_assessment_form) {
return (
-
+ {isDesktop ? (
{
should_move_to_next={should_move_to_next}
/>
-
-
+ ) : (
{
setSubSectionIndex={setSubSectionIndex}
class_name='trading-assessment--existing-user'
should_move_to_next={should_move_to_next}
+ is_responsive={!isDesktop}
/>
-
+ )}
);
}
diff --git a/packages/core/src/App/Containers/Modals/trading-assessment-existing-user/trading-assessment-existing-user.scss b/packages/core/src/App/Containers/Modals/trading-assessment-existing-user/trading-assessment-existing-user.scss
new file mode 100644
index 000000000000..b22ee3d24261
--- /dev/null
+++ b/packages/core/src/App/Containers/Modals/trading-assessment-existing-user/trading-assessment-existing-user.scss
@@ -0,0 +1,210 @@
+.dc-modal__container {
+ &_real-account-signup-modal {
+ display: flex;
+ flex-direction: column;
+ transition: all 0.3s ease-in-out;
+ @include tablet-screen {
+ max-height: calc(100vh - 10.2rem) !important; // Header and footer
+ }
+ background-color: var(--general-main-1);
+
+ .dc-modal-header__title {
+ text-transform: none;
+ border-top-left-radius: 1rem;
+ }
+
+ & .dc-themed-scrollbars {
+ height: 100%;
+ }
+ }
+ &_center-risk-modal {
+ .dc-modal {
+ &-header {
+ border-bottom: 1px solid var(--general-section-1);
+ }
+ &-body {
+ text-align: center;
+ padding: 2.4rem 2.4rem 0rem;
+ @include mobile-or-tablet-screen {
+ padding: 1.6rem 1.6rem 0rem;
+ }
+ .risk-acceptance__text {
+ margin-top: 2.4rem;
+ }
+ .verified-account__text {
+ margin-top: 2.4rem;
+ }
+ }
+ &-footer {
+ justify-content: center;
+ }
+ }
+ }
+}
+
+.dc-modal-header--real-account-signup-modal {
+ border-bottom: 1px solid var(--general-section-1);
+}
+
+.dc-mobile-dialog--enter-done .dc-mobile-dialog__content {
+ transform: none;
+}
+
+.trading-assessment {
+ display: flex;
+ flex-direction: column;
+
+ .dc-radio-group {
+ flex-direction: column;
+ align-items: flex-start;
+ }
+
+ @include mobile-or-tablet-screen {
+ height: calc(100vh - 16rem);
+ overflow: auto;
+ }
+
+ &--existing-user {
+ @include desktop-screen {
+ margin-top: 9.2rem;
+ }
+
+ @include mobile-or-tablet-screen {
+ height: calc(100vh - 12rem);
+ .trading-assessment__side-note {
+ padding: 2.2rem 1.6rem;
+ }
+ }
+ }
+
+ &__wrapper__dropdown--list--display {
+ height: 4rem;
+ }
+
+ &__side-note {
+ text-align: justify;
+ padding: 0 10rem;
+
+ @include mobile-or-tablet-screen {
+ padding: 0 1.6rem;
+ }
+ }
+
+ &__question-counter {
+ margin: 2.4rem 0 0;
+ padding-inline-start: 12rem;
+
+ @include mobile-or-tablet-screen {
+ padding-inline-start: 1.6rem;
+ }
+ }
+
+ &__form {
+ margin-top: 1.6rem;
+ display: grid;
+ grid-template-rows: 4.7fr 1fr;
+
+ &--existing_user {
+ grid-template-rows: 5.8fr 1fr;
+ }
+
+ &--layout {
+ grid-template-rows: 35rem 1fr !important;
+ }
+
+ &--fields {
+ display: flex;
+ padding: 0 10rem;
+
+ @include mobile-or-tablet-screen {
+ padding: 0 1.6rem;
+ }
+ }
+
+ .dc-themed-scrollbars {
+ width: 100%;
+ }
+
+ .dc-dropdown__display .dc-dropdown__display-placeholder-text-limit-fit {
+ max-width: initial;
+ padding-bottom: 0.5rem;
+ @include mobile-or-tablet-screen {
+ width: 90%;
+ white-space: normal;
+ }
+ }
+ }
+
+ &__wrapper__question {
+ .dc-field--error {
+ padding-inline-start: 0;
+ margin: 1.6rem 0;
+ }
+
+ @include desktop-screen {
+ padding: 0 2rem;
+ }
+ .dc-radio-group {
+ gap: 1.6rem;
+ }
+ @include mobile-or-tablet-screen {
+ .dc-radio-group__circle {
+ align-self: flex-start !important;
+ }
+ }
+ }
+
+ &__wrapper__dropdown {
+ gap: 2.4rem;
+ display: flex;
+ flex-direction: column;
+ width: 100%;
+ @include desktop-screen {
+ padding: 0 3rem;
+ }
+ }
+
+ .disable-pointer {
+ cursor: not-allowed;
+ }
+
+ @include mobile-or-tablet-screen {
+ .dc-dropdown__display-placeholder {
+ width: 100%;
+ .trading-assessment__form .dc-dropdown__display .dc-dropdown__display-placeholder-text-limit-fit {
+ width: 90%;
+ }
+ }
+
+ .dc-dropdown__display-placeholder--is-left-text.dc-dropdown__display-placeholder--is-title {
+ white-space: normal !important;
+ line-height: 1.6rem;
+ }
+ }
+
+ &__existing_btn {
+ border-top: 2px solid var(--general-disabled);
+ display: flex;
+ justify-content: end;
+ padding: 1rem 2rem;
+ position: fixed;
+ bottom: 0;
+ width: 100%;
+ }
+
+ &__btn-group {
+ @include mobile-or-tablet-screen {
+ position: fixed;
+ bottom: 0;
+ padding: 1.6rem;
+ border-top: 2px solid var(--general-disabled);
+ width: 100%;
+ display: flex;
+ background: var(--general-main-1);
+
+ &--btn {
+ width: 100%;
+ }
+ }
+ }
+}
diff --git a/packages/core/src/sass/account-wizard.scss b/packages/core/src/sass/account-wizard.scss
index d8a02dc16a49..17f7df531980 100644
--- a/packages/core/src/sass/account-wizard.scss
+++ b/packages/core/src/sass/account-wizard.scss
@@ -566,7 +566,7 @@
align-items: flex-start;
}
- @include mobile() {
+ @include mobile-or-tablet-screen {
height: calc(100vh - 16rem);
overflow: auto;
}
@@ -576,7 +576,7 @@
margin-top: 9.2rem;
}
- @include mobile() {
+ @include mobile-or-tablet-screen {
height: calc(100vh - 12rem);
.trading-assessment__side-note {
padding: 2.2rem 1.6rem;
@@ -592,7 +592,7 @@
text-align: justify;
padding: 0 10rem;
- @include mobile() {
+ @include mobile-or-tablet-screen {
padding: 0 1.6rem;
}
}
@@ -623,7 +623,7 @@
display: flex;
padding: 0 10rem;
- @include mobile() {
+ @include mobile-or-tablet-screen {
padding: 0 1.6rem;
}
}
@@ -635,7 +635,7 @@
.dc-dropdown__display .dc-dropdown__display-placeholder-text-limit-fit {
max-width: initial;
padding-bottom: 0.5rem;
- @include mobile() {
+ @include mobile-or-tablet-screen {
width: 90%;
white-space: normal;
}
@@ -654,7 +654,7 @@
.dc-radio-group {
gap: 1.6rem;
}
- @include mobile() {
+ @include mobile-or-tablet-screen {
.dc-radio-group__circle {
align-self: flex-start !important;
}
@@ -675,7 +675,7 @@
cursor: not-allowed;
}
- @include mobile() {
+ @include mobile-or-tablet-screen {
.dc-dropdown__display-placeholder {
width: 100%;
.trading-assessment__form .dc-dropdown__display .dc-dropdown__display-placeholder-text-limit-fit {
@@ -700,7 +700,7 @@
}
&__btn-group {
- @include mobile() {
+ @include mobile-or-tablet-screen {
position: fixed;
bottom: 0;
padding: 1.6rem;
diff --git a/packages/core/src/sass/app/_common/components/account-common.scss b/packages/core/src/sass/app/_common/components/account-common.scss
index c7f6152710a1..15b65af14a6a 100644
--- a/packages/core/src/sass/app/_common/components/account-common.scss
+++ b/packages/core/src/sass/app/_common/components/account-common.scss
@@ -13,7 +13,7 @@
min-width: 32.8rem;
min-height: 50rem;
margin: auto;
- @include mobile {
+ @include mobile-or-tablet-screen {
height: 100%;
}
}
@@ -117,7 +117,13 @@
}
}
}
-
+ &__financial-assessment {
+ @include mobile-or-tablet-screen {
+ .dc-select-native {
+ margin-bottom: 0;
+ }
+ }
+ }
&__poi-inline-message {
margin-bottom: 1.6rem;
}
@@ -162,6 +168,7 @@
@include mobile-or-tablet-screen {
padding-inline: 0;
+ height: 100%;
}
&--exit {
@@ -286,11 +293,23 @@
}
}
+ &__trading-assessment {
+ .dc-form-submit-button {
+ @include mobile-or-tablet-screen {
+ justify-content: center;
+ .dc-btn {
+ max-width: 56.8rem;
+ width: 100%;
+ }
+ }
+ }
+ }
+
&__footer {
height: 8rem;
position: absolute;
bottom: 0;
- left: 0;
+ inset-inline-start: 0;
display: flex;
width: 100%;
padding: 1.6rem 2.4rem;
@@ -301,15 +320,31 @@
border-top: 1px solid var(--general-section-1);
background-color: var(--general-main-1);
+ @include desktop-screen {
+ max-width: 100%;
+ }
+
+ @include mobile-or-tablet-screen {
+ flex-direction: row;
+ justify-content: center;
+ width: 100%;
+ inset-inline-start: 0;
+ align-items: center;
+ }
+
.back-btn {
- margin-right: 8px;
+ margin-inline-end: 0.8rem;
- @include mobile-or-tablet-screen {
+ @include tablet-screen {
+ width: 56.8rem;
+ }
+
+ @include mobile-screen {
width: 100%;
}
.back-btn-icon {
- margin-right: 0.8rem;
+ margin-inline-end: 0.8rem;
}
span {
@@ -341,7 +376,6 @@
&-btn {
height: 4rem;
-
&-wrapper {
align-items: normal;
display: flex;
@@ -371,11 +405,20 @@
}
}
- @include mobile-or-tablet-screen {
+ @include tablet-screen {
+ width: 100%;
+ }
+
+ @include mobile-screen {
&--has-bottom-margin {
margin-bottom: 1.6rem;
}
}
+
+ @include tablet-screen {
+ width: 56.8rem;
+ margin: auto;
+ }
}
&--dashboard {
@@ -411,16 +454,21 @@
}
@include mobile-or-tablet-screen {
+ position: fixed;
flex-direction: column;
height: auto;
align-items: initial;
border-top: 2px solid var(--general-section-1);
+ width: 100vw;
+ }
+
+ @include tablet-screen {
+ padding: 1.6rem 0;
}
}
}
&__scrollbars_container {
height: 100%;
- padding-top: 2.4rem;
padding-bottom: 6.4rem;
&-wrapper {
@@ -454,11 +502,15 @@
}
@include desktop-screen {
- padding-left: 16px;
- padding-right: 16px;
+ padding-inline-start: 16px;
+ padding-inline-end: 16px;
+ }
+ @include tablet-screen {
+ padding-inline-start: 0;
+ padding-inline-end: 0;
}
- @include mobile-or-tablet-screen {
+ @include mobile-screen {
height: unset;
padding-top: unset;
padding-bottom: unset;
@@ -674,6 +726,10 @@
height: 100%;
&__main-container {
+ @include mobile-or-tablet-screen {
+ max-width: 100%;
+ overflow: hidden;
+ }
position: relative;
max-width: 68.2rem;
height: 100%;
@@ -698,9 +754,8 @@
padding-bottom: 1.6rem;
@include mobile-or-tablet-screen {
- min-height: unset;
overflow-y: scroll;
- padding: 0 1.6rem;
+ padding: 2.4rem;
&--status {
height: 100%;
@@ -719,9 +774,7 @@
.proof-of-identity__submit-button {
@include mobile-or-tablet-screen {
- margin: unset;
width: 100%;
- margin-inline: 1.6rem;
}
}
@@ -787,6 +840,7 @@
.proof-of-identity__dropdown-container {
margin-top: 0;
+ overflow: visible;
}
}
}
@@ -837,16 +891,22 @@
}
&__footer {
+ display: flex;
+ align-items: center;
+ justify-content: flex-end;
+ bottom: 0;
+
@include mobile-or-tablet-screen {
- display: flex;
flex-direction: row;
- align-items: center;
- justify-content: flex-end;
- position: fixed;
- bottom: 0;
+ width: 100%;
+ justify-content: center;
+ }
- .proof-of-identity__submit-button {
- width: 100%;
+ .proof-of-identity__submit-button {
+ @include mobile-or-tablet-screen {
+ width: 55.2rem;
+ align-items: center;
+ justify-content: center;
}
}
}
@@ -864,7 +924,7 @@
}
.country-dropdown {
- min-height: 35.2rem;
+ height: 100%;
}
}
@@ -904,7 +964,7 @@
&__image-container {
width: fit-content;
height: fit-content;
- padding: 8px;
+ padding: 0.8rem;
border-radius: 4px;
background-color: $color-grey-2;
}
diff --git a/packages/core/src/sass/app/_common/components/account-switcher.scss b/packages/core/src/sass/app/_common/components/account-switcher.scss
index f9f24e64d5d2..8c9898641345 100644
--- a/packages/core/src/sass/app/_common/components/account-switcher.scss
+++ b/packages/core/src/sass/app/_common/components/account-switcher.scss
@@ -266,7 +266,7 @@
margin: 0.2rem 0.8rem 0.8rem;
height: 4rem;
}
- @include mobile-screen {
+ @include mobile-or-tablet-screen {
position: relative;
top: unset;
left: unset;
@@ -572,7 +572,6 @@
.dc-modal__container_accounts-switcher {
@include tablet-screen {
- width: unset !important;
- right: 0;
+ inset-inline-start: 1.6rem;
}
}
diff --git a/packages/core/src/sass/app/_common/components/settings-language.scss b/packages/core/src/sass/app/_common/components/settings-language.scss
index d48a1e07d1c5..dc780e4934f5 100644
--- a/packages/core/src/sass/app/_common/components/settings-language.scss
+++ b/packages/core/src/sass/app/_common/components/settings-language.scss
@@ -3,7 +3,7 @@
margin-left: 1.6rem;
width: fit-content;
- @include mobile {
+ @include mobile-or-tablet-screen {
display: flex;
flex-direction: column;
padding: 1.6rem 2.2rem 8rem;
@@ -17,14 +17,14 @@
grid-gap: 0.8rem;
margin: 1.6rem 0;
- @include mobile {
+ @include mobile-or-tablet-screen {
grid-template-columns: repeat(2, minmax(40%, 1fr));
grid-template-rows: auto;
grid-gap: initial;
margin: 0 auto;
padding: 0 0.8rem;
- @include mobile {
+ @include mobile-or-tablet-screen {
&--disabled {
opacity: 0.5;
pointer-events: none;
@@ -49,7 +49,7 @@
width: 13.6rem;
height: 8.8rem;
- @include mobile {
+ @include mobile-or-tablet-screen {
padding: 8px;
&--pre-appstore {
@@ -76,7 +76,7 @@
width: 3.6rem;
height: 2.8rem;
- @include mobile {
+ @include mobile-or-tablet-screen {
margin-top: 1rem;
}
}
@@ -90,7 +90,7 @@
color: var(--text-prominent);
}
- @include mobile {
+ @include mobile-or-tablet-screen {
font-size: 1.4rem;
}
}
diff --git a/packages/core/src/sass/app/_common/layout/header.scss b/packages/core/src/sass/app/_common/layout/header.scss
index 936c0b344a44..3fc350a25458 100644
--- a/packages/core/src/sass/app/_common/layout/header.scss
+++ b/packages/core/src/sass/app/_common/layout/header.scss
@@ -372,7 +372,7 @@
margin-right: 0.8rem;
vertical-align: middle;
}
- @include mobile {
+ @include mobile-or-tablet-screen {
height: $MOBILE_HEADER_HEIGHT;
.header__menu-left,
diff --git a/packages/core/src/sass/details-form.scss b/packages/core/src/sass/details-form.scss
index 81c42e7b05fa..0d344aa71623 100644
--- a/packages/core/src/sass/details-form.scss
+++ b/packages/core/src/sass/details-form.scss
@@ -26,6 +26,10 @@
@include mobile-or-tablet-screen {
padding: 0 1.6rem;
}
+
+ @include tablet-screen {
+ display: inline;
+ }
}
&__sub-header {
diff --git a/packages/shared/src/utils/routes/routes.ts b/packages/shared/src/utils/routes/routes.ts
index 70d1c298234d..f5e501e057bd 100644
--- a/packages/shared/src/utils/routes/routes.ts
+++ b/packages/shared/src/utils/routes/routes.ts
@@ -107,6 +107,8 @@ export const DISABLE_LANDSCAPE_BLOCKER_ROUTES = [
routes.onboarding,
routes.compare_cfds,
routes.reports,
+ routes.account,
+ routes.endpoint,
/** because contract route has dynamic id */
'/contract',
];