Merge branch 'development' of github.com:gnosis/safe-react into 171-txhash-refactoring
This commit is contained in:
commit
e33c63d68c
|
@ -26,7 +26,7 @@ const styles = () => ({
|
||||||
top: '120px',
|
top: '120px',
|
||||||
width: '500px',
|
width: '500px',
|
||||||
height: '530px',
|
height: '530px',
|
||||||
borderRadius: '3px',
|
borderRadius: '8px',
|
||||||
backgroundColor: '#ffffff',
|
backgroundColor: '#ffffff',
|
||||||
boxShadow: '0 0 5px 0 rgba(74, 85, 121, 0.5)',
|
boxShadow: '0 0 5px 0 rgba(74, 85, 121, 0.5)',
|
||||||
'&:focus': {
|
'&:focus': {
|
||||||
|
|
|
@ -3,9 +3,7 @@ import * as React from 'react'
|
||||||
import { withStyles } from '@material-ui/core/styles'
|
import { withStyles } from '@material-ui/core/styles'
|
||||||
import Close from '@material-ui/icons/Close'
|
import Close from '@material-ui/icons/Close'
|
||||||
import IconButton from '@material-ui/core/IconButton'
|
import IconButton from '@material-ui/core/IconButton'
|
||||||
import OpenInNew from '@material-ui/icons/OpenInNew'
|
|
||||||
import QRCode from 'qrcode.react'
|
import QRCode from 'qrcode.react'
|
||||||
import Link from '~/components/layout/Link'
|
|
||||||
import Paragraph from '~/components/layout/Paragraph'
|
import Paragraph from '~/components/layout/Paragraph'
|
||||||
import Identicon from '~/components/Identicon'
|
import Identicon from '~/components/Identicon'
|
||||||
import Button from '~/components/layout/Button'
|
import Button from '~/components/layout/Button'
|
||||||
|
@ -13,8 +11,10 @@ import Block from '~/components/layout/Block'
|
||||||
import Row from '~/components/layout/Row'
|
import Row from '~/components/layout/Row'
|
||||||
import Hairline from '~/components/layout/Hairline'
|
import Hairline from '~/components/layout/Hairline'
|
||||||
import Col from '~/components/layout/Col'
|
import Col from '~/components/layout/Col'
|
||||||
|
import EtherscanBtn from '~/components/EtherscanBtn'
|
||||||
|
import CopyBtn from '~/components/CopyBtn'
|
||||||
import {
|
import {
|
||||||
lg, md, secondary, secondaryText,
|
sm, lg, md, secondaryText,
|
||||||
} from '~/theme/variables'
|
} from '~/theme/variables'
|
||||||
import { copyToClipboard } from '~/utils/clipboard'
|
import { copyToClipboard } from '~/utils/clipboard'
|
||||||
|
|
||||||
|
@ -25,12 +25,10 @@ const styles = () => ({
|
||||||
maxHeight: '75px',
|
maxHeight: '75px',
|
||||||
boxSizing: 'border-box',
|
boxSizing: 'border-box',
|
||||||
},
|
},
|
||||||
manage: {
|
|
||||||
fontSize: '24px',
|
|
||||||
},
|
|
||||||
close: {
|
close: {
|
||||||
height: '35px',
|
height: '24px',
|
||||||
width: '35px',
|
width: '24px',
|
||||||
|
fill: secondaryText,
|
||||||
},
|
},
|
||||||
qrContainer: {
|
qrContainer: {
|
||||||
backgroundColor: '#fff',
|
backgroundColor: '#fff',
|
||||||
|
@ -38,8 +36,12 @@ const styles = () => ({
|
||||||
borderRadius: '6px',
|
borderRadius: '6px',
|
||||||
border: `1px solid ${secondaryText}`,
|
border: `1px solid ${secondaryText}`,
|
||||||
},
|
},
|
||||||
|
annotation: {
|
||||||
|
margin: lg,
|
||||||
|
marginBottom: 0,
|
||||||
|
},
|
||||||
safeName: {
|
safeName: {
|
||||||
margin: `${lg} 0 ${lg}`,
|
margin: `${md} 0`,
|
||||||
},
|
},
|
||||||
buttonRow: {
|
buttonRow: {
|
||||||
height: '84px',
|
height: '84px',
|
||||||
|
@ -51,42 +53,40 @@ const styles = () => ({
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
addressContainer: {
|
addressContainer: {
|
||||||
marginTop: '25px',
|
margin: `${lg} 0`,
|
||||||
marginBottom: '25px',
|
|
||||||
},
|
},
|
||||||
address: {
|
address: {
|
||||||
marginLeft: '6px',
|
marginLeft: sm,
|
||||||
|
marginRight: sm,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
const openIconStyle = {
|
|
||||||
height: '16px',
|
|
||||||
color: secondary,
|
|
||||||
}
|
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
onClose: () => void,
|
onClose: () => void,
|
||||||
classes: Object,
|
classes: Object,
|
||||||
safeName: string,
|
safeName: string,
|
||||||
safeAddress: string,
|
safeAddress: string,
|
||||||
etherScanLink: string,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const Receive = ({
|
const Receive = ({
|
||||||
classes, onClose, safeAddress, safeName, etherScanLink,
|
classes, onClose, safeAddress, safeName,
|
||||||
}: Props) => (
|
}: Props) => (
|
||||||
<>
|
<>
|
||||||
<Row align="center" grow className={classes.heading}>
|
<Row align="center" grow className={classes.heading}>
|
||||||
<Paragraph className={classes.manage} weight="bolder" noMargin>
|
<Paragraph className={classes.manage} size="xl" weight="bolder" noMargin>
|
||||||
Receive funds
|
Receive funds
|
||||||
</Paragraph>
|
</Paragraph>
|
||||||
<IconButton onClick={onClose} disableRipple>
|
<IconButton onClick={onClose} disableRipple>
|
||||||
<Close className={classes.close} />
|
<Close className={classes.close} />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Row>
|
</Row>
|
||||||
<Col layout="column" middle="xs">
|
|
||||||
<Hairline />
|
<Hairline />
|
||||||
<Paragraph className={classes.safeName} weight="bolder" size="xl" noMargin>
|
<Paragraph className={classes.annotation} size="lg" noMargin>
|
||||||
|
This is the address of your Safe. Deposit funds by scanning the QR code or copying the address below. Only send
|
||||||
|
ETH and ERC-20 tokens to this address!
|
||||||
|
</Paragraph>
|
||||||
|
<Col layout="column" middle="xs">
|
||||||
|
<Paragraph className={classes.safeName} weight="bold" size="lg" noMargin>
|
||||||
{safeName}
|
{safeName}
|
||||||
</Paragraph>
|
</Paragraph>
|
||||||
<Block className={classes.qrContainer}>
|
<Block className={classes.qrContainer}>
|
||||||
|
@ -102,14 +102,13 @@ const Receive = ({
|
||||||
>
|
>
|
||||||
{safeAddress}
|
{safeAddress}
|
||||||
</Paragraph>
|
</Paragraph>
|
||||||
<Link className={classes.open} to={etherScanLink} target="_blank">
|
<CopyBtn content={safeAddress} />
|
||||||
<OpenInNew style={openIconStyle} />
|
<EtherscanBtn type="address" value={safeAddress} />
|
||||||
</Link>
|
|
||||||
</Block>
|
</Block>
|
||||||
</Col>
|
</Col>
|
||||||
<Hairline />
|
<Hairline />
|
||||||
<Row align="center" className={classes.buttonRow}>
|
<Row align="center" className={classes.buttonRow}>
|
||||||
<Button color="primary" minWidth={140} onClick={onClose} variant="contained">
|
<Button color="primary" minWidth={130} onClick={onClose} variant="contained">
|
||||||
Done
|
Done
|
||||||
</Button>
|
</Button>
|
||||||
</Row>
|
</Row>
|
||||||
|
|
|
@ -213,12 +213,12 @@ class Balances extends React.Component<Props, State> {
|
||||||
title="Receive Tokens"
|
title="Receive Tokens"
|
||||||
description="Receive Tokens Form"
|
description="Receive Tokens Form"
|
||||||
handleClose={this.onHide('Receive')}
|
handleClose={this.onHide('Receive')}
|
||||||
|
paperClassName={classes.receiveModal}
|
||||||
open={showReceive}
|
open={showReceive}
|
||||||
>
|
>
|
||||||
<Receive
|
<Receive
|
||||||
safeName={safeName}
|
safeName={safeName}
|
||||||
safeAddress={safeAddress}
|
safeAddress={safeAddress}
|
||||||
etherScanLink={etherScanLink}
|
|
||||||
onClose={this.onHide('Receive')}
|
onClose={this.onHide('Receive')}
|
||||||
/>
|
/>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|
|
@ -15,6 +15,9 @@ export const styles = (theme: Object) => ({
|
||||||
iconSmall: {
|
iconSmall: {
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
},
|
},
|
||||||
|
receiveModal: {
|
||||||
|
height: '544px',
|
||||||
|
},
|
||||||
hide: {
|
hide: {
|
||||||
'&:hover': {
|
'&:hover': {
|
||||||
backgroundColor: '#fff3e2',
|
backgroundColor: '#fff3e2',
|
||||||
|
|
|
@ -218,6 +218,7 @@ class Layout extends React.Component<Props, State> {
|
||||||
description="Receive Tokens Form"
|
description="Receive Tokens Form"
|
||||||
handleClose={onHide('Receive')}
|
handleClose={onHide('Receive')}
|
||||||
open={showReceive}
|
open={showReceive}
|
||||||
|
paperClassName={classes.receiveModal}
|
||||||
>
|
>
|
||||||
<Receive
|
<Receive
|
||||||
safeName={name}
|
safeName={name}
|
||||||
|
|
|
@ -17,6 +17,9 @@ export const styles = () => ({
|
||||||
user: {
|
user: {
|
||||||
justifyContent: 'left',
|
justifyContent: 'left',
|
||||||
},
|
},
|
||||||
|
receiveModal: {
|
||||||
|
height: '544px',
|
||||||
|
},
|
||||||
open: {
|
open: {
|
||||||
paddingLeft: sm,
|
paddingLeft: sm,
|
||||||
width: 'auto',
|
width: 'auto',
|
||||||
|
|
Loading…
Reference in New Issue