Skip to content
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

Bugfixes trading hub #3

Closed
Show file tree
Hide file tree
Changes from 2 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 @@ -15,6 +15,7 @@
display: flex;
flex-direction: column;
margin-left: 0.8rem;
margin-right: 1.8rem;
&--title {
cursor: pointer;
}
Expand Down
15 changes: 9 additions & 6 deletions packages/appstore/src/components/add-options/add-options.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ type TAddOptionsProps = {
number_of_accounts: number;
title: string;
description: string;
is_mf: boolean;
};

const AddOptions = ({ number_of_accounts, title, description }: TAddOptionsProps) => {
const AddOptions = ({ number_of_accounts, title, description, is_mf }: TAddOptionsProps) => {
const { ui } = useStores();
const getHeightWidthOfIcon = () => {
return isMobile()
Expand Down Expand Up @@ -41,11 +42,13 @@ const AddOptions = ({ number_of_accounts, title, description }: TAddOptionsProps
<Localize i18n_default_text={title} />
</Text>
</div>
<div className='add-options--desktop_description'>
<Text size='xxs' line_height='l' weight='lighter'>
<Localize i18n_default_text={description} />
</Text>
</div>
{!is_mf && (
<div className='add-options--desktop_description'>
<Text size='xxs' line_height='l' weight='lighter'>
<Localize i18n_default_text={description} />
</Text>
</div>
)}
</div>
) : (
<div className='add-options--mobile' onClick={onClickHandler}>
Expand Down
20 changes: 16 additions & 4 deletions packages/appstore/src/components/options/options-accounts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,13 @@
align-items: center;
justify-content: flex-end;
height: 7.2rem;
width: 20%;
width: 4%;
background: linear-gradient(to right, transparent, var(--general-main-1));
@include mobile {
right: 0;
right: 10%;
top: 15%;
height: auto;
width: auto;
}
}
&--add-options {
Expand All @@ -61,11 +63,11 @@
}
}
}
&__platformLauncher {
&__platformLauncher,
&__platformLauncher--applauncher {
width: 100%;
display: flex;
flex-direction: row;
background: var(--general-section-5);
border-radius: 0rem 0.6rem 0.6rem;
padding: 1.6rem 2.4rem;
overflow-x: auto;
Expand All @@ -90,4 +92,14 @@
padding: 1.6rem 0;
}
}
&__platformLauncher {
background: var(--general-section-5);
}
&__divider {
margin: 1.1rem 0;
height: 0.2rem;
width: 100%;
border: none;
background-color: var(--general-section-1);
}
}
11 changes: 6 additions & 5 deletions packages/appstore/src/components/options/options-accounts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const OptionsAccounts: React.FunctionComponent<TOptionsAccountsProps & RouteComp
if (loginid === loginid_selected) return;
await switchAccount(loginid_selected);
};

const is_mf = loginid?.startsWith('MF');
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't do this, try to get the condition from client-store

return (
<div className='options-accounts-container'>
<div className='options-accounts-container__title'>
Expand Down Expand Up @@ -227,6 +227,7 @@ const OptionsAccounts: React.FunctionComponent<TOptionsAccountsProps & RouteComp
number_of_accounts={sortedAccountList.length}
title={'More Options accounts'}
description={'Including cryptocurrencies'}
is_mf={is_mf}
/>
</div>
)}
Expand All @@ -244,9 +245,6 @@ const OptionsAccounts: React.FunctionComponent<TOptionsAccountsProps & RouteComp
/>
</div>
)}
{!has_any_real_account && (
<span className='options-accounts-container__appLauncher--account--divider' />
)}
</React.Fragment>
) : (
<Loading
Expand Down Expand Up @@ -308,7 +306,10 @@ const OptionsAccounts: React.FunctionComponent<TOptionsAccountsProps & RouteComp
))}
</MobileDialog>
</div>
<div className='options-accounts-container__platformLauncher'>
{!has_any_real_account && <hr className='options-accounts-container__divider' />}
<div
className={`options-accounts-container__platformLauncher${has_any_real_account ? '' : '--applauncher'}`}
>
{props.platformlauncherprops.map((item, index) => {
return (
<div className='options-accounts-container__platformLauncher--item' key={item.app_title}>
Expand Down
4 changes: 2 additions & 2 deletions packages/appstore/src/modules/trading-hub/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ const TradingHub: React.FC = () => {
];

const platform_toggle_options = [
{ text: 'CFD', value: 'cfd' },
{ text: 'Options', value: 'options' },
{ text: 'CFDs', value: 'cfd' },
{ text: 'Options and...', value: 'options' },
];

tour_step_locale.last = (
Expand Down