Skip to content
This repository was archived by the owner on Feb 22, 2024. It is now read-only.

Commit 45ecfdd

Browse files
authored
Merge pull request #1 from msamprz/timepicker-bug-fixes
Timepicker rounding fix (must differ from binary-static)
2 parents e6d41dc + a663e71 commit 45ecfdd

File tree

38 files changed

+421
-363
lines changed

38 files changed

+421
-363
lines changed

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@
137137
"react-transition-group": "2.4.0",
138138
"scriptjs": "2.5.8",
139139
"sinon": "7.2.2",
140-
"smartcharts-beta": "0.4.22",
140+
"smartcharts-beta": "0.4.23",
141141
"tt-react-custom-scrollbars": "4.2.1-tt2",
142142
"url-polyfill": "1.0.9",
143143
"web-push-notifications": "3.2.15"

scripts/config/pages.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,6 @@ module.exports = [
128128
['graduates', 'landing_pages/graduate_program', null, 'Binary.com Graduate Program', 'NOT-en'],
129129
// ['hackathon', 'landing_pages/hackathon', null, 'Hackathon Competition', 'NOT-en'],
130130
['introducing-usb', 'landing_pages/usb', null, 'Introducing USB', 'NOT-en'],
131-
['binarygrid', 'landing_pages/binary_grid', null, 'Our New Mobile Trading App', 'NOT-en'],
131+
['binary-grid', 'landing_pages/binary_grid', null, 'Our New Mobile Trading App', 'NOT-en'],
132132
['landing/signup-frame', 'landing_pages/signup_frame', null, 'Sign up'],
133133
];
554 KB
Binary file not shown.

src/images/app_2/header/symbol.svg

Lines changed: 1 addition & 1 deletion
Loading

src/javascript/_autogenerated/it.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/javascript/app_2/App/Components/Layout/Header/menu-links.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const MenuLinks = ({ is_logged_in, items }) => (
1616
null
1717
:
1818
<BinaryLink key={idx} to={item.link_to} className='header__menu-link' active_class='header__menu-link--active'>
19-
<span title={item.text} className='header__menu-link-text'>{item.icon}{item.text}</span>
19+
<span title={item.text} className='header__menu-link-text'>{item.icon}{item.text}{item.logo}</span>
2020
</BinaryLink>
2121
))
2222
}

src/javascript/app_2/App/Constants/header-links.js

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
1-
import React from 'react';
2-
import { localize } from '_common/localize';
3-
import {
4-
// IconStatement,
5-
IconTrade } from 'Assets/Header/NavBar/index';
6-
import { routes } from 'Constants/index';
1+
import React from 'react';
2+
import { localize } from '_common/localize';
3+
// import { IconStatement } from 'Assets/Header/NavBar/index';
4+
import { routes } from 'Constants/index';
75

86
const header_links = [
97
{
10-
icon : <IconTrade className='header__icon' />,
11-
text : localize('Trade'),
8+
logo : <div className='header__logo'>{localize('BETA')}</div>,
9+
text : localize('BinaryNex'),
1210
link_to: routes.trade,
1311
},
1412
// {

src/javascript/app_2/Modules/Trading/Components/Elements/purchase-button.jsx

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,26 @@ const PurchaseButton = ({
1212
is_disabled,
1313
is_high_low,
1414
is_loading,
15+
should_fade,
1516
onClickPurchase,
1617
type,
1718
}) => {
1819
const getIconType = () => {
19-
if (is_loading) return '';
20+
if (!should_fade && is_loading) return '';
2021
return (is_high_low) ? `${type.toLowerCase()}_barrier` : type.toLowerCase();
2122
};
23+
2224
return (
2325
<Button
2426
is_disabled={is_contract_mode || is_disabled}
2527
id={`purchase_${type}`}
2628
className={classNames(
2729
'btn-purchase',
28-
{ 'btn-purchase--disabled': (is_contract_mode || is_disabled) && !is_loading },
29-
{ 'btn-purchase--animated': is_loading })}
30+
{
31+
'btn-purchase--disabled' : (is_contract_mode || is_disabled) && !is_loading,
32+
'btn-purchase--animated--slide': is_loading && !should_fade,
33+
'btn-purchase--animated--fade' : is_loading && should_fade,
34+
})}
3035
has_effect
3136
onClick={() => { onClickPurchase(info.id, info.stake, type); }}
3237
>
@@ -40,14 +45,14 @@ const PurchaseButton = ({
4045
</div>
4146
<div className='btn-purchase__text_wrapper'>
4247
<span className='btn-purchase__text'>
43-
{!is_loading && localize('[_1]', getContractTypeDisplay(type, is_high_low))}
48+
{(!should_fade && is_loading) ? '' : localize('[_1]', getContractTypeDisplay(type, is_high_low))}
4449
</span>
4550
</div>
4651
</div>
4752
<div className='btn-purchase__effect-detail' />
4853
<div className='btn-purchase__info btn-purchase__info--right'>
4954
<div className='btn-purchase__text_wrapper'>
50-
<span className='btn-purchase__text'>{is_loading || is_disabled ? '' : info.returns}</span>
55+
<span className='btn-purchase__text'>{!(is_loading || is_disabled) ? info.returns : ''}</span>
5156
</div>
5257
</div>
5358
</React.Fragment>

src/javascript/app_2/Modules/Trading/Components/Elements/purchase-fieldset.jsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ import PurchaseButton from 'Modules/Trading/Components/Elements/purchase-button.
1212
class PurchaseFieldset extends React.PureComponent {
1313
state = {
1414
show_tooltip: false,
15+
should_fade : false,
1516
}
1617

17-
onMouseEnter = () => {
18-
this.setState({ show_tooltip: true });
18+
componentDidMount() {
19+
this.setState({ should_fade: true });
1920
}
2021

21-
onMouseLeave = () => {
22-
this.setState({ show_tooltip: false });
23-
}
22+
onMouseEnter = () => this.setState({ show_tooltip: true });
23+
onMouseLeave = () => this.setState({ show_tooltip: false });
2424

2525
render() {
2626
const {
@@ -50,6 +50,7 @@ class PurchaseFieldset extends React.PureComponent {
5050
is_high_low={is_high_low}
5151
is_loading={is_loading}
5252
onClickPurchase={onClickPurchase}
53+
should_fade={this.state.should_fade}
5354
type={type}
5455
/>
5556
);
@@ -68,6 +69,7 @@ class PurchaseFieldset extends React.PureComponent {
6869
proposal_info={info}
6970
has_increased={info.has_increased}
7071
is_loading={is_loading}
72+
should_fade={this.state.should_fade}
7173
is_visible={!is_contract_mode}
7274
/>
7375
<div

0 commit comments

Comments
 (0)