Skip to content

Commit

Permalink
- reduce exchange header size
Browse files Browse the repository at this point in the history
- deactivate scroll for mobile view
- left order book is now default

Signed-off-by: Stefan Schiessl <[email protected]>
  • Loading branch information
Stefan Schiessl committed Sep 12, 2018
1 parent e3de117 commit 9eedce3
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 11 deletions.
11 changes: 11 additions & 0 deletions app/assets/stylesheets/components/_exchange.scss
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,11 @@ table thead tr th.mymarkets-header {
fill: #cc9f00 !important;
}

@media (max-width: 450px) {
.hide-order-0 {
display: none !important;
}
}
@media (max-width: 570px) {
.hide-order-1 {
display: none !important;
Expand All @@ -567,6 +572,12 @@ table thead tr th.mymarkets-header {
}
}

@media (max-width: 1220px) {
.hide-order-6 {
display: none !important;
}
}

.no-data {
position: relative;
left: 45%;
Expand Down
2 changes: 1 addition & 1 deletion app/components/Exchange/Exchange.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ class Exchange extends React.Component {
flipBuySell: ws.get("flipBuySell", false),
favorite: false,
showDepthChart: ws.get("showDepthChart", false),
leftOrderBook: ws.get("leftOrderBook", false),
leftOrderBook: ws.get("leftOrderBook", true),
buyDiff: false,
sellDiff: false,
buySellTop: ws.get("buySellTop", true),
Expand Down
2 changes: 1 addition & 1 deletion app/components/Exchange/ExchangeHeader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ export default class ExchangeHeader extends React.Component {
</ul>
<ul className="market-stats stats top-stats">
<li
className="stressed-stat input clickable"
className="stressed-stat input clickable hide-order-0"
style={{padding: "16px"}}
onClick={() => {
ZfApi.publish("chart_options", "open");
Expand Down
2 changes: 1 addition & 1 deletion app/components/Exchange/Markets.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class Markets extends React.Component {

render() {
return (
<div ref="wrapper" className="grid-block no-overflow">
<div ref="wrapper" className="grid-block page-layout no-overflow">
<MyMarkets
style={{width: "100%", padding: 20}}
listHeight={
Expand Down
1 change: 1 addition & 0 deletions app/components/Exchange/MyMarkets.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -909,6 +909,7 @@ class MyMarkets extends React.Component {
/>
</span>
</label>
<br />
</div>
<div className="search-wrapper">
<form>
Expand Down
23 changes: 15 additions & 8 deletions app/components/Exchange/TradingViewPriceChart.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,20 @@ export default class TradingViewPriceChart extends React.Component {

if (__DEV__) console.log("*** Load Chart ***");
if (__DEV__) console.time("*** Chart load time: ");

let disabled_features = [
"header_saveload",
"symbol_info",
"symbol_search_hot_key",
"border_around_the_chart",
"header_symbol_search",
"header_compare"
];
if (this.props.mobile) {
disabled_features.push("chart_scroll");
disabled_features.push("chart_zoom");
}

this.tvWidget = new TradingView.widget({
fullscreen: false,
symbol: props.quoteSymbol + "_" + props.baseSymbol,
Expand Down Expand Up @@ -63,14 +77,7 @@ export default class TradingViewPriceChart extends React.Component {
"study_templates",
"keep_left_toolbar_visible_on_small_screens"
],
disabled_features: [
"header_saveload",
"symbol_info",
"symbol_search_hot_key",
"border_around_the_chart",
"header_symbol_search",
"header_compare"
],
disabled_features: disabled_features,
debug: false,
preset: this.props.mobile ? "mobile" : ""
});
Expand Down

0 comments on commit 9eedce3

Please sign in to comment.