From 800016b430a941682d4cdb89f85b46c27b835e39 Mon Sep 17 00:00:00 2001 From: Brandon Millman Date: Sat, 1 Dec 2018 00:03:07 -0800 Subject: fix(instant) various token selector fixes --- packages/instant/src/components/search_input.tsx | 8 ++++---- packages/instant/src/components/ui/container.tsx | 1 + packages/instant/src/components/ui/input.tsx | 1 + 3 files changed, 6 insertions(+), 4 deletions(-) (limited to 'packages/instant') diff --git a/packages/instant/src/components/search_input.tsx b/packages/instant/src/components/search_input.tsx index 3a693b9f8..71bc18915 100644 --- a/packages/instant/src/components/search_input.tsx +++ b/packages/instant/src/components/search_input.tsx @@ -13,10 +13,10 @@ export interface SearchInputProps extends InputProps { } export const SearchInput: React.StatelessComponent = props => ( - - - - + + + + ); diff --git a/packages/instant/src/components/ui/container.tsx b/packages/instant/src/components/ui/container.tsx index e7d909d92..636eb8fc9 100644 --- a/packages/instant/src/components/ui/container.tsx +++ b/packages/instant/src/components/ui/container.tsx @@ -77,6 +77,7 @@ export const Container = ${props => cssRuleIfExists(props, 'opacity')} ${props => cssRuleIfExists(props, 'cursor')} ${props => cssRuleIfExists(props, 'overflow')} + ${props => (props.overflow === 'scroll' ? `-webkit-overflow-scrolling: touch` : '')}; ${props => (props.hasBoxShadow ? `box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1)` : '')}; ${props => props.display && stylesForMedia('display', props.display)} ${props => props.width && stylesForMedia('width', props.width)} diff --git a/packages/instant/src/components/ui/input.tsx b/packages/instant/src/components/ui/input.tsx index 1ea5d8fe1..863c970ef 100644 --- a/packages/instant/src/components/ui/input.tsx +++ b/packages/instant/src/components/ui/input.tsx @@ -10,6 +10,7 @@ export interface InputProps { fontSize?: string; fontColor?: ColorOption; placeholder?: string; + type?: string; onChange?: (event: React.ChangeEvent) => void; } -- cgit v1.2.3 From c0f4a35cfd67b5de387786a582bc615375a2dd4b Mon Sep 17 00:00:00 2001 From: Brandon Millman Date: Sat, 1 Dec 2018 00:04:21 -0800 Subject: fix(instant): DGD and DGX colors --- packages/instant/src/data/asset_meta_data_map.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'packages/instant') diff --git a/packages/instant/src/data/asset_meta_data_map.ts b/packages/instant/src/data/asset_meta_data_map.ts index b24c9c83d..0553be7f5 100644 --- a/packages/instant/src/data/asset_meta_data_map.ts +++ b/packages/instant/src/data/asset_meta_data_map.ts @@ -83,14 +83,14 @@ export const assetMetaDataMap: ObjectMap = { '0xf47261b0000000000000000000000000e0b7927c4af23765cb51314a0e0521a9645f0e2a': { assetProxyId: AssetProxyId.ERC20, decimals: 9, - primaryColor: '#DEB564', + primaryColor: '#E1AA3E', symbol: 'dgd', name: 'DigixDao', }, '0xf47261b00000000000000000000000004f3afec4e5a3f2a6a1a411def7d7dfe50ee057bf': { assetProxyId: AssetProxyId.ERC20, decimals: 9, - primaryColor: '#DEB564', + primaryColor: '#E1AA3E', symbol: 'dgx', name: 'Digix Gold Token', }, -- cgit v1.2.3 From 593ed12d91e2e3c3f6d6feda2468b20a1fb364ac Mon Sep 17 00:00:00 2001 From: Brandon Millman Date: Sat, 1 Dec 2018 00:06:36 -0800 Subject: fix(instant): update zrx icon --- packages/instant/src/assets/icons/zrx.svg | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'packages/instant') diff --git a/packages/instant/src/assets/icons/zrx.svg b/packages/instant/src/assets/icons/zrx.svg index 07518f551..da623710b 100644 --- a/packages/instant/src/assets/icons/zrx.svg +++ b/packages/instant/src/assets/icons/zrx.svg @@ -1,3 +1,6 @@ - - + + + + + -- cgit v1.2.3 From 074944247dfdcd91fb7acbe064ccf3c3d2139ddc Mon Sep 17 00:00:00 2001 From: Brandon Millman Date: Sat, 1 Dec 2018 00:22:09 -0800 Subject: feat(instant): add token symbol to buy button text --- packages/instant/src/components/buy_button.tsx | 12 +++++++++--- packages/instant/src/components/buy_order_state_buttons.tsx | 4 +++- .../src/containers/selected_asset_buy_order_state_buttons.ts | 5 ++++- 3 files changed, 16 insertions(+), 5 deletions(-) (limited to 'packages/instant') diff --git a/packages/instant/src/components/buy_button.tsx b/packages/instant/src/components/buy_button.tsx index eeb42d6fc..1489b94d4 100644 --- a/packages/instant/src/components/buy_button.tsx +++ b/packages/instant/src/components/buy_button.tsx @@ -1,4 +1,5 @@ import { AssetBuyer, AssetBuyerError, BuyQuote } from '@0x/asset-buyer'; +import { AssetProxyId } from '@0x/types'; import { BigNumber } from '@0x/utils'; import { Web3Wrapper } from '@0x/web3-wrapper'; import * as _ from 'lodash'; @@ -7,7 +8,7 @@ import { oc } from 'ts-optchain'; import { WEB_3_WRAPPER_TRANSACTION_FAILED_ERROR_MSG_PREFIX } from '../constants'; import { ColorOption } from '../style/theme'; -import { AffiliateInfo, ZeroExInstantError } from '../types'; +import { AffiliateInfo, Asset, ZeroExInstantError } from '../types'; import { analytics } from '../util/analytics'; import { gasPriceEstimator } from '../util/gas_price_estimator'; import { util } from '../util/util'; @@ -21,6 +22,7 @@ export interface BuyButtonProps { assetBuyer: AssetBuyer; web3Wrapper: Web3Wrapper; affiliateInfo?: AffiliateInfo; + selectedAsset?: Asset; onValidationPending: (buyQuote: BuyQuote) => void; onValidationFail: (buyQuote: BuyQuote, errorMessage: AssetBuyerError | ZeroExInstantError) => void; onSignatureDenied: (buyQuote: BuyQuote) => void; @@ -36,8 +38,12 @@ export class BuyButton extends React.Component { onBuyFailure: util.boundNoop, }; public render(): React.ReactNode { - const { buyQuote, accountAddress } = this.props; + const { buyQuote, accountAddress, selectedAsset } = this.props; const shouldDisableButton = _.isUndefined(buyQuote) || _.isUndefined(accountAddress); + const buttonText = + !_.isUndefined(selectedAsset) && selectedAsset.metaData.assetProxyId === AssetProxyId.ERC20 + ? `Buy ${selectedAsset.metaData.symbol.toUpperCase()}` + : 'Buy Now'; return ( ); } diff --git a/packages/instant/src/components/buy_order_state_buttons.tsx b/packages/instant/src/components/buy_order_state_buttons.tsx index e563bec73..833818900 100644 --- a/packages/instant/src/components/buy_order_state_buttons.tsx +++ b/packages/instant/src/components/buy_order_state_buttons.tsx @@ -4,7 +4,7 @@ import { Web3Wrapper } from '@0x/web3-wrapper'; import * as React from 'react'; import { ColorOption } from '../style/theme'; -import { AffiliateInfo, OrderProcessState, ZeroExInstantError } from '../types'; +import { AffiliateInfo, Asset, OrderProcessState, ZeroExInstantError } from '../types'; import { BuyButton } from './buy_button'; import { PlacingOrderButton } from './placing_order_button'; @@ -21,6 +21,7 @@ export interface BuyOrderStateButtonProps { assetBuyer: AssetBuyer; web3Wrapper: Web3Wrapper; affiliateInfo?: AffiliateInfo; + selectedAsset?: Asset; onViewTransaction: () => void; onValidationPending: (buyQuote: BuyQuote) => void; onValidationFail: (buyQuote: BuyQuote, errorMessage: AssetBuyerError | ZeroExInstantError) => void; @@ -60,6 +61,7 @@ export const BuyOrderStateButtons: React.StatelessComponent void; } @@ -41,6 +42,7 @@ const mapStateToProps = (state: State, _ownProps: SelectedAssetBuyOrderStateButt const account = state.providerState.account; const accountAddress = account.state === AccountState.Ready ? account.address : undefined; const accountEthBalanceInWei = account.state === AccountState.Ready ? account.ethBalanceInWei : undefined; + const selectedAsset = state.selectedAsset; return { accountAddress, accountEthBalanceInWei, @@ -49,6 +51,7 @@ const mapStateToProps = (state: State, _ownProps: SelectedAssetBuyOrderStateButt web3Wrapper, buyQuote: state.latestBuyQuote, affiliateInfo: state.affiliateInfo, + selectedAsset, onViewTransaction: () => { if ( state.buyOrderState.processState === OrderProcessState.Processing || -- cgit v1.2.3 From 6f44944ffdb3c529b2135414818bc7e5dcc198b0 Mon Sep 17 00:00:00 2001 From: Brandon Millman Date: Sat, 1 Dec 2018 00:47:07 -0800 Subject: fix(instant): darken overlay color --- packages/instant/public/augur_screenshot.png | Bin 0 -> 359383 bytes packages/instant/public/index.html | 6 ++++++ packages/instant/src/components/ui/overlay.tsx | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 packages/instant/public/augur_screenshot.png (limited to 'packages/instant') diff --git a/packages/instant/public/augur_screenshot.png b/packages/instant/public/augur_screenshot.png new file mode 100644 index 000000000..c61cf6e7c Binary files /dev/null and b/packages/instant/public/augur_screenshot.png differ diff --git a/packages/instant/public/index.html b/packages/instant/public/index.html index df39994ef..8e0875645 100644 --- a/packages/instant/public/index.html +++ b/packages/instant/public/index.html @@ -31,6 +31,11 @@ height: 100vh; background-color: rgba(0, 0, 0, 0.2); } + + .full-screen { + height: 100vh; + width: 100vw; + } @@ -58,6 +63,7 @@ +