From 105bcc6664f0d4ab642486977f1edaf8d84b020e Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 13 Dec 2017 19:58:33 -0600 Subject: Clear trackedTokens so that a user starts tracking the new WETH and no longer the old one --- packages/website/ts/index.tsx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'packages/website/ts/index.tsx') diff --git a/packages/website/ts/index.tsx b/packages/website/ts/index.tsx index 922102d96..61cd6c2f5 100644 --- a/packages/website/ts/index.tsx +++ b/packages/website/ts/index.tsx @@ -10,6 +10,7 @@ import {BrowserRouter as Router, Link, Redirect, Route, Switch} from 'react-rout import * as injectTapEventPlugin from 'react-tap-event-plugin'; import {createStore, Store as ReduxStore} from 'redux'; import {createLazyComponent} from 'ts/lazy_component'; +import {trackedTokenStorage} from 'ts/local_storage/tracked_token_storage'; import {tradeHistoryStorage} from 'ts/local_storage/trade_history_storage'; import {About} from 'ts/pages/about/about'; import {FAQ} from 'ts/pages/faq/faq'; @@ -29,6 +30,7 @@ BigNumber.config({ // Check if we've introduced an update that requires us to clear the tradeHistory local storage entries tradeHistoryStorage.clearIfRequired(); +trackedTokenStorage.clearIfRequired(); const CUSTOM_GREY = 'rgb(39, 39, 39)'; const CUSTOM_GREEN = 'rgb(102, 222, 117)'; -- cgit From 2041e9945edf6f5255185de73c0dc332270e4bbb Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Fri, 15 Dec 2017 15:19:19 +0100 Subject: Fix website unused vars --- packages/website/ts/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages/website/ts/index.tsx') diff --git a/packages/website/ts/index.tsx b/packages/website/ts/index.tsx index 922102d96..cbefac8bd 100644 --- a/packages/website/ts/index.tsx +++ b/packages/website/ts/index.tsx @@ -6,7 +6,7 @@ import {colors, getMuiTheme, MuiThemeProvider} from 'material-ui/styles'; import * as React from 'react'; import {render} from 'react-dom'; import {Provider} from 'react-redux'; -import {BrowserRouter as Router, Link, Redirect, Route, Switch} from 'react-router-dom'; +import {BrowserRouter as Router, Redirect, Route, Switch} from 'react-router-dom'; import * as injectTapEventPlugin from 'react-tap-event-plugin'; import {createStore, Store as ReduxStore} from 'redux'; import {createLazyComponent} from 'ts/lazy_component'; -- cgit From f698dd40772eee0b3142028f62b6c56dcfcc5a1e Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Sun, 17 Dec 2017 20:55:50 -0500 Subject: Use bigNumberConfigs from @0xproject/utils in website repo --- packages/website/ts/index.tsx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'packages/website/ts/index.tsx') diff --git a/packages/website/ts/index.tsx b/packages/website/ts/index.tsx index 71565fa4d..69bb03dce 100644 --- a/packages/website/ts/index.tsx +++ b/packages/website/ts/index.tsx @@ -1,6 +1,7 @@ // Polyfills import 'whatwg-fetch'; +import {bigNumberConfigs} from '@0xproject/utils'; import BigNumber from 'bignumber.js'; import {colors, getMuiTheme, MuiThemeProvider} from 'material-ui/styles'; import * as React from 'react'; @@ -22,11 +23,7 @@ import {WebsitePaths} from 'ts/types'; import {constants} from 'ts/utils/constants'; injectTapEventPlugin(); -// By default BigNumber's `toString` method converts to exponential notation if the value has -// more then 20 digits. We want to avoid this behavior, so we set EXPONENTIAL_AT to a high number -BigNumber.config({ - EXPONENTIAL_AT: 1000, -}); +bigNumberConfigs.configure(); // Check if we've introduced an update that requires us to clear the tradeHistory local storage entries tradeHistoryStorage.clearIfRequired(); -- cgit From df9d3e3e16e5a00ea84369691c46a6e4a6a53049 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 18 Dec 2017 09:15:12 +0100 Subject: Consolidate all custom colors and material-ui colors into a colors module --- packages/website/ts/index.tsx | 39 ++++++++++++++++++--------------------- 1 file changed, 18 insertions(+), 21 deletions(-) (limited to 'packages/website/ts/index.tsx') diff --git a/packages/website/ts/index.tsx b/packages/website/ts/index.tsx index 69bb03dce..ba08eef16 100644 --- a/packages/website/ts/index.tsx +++ b/packages/website/ts/index.tsx @@ -3,7 +3,7 @@ import 'whatwg-fetch'; import {bigNumberConfigs} from '@0xproject/utils'; import BigNumber from 'bignumber.js'; -import {colors, getMuiTheme, MuiThemeProvider} from 'material-ui/styles'; +import {getMuiTheme, MuiThemeProvider} from 'material-ui/styles'; import * as React from 'react'; import {render} from 'react-dom'; import {Provider} from 'react-redux'; @@ -20,6 +20,7 @@ import {NotFound} from 'ts/pages/not_found'; import {Wiki} from 'ts/pages/wiki/wiki'; import {reducer, State} from 'ts/redux/reducer'; import {WebsitePaths} from 'ts/types'; +import {colors} from 'ts/utils/colors'; import {constants} from 'ts/utils/constants'; injectTapEventPlugin(); @@ -29,43 +30,39 @@ bigNumberConfigs.configure(); tradeHistoryStorage.clearIfRequired(); trackedTokenStorage.clearIfRequired(); -const CUSTOM_GREY = 'rgb(39, 39, 39)'; -const CUSTOM_GREEN = 'rgb(102, 222, 117)'; -const CUSTOM_DARKER_GREEN = 'rgb(77, 197, 92)'; - import 'basscss/css/basscss.css'; import 'less/all.less'; const muiTheme = getMuiTheme({ appBar: { height: 45, - color: 'white', - textColor: 'black', + color: colors.white, + textColor: colors.black, }, palette: { - pickerHeaderColor: constants.CUSTOM_BLUE, - primary1Color: constants.CUSTOM_BLUE, - primary2Color: constants.CUSTOM_BLUE, + pickerHeaderColor: colors.lightBlue, + primary1Color: colors.lightBlue, + primary2Color: colors.lightBlue, textColor: colors.grey700, }, datePicker: { color: colors.grey700, - textColor: 'white', - calendarTextColor: 'white', - selectColor: CUSTOM_GREY, - selectTextColor: 'white', + textColor: colors.white, + calendarTextColor: colors.white, + selectColor: colors.darkestGray, + selectTextColor: colors.white, }, timePicker: { color: colors.grey700, - textColor: 'white', - accentColor: 'white', - headerColor: CUSTOM_GREY, - selectColor: CUSTOM_GREY, - selectTextColor: CUSTOM_GREY, + textColor: colors.white, + accentColor: colors.white, + headerColor: colors.darkestGray, + selectColor: colors.darkestGray, + selectTextColor: colors.darkestGray, }, toggle: { - thumbOnColor: CUSTOM_GREEN, - trackOnColor: CUSTOM_DARKER_GREEN, + thumbOnColor: colors.limeGreen, + trackOnColor: colors.lightGreen, }, }); -- cgit From 1aed970ce3468306f3bedbfdc29669d42e487441 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 18 Dec 2017 10:28:34 +0100 Subject: standarize on `grey` over `gray` spelling and other color related fixes --- packages/website/ts/index.tsx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'packages/website/ts/index.tsx') diff --git a/packages/website/ts/index.tsx b/packages/website/ts/index.tsx index ba08eef16..2f88ec8f4 100644 --- a/packages/website/ts/index.tsx +++ b/packages/website/ts/index.tsx @@ -2,7 +2,6 @@ import 'whatwg-fetch'; import {bigNumberConfigs} from '@0xproject/utils'; -import BigNumber from 'bignumber.js'; import {getMuiTheme, MuiThemeProvider} from 'material-ui/styles'; import * as React from 'react'; import {render} from 'react-dom'; @@ -21,7 +20,6 @@ import {Wiki} from 'ts/pages/wiki/wiki'; import {reducer, State} from 'ts/redux/reducer'; import {WebsitePaths} from 'ts/types'; import {colors} from 'ts/utils/colors'; -import {constants} from 'ts/utils/constants'; injectTapEventPlugin(); bigNumberConfigs.configure(); @@ -49,16 +47,16 @@ const muiTheme = getMuiTheme({ color: colors.grey700, textColor: colors.white, calendarTextColor: colors.white, - selectColor: colors.darkestGray, + selectColor: colors.darkestGrey, selectTextColor: colors.white, }, timePicker: { color: colors.grey700, textColor: colors.white, accentColor: colors.white, - headerColor: colors.darkestGray, - selectColor: colors.darkestGray, - selectTextColor: colors.darkestGray, + headerColor: colors.darkestGrey, + selectColor: colors.darkestGrey, + selectTextColor: colors.darkestGrey, }, toggle: { thumbOnColor: colors.limeGreen, -- cgit From c6af59a3e72d09a123a89e63e0b4ed932c5c9e99 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Tue, 19 Dec 2017 11:18:02 +0100 Subject: Move muiTheme into it's own module --- packages/website/ts/index.tsx | 37 ++----------------------------------- 1 file changed, 2 insertions(+), 35 deletions(-) (limited to 'packages/website/ts/index.tsx') diff --git a/packages/website/ts/index.tsx b/packages/website/ts/index.tsx index 2f88ec8f4..685ce4962 100644 --- a/packages/website/ts/index.tsx +++ b/packages/website/ts/index.tsx @@ -2,7 +2,7 @@ import 'whatwg-fetch'; import {bigNumberConfigs} from '@0xproject/utils'; -import {getMuiTheme, MuiThemeProvider} from 'material-ui/styles'; +import {MuiThemeProvider} from 'material-ui/styles'; import * as React from 'react'; import {render} from 'react-dom'; import {Provider} from 'react-redux'; @@ -19,7 +19,7 @@ import {NotFound} from 'ts/pages/not_found'; import {Wiki} from 'ts/pages/wiki/wiki'; import {reducer, State} from 'ts/redux/reducer'; import {WebsitePaths} from 'ts/types'; -import {colors} from 'ts/utils/colors'; +import {muiTheme} from 'ts/utils/mui_theme'; injectTapEventPlugin(); bigNumberConfigs.configure(); @@ -31,39 +31,6 @@ trackedTokenStorage.clearIfRequired(); import 'basscss/css/basscss.css'; import 'less/all.less'; -const muiTheme = getMuiTheme({ - appBar: { - height: 45, - color: colors.white, - textColor: colors.black, - }, - palette: { - pickerHeaderColor: colors.lightBlue, - primary1Color: colors.lightBlue, - primary2Color: colors.lightBlue, - textColor: colors.grey700, - }, - datePicker: { - color: colors.grey700, - textColor: colors.white, - calendarTextColor: colors.white, - selectColor: colors.darkestGrey, - selectTextColor: colors.white, - }, - timePicker: { - color: colors.grey700, - textColor: colors.white, - accentColor: colors.white, - headerColor: colors.darkestGrey, - selectColor: colors.darkestGrey, - selectTextColor: colors.darkestGrey, - }, - toggle: { - thumbOnColor: colors.limeGreen, - trackOnColor: colors.lightGreen, - }, -}); - // We pass modulePromise returning lambda instead of module promise, // cause we only want to import the module when the user navigates to the page. // At the same time webpack statically parses for System.import() to determine bundle chunk split points -- cgit From e744e4cd989bd3ae1070c59f7baa8097f18b8b06 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Fri, 22 Dec 2017 15:05:32 +0100 Subject: Apply prettier config --- packages/website/ts/index.tsx | 61 +++++++++++++++++++------------------------ 1 file changed, 27 insertions(+), 34 deletions(-) (limited to 'packages/website/ts/index.tsx') diff --git a/packages/website/ts/index.tsx b/packages/website/ts/index.tsx index 685ce4962..eee8fcf7b 100644 --- a/packages/website/ts/index.tsx +++ b/packages/website/ts/index.tsx @@ -1,25 +1,25 @@ // Polyfills import 'whatwg-fetch'; -import {bigNumberConfigs} from '@0xproject/utils'; -import {MuiThemeProvider} from 'material-ui/styles'; +import { bigNumberConfigs } from '@0xproject/utils'; +import { MuiThemeProvider } from 'material-ui/styles'; import * as React from 'react'; -import {render} from 'react-dom'; -import {Provider} from 'react-redux'; -import {BrowserRouter as Router, Redirect, Route, Switch} from 'react-router-dom'; +import { render } from 'react-dom'; +import { Provider } from 'react-redux'; +import { BrowserRouter as Router, Redirect, Route, Switch } from 'react-router-dom'; import * as injectTapEventPlugin from 'react-tap-event-plugin'; -import {createStore, Store as ReduxStore} from 'redux'; -import {createLazyComponent} from 'ts/lazy_component'; -import {trackedTokenStorage} from 'ts/local_storage/tracked_token_storage'; -import {tradeHistoryStorage} from 'ts/local_storage/trade_history_storage'; -import {About} from 'ts/pages/about/about'; -import {FAQ} from 'ts/pages/faq/faq'; -import {Landing} from 'ts/pages/landing/landing'; -import {NotFound} from 'ts/pages/not_found'; -import {Wiki} from 'ts/pages/wiki/wiki'; -import {reducer, State} from 'ts/redux/reducer'; -import {WebsitePaths} from 'ts/types'; -import {muiTheme} from 'ts/utils/mui_theme'; +import { createStore, Store as ReduxStore } from 'redux'; +import { createLazyComponent } from 'ts/lazy_component'; +import { trackedTokenStorage } from 'ts/local_storage/tracked_token_storage'; +import { tradeHistoryStorage } from 'ts/local_storage/trade_history_storage'; +import { About } from 'ts/pages/about/about'; +import { FAQ } from 'ts/pages/faq/faq'; +import { Landing } from 'ts/pages/landing/landing'; +import { NotFound } from 'ts/pages/not_found'; +import { Wiki } from 'ts/pages/wiki/wiki'; +import { reducer, State } from 'ts/redux/reducer'; +import { WebsitePaths } from 'ts/types'; +import { muiTheme } from 'ts/utils/mui_theme'; injectTapEventPlugin(); bigNumberConfigs.configure(); @@ -35,24 +35,17 @@ import 'less/all.less'; // cause we only want to import the module when the user navigates to the page. // At the same time webpack statically parses for System.import() to determine bundle chunk split points // so each lazy import needs it's own `System.import()` declaration. -const LazyPortal = createLazyComponent( - 'Portal', async () => System.import(/* webpackChunkName: "portal" */'ts/containers/portal'), +const LazyPortal = createLazyComponent('Portal', async () => + System.import(/* webpackChunkName: "portal" */ 'ts/containers/portal'), ); -const LazyZeroExJSDocumentation = createLazyComponent( - 'Documentation', - async () => System.import(/* webpackChunkName: "zeroExDocs" */'ts/containers/zero_ex_js_documentation'), +const LazyZeroExJSDocumentation = createLazyComponent('Documentation', async () => + System.import(/* webpackChunkName: "zeroExDocs" */ 'ts/containers/zero_ex_js_documentation'), ); -const LazySmartContractsDocumentation = createLazyComponent( - 'Documentation', - async () => System.import( - /* webpackChunkName: "smartContractDocs" */'ts/containers/smart_contracts_documentation', - ), +const LazySmartContractsDocumentation = createLazyComponent('Documentation', async () => + System.import(/* webpackChunkName: "smartContractDocs" */ 'ts/containers/smart_contracts_documentation'), ); -const LazyConnectDocumentation = createLazyComponent( - 'Documentation', - async () => System.import( - /* webpackChunkName: "connectDocs" */'ts/containers/connect_documentation', - ), +const LazyConnectDocumentation = createLazyComponent('Documentation', async () => + System.import(/* webpackChunkName: "connectDocs" */ 'ts/containers/connect_documentation'), ); const store: ReduxStore = createStore(reducer); @@ -64,7 +57,7 @@ render(
- + @@ -81,6 +74,6 @@ render(
- , + , document.getElementById('app'), ); -- cgit From 4dfa720f2dec2be0b0758633c087579a02e482bb Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Thu, 4 Jan 2018 12:38:19 +0100 Subject: Use configured version of bignumber in all packages --- packages/website/ts/index.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'packages/website/ts/index.tsx') diff --git a/packages/website/ts/index.tsx b/packages/website/ts/index.tsx index eee8fcf7b..ffb551561 100644 --- a/packages/website/ts/index.tsx +++ b/packages/website/ts/index.tsx @@ -1,7 +1,4 @@ // Polyfills -import 'whatwg-fetch'; - -import { bigNumberConfigs } from '@0xproject/utils'; import { MuiThemeProvider } from 'material-ui/styles'; import * as React from 'react'; import { render } from 'react-dom'; @@ -20,10 +17,9 @@ import { Wiki } from 'ts/pages/wiki/wiki'; import { reducer, State } from 'ts/redux/reducer'; import { WebsitePaths } from 'ts/types'; import { muiTheme } from 'ts/utils/mui_theme'; +import 'whatwg-fetch'; injectTapEventPlugin(); -bigNumberConfigs.configure(); - // Check if we've introduced an update that requires us to clear the tradeHistory local storage entries tradeHistoryStorage.clearIfRequired(); trackedTokenStorage.clearIfRequired(); -- cgit