2017-05-24 22:39:58 +00:00
|
|
|
// @flow
|
2017-05-23 23:06:01 +00:00
|
|
|
import React, { Component } from 'react';
|
|
|
|
import { connect } from 'react-redux';
|
2017-08-28 19:09:42 +00:00
|
|
|
import { Footer, Header, AlphaAgreement } from 'components';
|
2017-06-21 23:31:59 +00:00
|
|
|
import Notifications from './Notifications';
|
2017-07-04 01:25:01 +00:00
|
|
|
import * as actions from 'actions/config';
|
2017-04-12 05:04:27 +00:00
|
|
|
|
|
|
|
class App extends Component {
|
2017-07-04 03:21:19 +00:00
|
|
|
props: {
|
|
|
|
// FIXME
|
|
|
|
children: any,
|
|
|
|
location: any,
|
|
|
|
router: any,
|
|
|
|
isMobile: boolean,
|
2017-04-25 00:03:41 +00:00
|
|
|
|
2017-07-04 03:21:19 +00:00
|
|
|
languageSelection: string,
|
|
|
|
nodeSelection: string,
|
2017-04-14 06:22:53 +00:00
|
|
|
|
2017-07-20 17:06:10 +00:00
|
|
|
gasPriceGwei: number,
|
|
|
|
|
2017-07-04 03:21:19 +00:00
|
|
|
changeLanguage: typeof actions.changeLanguage,
|
|
|
|
changeNode: typeof actions.changeNode,
|
2017-07-20 17:06:10 +00:00
|
|
|
changeGasPrice: typeof actions.changeGasPrice,
|
2017-07-04 03:21:19 +00:00
|
|
|
handleWindowResize: () => void
|
|
|
|
};
|
2017-04-14 06:22:53 +00:00
|
|
|
|
2017-07-04 03:21:19 +00:00
|
|
|
render() {
|
|
|
|
let {
|
|
|
|
children,
|
|
|
|
// APP
|
2017-07-20 17:06:10 +00:00
|
|
|
nodeSelection,
|
2017-07-04 03:21:19 +00:00
|
|
|
languageSelection,
|
2017-07-20 17:06:10 +00:00
|
|
|
gasPriceGwei,
|
|
|
|
|
2017-07-04 03:21:19 +00:00
|
|
|
changeLanguage,
|
|
|
|
changeNode,
|
2017-07-20 17:06:10 +00:00
|
|
|
changeGasPrice
|
2017-07-04 03:21:19 +00:00
|
|
|
} = this.props;
|
2017-06-21 23:31:59 +00:00
|
|
|
|
2017-07-04 03:21:19 +00:00
|
|
|
let headerProps = {
|
|
|
|
location,
|
|
|
|
languageSelection,
|
2017-07-20 17:06:10 +00:00
|
|
|
nodeSelection,
|
|
|
|
gasPriceGwei,
|
|
|
|
|
|
|
|
changeLanguage,
|
2017-07-04 03:21:19 +00:00
|
|
|
changeNode,
|
2017-07-20 17:06:10 +00:00
|
|
|
changeGasPrice
|
2017-05-23 23:06:01 +00:00
|
|
|
};
|
2017-04-12 05:04:27 +00:00
|
|
|
|
2017-07-04 03:21:19 +00:00
|
|
|
return (
|
|
|
|
<div className="page-layout">
|
|
|
|
<main>
|
|
|
|
<Header {...headerProps} />
|
v3 Style Import (#151)
* Convert bootstrap to sass instead of checked in and less
* Darken body, adjust header.
* First pass at tab styles, each tab will need a lot of individual love tho.
* Update footer to main site content, improve responsiveness.
* Missing key added.
* Fix dropdowns.
* Convert GenerateWallet HTML over, still needs styling.
* Send form.
* Current rates styled.
* CurrencySwap form styles.
* SwapInfoHeader styled.
* Finish up swap restyling, minor usability improvements for mobile.
* Fix up notifications / alert customizations
* Import v3 variables.
* Fix notification spacing.
* Align input height base with buttons.
* Revert height base, add additional bootstrap overrides.
* Grid overrides.
* Move overrides to their own folder. Adjust naming.
* Fix inconsistencies.
* Style generate wallet pt 1.
* Style generate wallet pt 2
* Style generate wallet pt 3
* Fix swap
* Added some missing overries, fixed the fallout.
* Remove header text, indicate alpha version.
* Fix radio / checkbox weights.
* Bind => arrow
* Convert simpledropdown to proper form select, instead of weirdly implemented nonfuncitoning dropdown.
* Fix token balances buttons, footr icons.
2017-09-05 19:52:01 +00:00
|
|
|
<div className="Tab container">
|
2017-07-04 03:21:19 +00:00
|
|
|
{React.cloneElement(children, { languageSelection })}
|
|
|
|
</div>
|
|
|
|
<Footer />
|
|
|
|
</main>
|
|
|
|
<Notifications />
|
2017-08-28 19:09:42 +00:00
|
|
|
<AlphaAgreement />
|
2017-07-04 03:21:19 +00:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
2017-04-12 05:04:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function mapStateToProps(state) {
|
2017-07-04 03:21:19 +00:00
|
|
|
return {
|
|
|
|
nodeSelection: state.config.nodeSelection,
|
|
|
|
nodeToggle: state.config.nodeToggle,
|
|
|
|
languageSelection: state.config.languageSelection,
|
2017-07-20 17:06:10 +00:00
|
|
|
languageToggle: state.config.languageToggle,
|
|
|
|
|
|
|
|
gasPriceGwei: state.config.gasPriceGwei
|
2017-07-04 03:21:19 +00:00
|
|
|
};
|
2017-04-12 05:04:27 +00:00
|
|
|
}
|
|
|
|
|
2017-07-04 01:25:01 +00:00
|
|
|
export default connect(mapStateToProps, actions)(App);
|