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

Commit 975f774

Browse files
authored
Merge pull request #5390 from ashkanx/translations
Translations
2 parents d3c1fc5 + d7c2a2b commit 975f774

File tree

46 files changed

+546
-163
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+546
-163
lines changed

package-lock.json

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

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
"grunt-contrib-clean": "1.1.0",
7171
"grunt-contrib-connect": "1.0.2",
7272
"grunt-contrib-copy": "1.0.0",
73-
"grunt-contrib-cssmin": "2.2.1",
73+
"grunt-contrib-cssmin": "^3.0.0",
7474
"grunt-contrib-watch": "1.1.0",
7575
"grunt-embed-fonts": "0.5.1",
7676
"grunt-eslint": "21.0.0",
@@ -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.18",
140+
"smartcharts-beta": "0.4.21",
141141
"tt-react-custom-scrollbars": "4.2.1-tt2",
142142
"url-polyfill": "1.0.9",
143143
"web-push-notifications": "3.2.15"

src/images/app_2/common/logo.svg

Lines changed: 1 addition & 0 deletions
Loading

src/javascript/_autogenerated/ru.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/_autogenerated/zh_cn.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/_autogenerated/zh_tw.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/Elements/PositionsDrawer/positions-drawer.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ class PositionsDrawer extends React.Component {
4444
} else if (is_empty) {
4545
body_content = <EmptyPortfolioMessage />;
4646
} else {
47-
// Show only 4 most recent open contracts
48-
body_content = all_positions.slice(0, 4).map((portfolio_position) => (
47+
// Show only 5 most recent open contracts
48+
body_content = all_positions.slice(0, 5).map((portfolio_position) => (
4949
<CSSTransition
5050
key={portfolio_position.id}
5151
in={!!(portfolio_position.contract_info.underlying)}

src/javascript/app_2/App/Components/Form/ButtonToggleMenu/button-highlight-wrapper.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ class HighlightWrapper extends React.PureComponent {
1212
componentDidMount() {
1313
const active_button_el = [...this.node.getElementsByClassName('button-menu__button--active')][0];
1414
if (!this.node) return;
15-
this.updateHighlightPosition(active_button_el);
15+
// Timeout needed here for bug where the el is returning wrong width and offset after mount
16+
setTimeout(() => {
17+
this.updateHighlightPosition(active_button_el);
18+
}, 250);
1619
}
1720

1821
componentDidUpdate() {

src/javascript/app_2/App/Components/Form/ButtonToggleMenu/button-highlight.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ const Highlight = ({ left, width }) => {
55
const border_radius_size = '4px';
66
const highlight_style = {
77
width,
8+
left : 0,
89
transform : `translate3d(${left}px, 0, 0)`,
910
'borderTopLeftRadius' : (left === 0) ? border_radius_size : 0,
1011
'borderTopRightRadius' : (left === 0) ? 0 : border_radius_size ,

src/javascript/app_2/App/Containers/Layout/app-contents.jsx

Lines changed: 34 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,19 @@ import { withRouter } from 'react-router';
55
import { Scrollbars } from 'tt-react-custom-scrollbars';
66
import { connect } from 'Stores/connect';
77
import InstallPWA from './install-pwa.jsx';
8+
import Loading from '../../../../../templates/app_2/components/loading.jsx';
89

910
const AppContents = ({
1011
addNotificationBar,
1112
children,
1213
is_app_blurred,
1314
is_contract_mode,
15+
is_dark_mode,
1416
is_fully_blurred,
17+
is_loading,
1518
is_logged_in,
1619
is_positions_drawer_on,
20+
loading_status,
1721
setPWAPromptEvent,
1822
}) => {
1923
if (is_logged_in) {
@@ -32,43 +36,54 @@ const AppContents = ({
3236
}
3337

3438
return (
35-
<div
36-
id='app_contents'
37-
className={classNames('app-contents', {
38-
'app-contents--show-positions-drawer': is_positions_drawer_on,
39-
'app-contents--contract-mode' : is_contract_mode,
40-
'app-contents--is-blurred' : (is_fully_blurred || is_app_blurred),
41-
})}
42-
>
43-
{/* Calculate height of user screen and offset height of header and footer */}
44-
<Scrollbars
45-
autoHide
46-
style={{ height: 'calc(100vh - 83px)' }}
39+
<React.Fragment>
40+
{ is_loading && <Loading status={loading_status} theme={is_dark_mode ? 'dark' : 'light'} /> }
41+
<div
42+
id='app_contents'
43+
className={classNames('app-contents', {
44+
'app-contents--show-positions-drawer': is_positions_drawer_on,
45+
'app-contents--contract-mode' : is_contract_mode,
46+
'app-contents--is-blurred' : (is_fully_blurred || is_app_blurred),
47+
})}
4748
>
48-
{children}
49-
</Scrollbars>
50-
</div>
49+
{/* Calculate height of user screen and offset height of header and footer */}
50+
<Scrollbars
51+
autoHide
52+
style={{ height: 'calc(100vh - 83px)' }}
53+
>
54+
{children}
55+
</Scrollbars>
56+
</div>
57+
</React.Fragment>
5158
);
5259
};
5360

5461
AppContents.propTypes = {
5562
addNotificationBar : PropTypes.func,
5663
children : PropTypes.any,
57-
is_blurred : PropTypes.bool,
64+
is_app_blurred : PropTypes.bool,
5865
is_contract_mode : PropTypes.bool,
66+
is_dark_mode : PropTypes.bool,
67+
is_fully_blurred : PropTypes.bool,
68+
is_loading : PropTypes.bool,
5969
is_logged_in : PropTypes.bool,
6070
is_positions_drawer_on: PropTypes.bool,
71+
loading_status : PropTypes.string,
72+
pwa_prompt_event : PropTypes.object,
6173
setPWAPromptEvent : PropTypes.func,
6274
};
6375

6476
export default withRouter(connect(
6577
({ client, modules, ui }) => ({
66-
is_logged_in : client.is_logged_in,
67-
is_contract_mode : modules.smart_chart.is_contract_mode,
78+
addNotificationBar : ui.addNotificationBar,
6879
is_app_blurred : ui.is_app_blurred,
80+
is_contract_mode : modules.smart_chart.is_contract_mode,
81+
is_dark_mode : ui.is_dark_mode_on,
6982
is_fully_blurred : ui.is_fully_blurred,
83+
is_loading : ui.is_loading,
84+
is_logged_in : client.is_logged_in,
7085
is_positions_drawer_on: ui.is_positions_drawer_on,
71-
addNotificationBar : ui.addNotificationBar,
86+
loading_status : modules.trade.loading_status,
7287
pwa_prompt_event : ui.pwa_prompt_event,
7388
setPWAPromptEvent : ui.setPWAPromptEvent,
7489
})

0 commit comments

Comments
 (0)