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

amam/fix_design #76

Merged
merged 18 commits into from
May 21, 2019
Merged
Show file tree
Hide file tree
Changes from all 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 @@ -60,12 +60,13 @@ class FullPageModal extends React.Component {
children,
confirm_button_text,
onCancel,
is_loading,
is_visible,
title,
} = this.props;
return (
<PoseGroup>
{is_visible && [
{(is_visible && !is_loading) && [
<ModalBackground
className='full-page-modal__background'
key='full-page-modal__background'
Expand Down Expand Up @@ -120,6 +121,7 @@ FullPageModal.propTypes = {
hideAppBlur : PropTypes.func,
is_closed_on_cancel : PropTypes.bool,
is_closed_on_confirm: PropTypes.bool,
is_loading : PropTypes.bool,
is_visible : PropTypes.bool,
onCancel : PropTypes.func,
onConfirm : PropTypes.func,
Expand All @@ -130,6 +132,7 @@ FullPageModal.propTypes = {
const full_page_modal = connect(
({ ui }) => ({
hideAppBlur: ui.hideAppBlur,
is_loading : ui.is_loading,
showAppBlur: ui.showAppBlur,
}),
)(FullPageModal);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@ import MediaItem, {
} from 'App/Components/Elements/Media';
import Checkbox from 'App/Components/Form/Checkbox';
import RadioGroup from 'App/Components/Form/Radio';
import OHLCDisabledLightIcon from 'Images/app/settings/OHLC-disabled.svg';
import OHLCEnabledLightIcon from 'Images/app/settings/OHLC-enabled.svg';
import ChartPositionEnabledLightIcon from 'Images/app/settings/bottom.svg';
import OHLCDisabledDarkIcon from 'Images/app/settings/dark/OHLC-disabled.svg';
import OHLCEnabledDarkIcon from 'Images/app/settings/dark/OHLC-enabled.svg';

// TODO: enable asset information
// import OHLCDisabledLightIcon from 'Images/app/settings/OHLC-disabled.svg';
// import OHLCEnabledLightIcon from 'Images/app/settings/OHLC-enabled.svg';
// import OHLCDisabledDarkIcon from 'Images/app/settings/dark/OHLC-disabled.svg';
// import OHLCEnabledDarkIcon from 'Images/app/settings/dark/OHLC-enabled.svg';

import ChartPositionEnabledDarkIcon from 'Images/app/settings/dark/bottom.svg';
import IntervalDurationDisabledDarkIcon from 'Images/app/settings/dark/interval-disabled.svg';
import IntervalDurationEnabledDarkIcon from 'Images/app/settings/dark/interval-enabled.svg';
Expand All @@ -24,11 +27,12 @@ import IntervalDurationEnabledLightIcon from 'Images/app/settings/interval-enab
import ChartPositionDisabledLightIcon from 'Images/app/settings/left.svg';

const ChartSettings = ({
is_asset_visible,
// TODO: enable asset information
// is_asset_visible,
// toggleAsset,
is_countdown_visible,
is_dark_mode,
is_layout_default,
toggleAsset,
toggleCountdown,
toggleLayout,
}) => (
Expand Down Expand Up @@ -62,7 +66,8 @@ const ChartSettings = ({
</div>
</MediaDescription>
</MediaItem>
<MediaItem>
{/* TODO: enable asset information
<MediaItem>
<MediaHeading>
<Localize
str='Open-high-low-close [_1](OHLC) information[_2]'
Expand All @@ -83,7 +88,7 @@ const ChartSettings = ({
/>
</div>
</MediaDescription>
</MediaItem>
</MediaItem> */}
<MediaItem>
<MediaHeading>
<Localize str='Interval duration' />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,8 @@ export default class SmartChartStore extends BaseStore {
@computed
get settings() {
return (({ common, ui } = this.root_store) => ({
assetInformation: ui.is_chart_asset_info_visible,
// TODO: enable asset information
assetInformation: false, // ui.is_chart_asset_info_visible,
countdown : ui.is_chart_countdown_visible,
lang : common.current_language,
position : ui.is_chart_layout_default ? 'bottom' : 'left',
Expand Down
5 changes: 3 additions & 2 deletions src/javascript/app/Stores/Modules/Trading/trade-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -552,9 +552,10 @@ export default class TradeStore extends BaseStore {

@action.bound
onLoadingMount() {
BinarySocket.wait('history').then(() => {
// TODO: find better way to remove initial loader
setTimeout(() => {
this.root_store.ui.setAppLoading(false);
});
}, 2200);
}

@action.bound
Expand Down
12 changes: 7 additions & 5 deletions src/javascript/app/Stores/ui-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ export default class UIStore extends BaseStore {
// @observable is_purchase_lock_on = false;

// SmartCharts Controls
@observable is_chart_asset_info_visible = true;
// TODO: enable asset information
// @observable is_chart_asset_info_visible = true;
@observable is_chart_countdown_visible = false;
@observable is_chart_layout_default = true;

Expand Down Expand Up @@ -164,10 +165,11 @@ export default class UIStore extends BaseStore {
this.is_chart_layout_default = !this.is_chart_layout_default;
}

@action.bound
toggleChartAssetInfo() {
this.is_chart_asset_info_visible = !this.is_chart_asset_info_visible;
}
// TODO: enable asset information
// @action.bound
// toggleChartAssetInfo() {
// this.is_chart_asset_info_visible = !this.is_chart_asset_info_visible;
// }

@action.bound
toggleChartCountdown() {
Expand Down
10 changes: 9 additions & 1 deletion src/sass/app/_common/drawer/contract-drawer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,21 @@ $header-height: 4em;
display: flex;
justify-content: flex-start;
align-items: center;
height: 56px;
margin-bottom: 1em;
padding: 0.5em;
border-radius: 4px;
cursor: pointer;

@include typeface(--title-left-bold-black);
@include themify($themes) {
color: themed('text_primary_color');
}

&:hover {
@include themify($themes) {
background: themed('tab_hover_color');
}
}
}
&__icon {
margin-right: 16px;
Expand Down
5 changes: 5 additions & 0 deletions src/sass/app/_common/drawer/positions-drawer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ $header-height: 4em;
border-color: themed('background_button_color');
}

&:hover {
@include themify($themes) {
background-color: themed('tab_hover_color');
}
}
.btn__text {
font-size: 1.2em;
font-weight: bold;
Expand Down
3 changes: 1 addition & 2 deletions src/sass/app/_common/form/button-toggle-menu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
background-color: themed('container_color');

&:hover:not(.button-menu__button--active) {
background-color: themed('tab_hover_color');
background-color: rgba(themed('tab_hover_color'), 0.08);
}
}

Expand Down Expand Up @@ -55,7 +55,6 @@

.button-menu {
&__button, &__button--active {
background-color: rgba(0, 0, 0, 0) !important;
z-index: 1;
}
&__button:nth-last-child(2) {
Expand Down
10 changes: 6 additions & 4 deletions src/sass/app/_common/layout/layouts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,12 @@
div.cq-chart-controls {
box-shadow: none;
}
div.ciq-asset-information {
z-index: 0;
display: none;
}
// TODO: enable asset information
// div.ciq-asset-information {
// z-index: 0;
// top: 0;
// left: 0;
// }
div.stx_jump_today.home > svg {
top: 6px;
left: 8px;
Expand Down