Skip to content

Commit

Permalink
Merge branch 'master' into purchase-responsive-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
prince-deriv authored Sep 4, 2024
2 parents 025bf64 + 67b6cfd commit 1739d5b
Show file tree
Hide file tree
Showing 7 changed files with 116 additions and 419 deletions.
504 changes: 103 additions & 401 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
"@binary-com/binary-document-uploader": "^2.4.4",
"@binary-com/binary-style": "^0.2.26",
"@binary-com/webtrader-charts": "^0.6.2",
"@deriv-com/quill-ui": "^1.13.46",
"@deriv-com/quill-ui": "^1.16.2",
"@deriv/deriv-api": "^1.0.15",
"@deriv/quill-icons": "^1.23.1",
"@livechat/customer-sdk": "4.0.2",
Expand Down
1 change: 0 additions & 1 deletion src/images/pages/header/ic-brand-binarybot.svg

This file was deleted.

8 changes: 0 additions & 8 deletions src/javascript/app/base/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,14 +260,6 @@ const Header = (() => {
icon : getPlatformSettings('smarttrader').icon,
on_mobile: true,
},
...(should_show_bots ? {
binarybot: {
desc : localize('Our classic “drag-and-drop” tool for creating trading bots, featuring pop-up trading charts, for advanced users.'),
link : `https://bot.deriv.${getTopLevelDomain()}`,
icon : getPlatformSettings('bbot').icon,
on_mobile: true,
},
} : {}),
};

Object.keys(platforms).forEach(key => {
Expand Down
11 changes: 9 additions & 2 deletions src/javascript/app/pages/form/form-component.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ import dataManager from '../../common/data_manager.js';
import { setDefaultParams } from '../../common/helpers.js';
import { isCryptocurrency } from '../../../_common/base/currency_base.js';

const Cookies = require('js-cookie');

export const FormComponent = () => {
const [trade_data, setTradeData] = useState({});

Expand Down Expand Up @@ -167,6 +169,8 @@ export const FormComponent = () => {

const getAmount = () => (isCryptocurrency(currency) && amount_crypto) ? amount_crypto : amount;

const lang = Cookies.get('language').replace('_','-').toLowerCase() || 'en';

return (
<BreakpointProvider>
<div className='quill-form-container'>
Expand Down Expand Up @@ -252,8 +256,11 @@ export const FormComponent = () => {
<DatePickerDropdown
value={moment(expiry_date).format('DD/MM/YYYY')}
datePickerProps={{
minDate: getMinMaxDate().minDate,
maxDate: getMinMaxDate().maxDate,
minDate : getMinMaxDate().minDate,
maxDate : getMinMaxDate().maxDate,
locale : lang,
formatDay: (locale, date) =>
moment(date).format('D').replace(/\D/g, ''),
}}
onSelectDate={(value) => {
onExpiryDateChange(value);
Expand Down
5 changes: 3 additions & 2 deletions src/javascript/app/pages/trade/markets/markets-dropdown.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export const MarketsDropdown = () => {
let closestOffset = Infinity;

marketDivs.forEach((div) => {
const paddingOffset = 120;
const paddingOffset = window.innerWidth > 768 ? 120 : 220;
const offsetTop = div.offsetTop - container.scrollTop - paddingOffset;

if (offsetTop <= 0 && Math.abs(offsetTop) < Math.abs(closestOffset)) {
Expand Down Expand Up @@ -291,7 +291,7 @@ export const MarketsDropdown = () => {

return (
<React.Fragment key={sub_market_key}>
<DropdownTitle label={name} />
<DropdownTitle label={name} data-id={market_key} />
{Object.keys(symbols).map((symbol_key) => {
const symbol = symbols[symbol_key];
const { display } = symbol;
Expand All @@ -300,6 +300,7 @@ export const MarketsDropdown = () => {
return (
<DropdownItem
key={symbol_key}
data-id={market_key}
onClick={() => handleUnderlyingClick(symbol_key)}
label={display}
selected={isSelected}
Expand Down
4 changes: 0 additions & 4 deletions src/templates/_common/brand.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ const brand_config_data = {
name: 'DBot',
icon: 'ic-brand-dbot.svg',
},
bbot: {
name: 'Binary Bot',
icon: 'ic-brand-binarybot.svg',
},
},
};

Expand Down

0 comments on commit 1739d5b

Please sign in to comment.