diff --git a/app/components/ens/EditOptions.js b/app/components/ens/EditOptions.js index 4f640f1..e5cddd6 100644 --- a/app/components/ens/EditOptions.js +++ b/app/components/ens/EditOptions.js @@ -2,10 +2,9 @@ import React from 'react'; import PropTypes from 'prop-types'; import { withStyles } from '@material-ui/core/styles'; import Button from '@material-ui/core/Button'; -import Avatar from '@material-ui/core/Avatar'; import List from '@material-ui/core/List'; import ListItem from '@material-ui/core/ListItem'; -import ListItemAvatar from '@material-ui/core/ListItemAvatar'; +import ListItemIcon from '@material-ui/core/ListItemIcon'; import ListItemText from '@material-ui/core/ListItemText'; import DialogTitle from '@material-ui/core/DialogTitle'; import Dialog from '@material-ui/core/Dialog'; @@ -16,6 +15,11 @@ import Typography from '@material-ui/core/Typography'; import blue from '@material-ui/core/colors/blue'; const styles = { + paper: { + margin: 0, + maxWidth: '100%', + borderRadius: '6px 6px 0 0', + }, list: { width: '100%', position: 'absolute', @@ -37,22 +41,18 @@ class SimpleDialog extends React.Component { const { classes, onClose, selectedValue, ...other } = this.props; return ( - + this.handleListItemClick('edit')} key="edit"> - - + - - + this.handleListItemClick('release')}> - - + - - + diff --git a/app/components/ens/ReleaseDomain.js b/app/components/ens/ReleaseDomain.js index 331233a..50b71a2 100644 --- a/app/components/ens/ReleaseDomain.js +++ b/app/components/ens/ReleaseDomain.js @@ -1,4 +1,5 @@ import React from 'react'; +import { withStyles } from '@material-ui/core/styles'; import Button from '@material-ui/core/Button'; import Dialog from '@material-ui/core/Dialog'; import DialogActions from '@material-ui/core/DialogActions'; @@ -6,14 +7,37 @@ import DialogContent from '@material-ui/core/DialogContent'; import DialogContentText from '@material-ui/core/DialogContentText'; import DialogTitle from '@material-ui/core/DialogTitle'; import Slide from '@material-ui/core/Slide'; +import classNames from "classnames"; function Transition(props) { return ; } -const ReleaseDomainAlert = ({ open, handleClose }) => ( +const styles = theme => ({ + dialog: { + textAlign: 'center', + }, + actions: { + background: 'rgba(255, 255, 255, 0.8)', + margin: 0, + borderTop: 'solid 1px #ccc', + }, + button: { + margin: '0', + fontSize: '17px', + color: '#007AFF', + width: '50%', + borderRight: 'solid 1px #ccc', + borderRadius: 0, + padding: '15px', + } +}); + + +const ReleaseDomainAlert = ({ classes, open, handleClose }) => (
( Your SNT deposit will be returned and name will be available to other users. - - - @@ -41,4 +65,5 @@ const ReleaseDomainAlert = ({ open, handleClose }) => (
); -export default ReleaseDomainAlert; + +export default withStyles(styles)(ReleaseDomainAlert); \ No newline at end of file diff --git a/app/components/ens/nameLookup.js b/app/components/ens/nameLookup.js index 87956b7..21a9b03 100644 --- a/app/components/ens/nameLookup.js +++ b/app/components/ens/nameLookup.js @@ -65,16 +65,26 @@ const validTimestamp = timestamp => Number(timestamp) > 99999999; const generatePrettyDate = timestamp => new Date(timestamp * 1000).toDateString(); const DisplayBox = ({ displayType, pubKey }) => ( -
-
-
{displayType}
- {pubKey} +
+
{displayType}
+
+
+ {pubKey} +
); const MobileAddressDisplay = ({ domainName, address, statusAccount, releaseTime, defaultAccount, isOwner, edit, onSubmit }) => ( + - - {isOwner - ? edit ? 'Edit Contact Code' : 'You\'re the owner of this name' - : 'Name is unavailable'} + + Registered {validTimestamp(expirationTime)} {edit ? 'The contact code connects the domain with a unique Status account' - : validAddress(address) ? 'registered to the addresses below' : 'Click \'Edit\' to add a valid address and contact code'} + : validAddress(address) ? 'to the addresses below' : 'Click \'Edit\' to add a valid address and contact code'} {edit && } - {!edit && } - {!edit && validStatusAddress(statusAccount) && } + {!edit && } + {!edit && validStatusAddress(statusAccount) && } ) @@ -148,7 +156,7 @@ class RenderAddresses extends PureComponent { {submitted ? : { this.setState({ submitted: true}) }}/>} - {isOwner && !editAction && } + {isOwner && !editAction && } @@ -171,17 +179,20 @@ const RegisterInfoCard = ({ formattedDomain, domainPrice, registryOwnsDomain }) }> {formattedDomain.toLowerCase()} -
- {!!domainPrice && formatPrice(fromWei(domainPrice))} SNT / 1 year +
+ available
+ + {!!domainPrice && formatPrice(fromWei(domainPrice))} SNT to register + {registryOwnsDomain ? - 'This name will be pointed to the wallet address and contact code below' : - 'This domain is not owned by the registy'} + 'Add your contact code to use your name in Status chat.' : + 'This domain is not owned by the registry'} @@ -336,15 +347,15 @@ const InnerForm = ({ ownerAddress={status.ownerAddress} registryOwnsDomain={status.registryOwnsDomain} setStatus={setStatus} /> : -
- - -
+
+ + +
}
) diff --git a/app/components/ens/registerSubDomain.js b/app/components/ens/registerSubDomain.js index 59c98da..b1fd569 100644 --- a/app/components/ens/registerSubDomain.js +++ b/app/components/ens/registerSubDomain.js @@ -13,12 +13,25 @@ import { zeroAddress, zeroBytes32, formatPrice } from './utils'; import { getStatusContactCode, getSNTAllowance, getCurrentAccount } from '../../reducers/accounts'; import FieldGroup from '../standard/FieldGroup'; import LinearProgress from '@material-ui/core/LinearProgress'; +import Typography from '@material-ui/core/Typography'; import TokenPermissions from '../standard/TokenPermissionConnect'; import { generateXY } from '../../utils/ecdsa'; import { getResolver } from './utils/domain'; const { soliditySha3, fromWei } = web3.utils; + +const DisplayBox = ({ displayType, pubKey }) => ( +
+
{displayType}
+
+
+ {pubKey} +
+
+
+); + const InnerForm = ({ values, errors, @@ -102,28 +115,43 @@ const InnerForm = ({ /> {!isSubmitting ? : } + - - setFieldValue('statusAddress', '')} - wide /> - - - setFieldValue('address', '')} - required - wide /> - + + + + + + {/*
Your contact code
*/} + {/*
*/} + {/*
*/} + {/* setFieldValue('statusAddress', '')} style={{ textAlign: 'center', padding: '30px 0', color: 'blue', cursor: 'pointer'}}>*/} + {/*Grant Access*/} + {/**/} + {/*
*/} + {/*
*/} + + {/**/} + {/* setFieldValue('address', '')}*/} + {/*required*/} + {/*wide />*/} + {/**/} + {/**/} + {/* setFieldValue('statusAddress', '')}*/} + {/*wide />*/} + {/**/}
{!isSubmitting ? : }
diff --git a/app/components/ens/terms.css b/app/components/ens/terms.css new file mode 100644 index 0000000..6a7dc8c --- /dev/null +++ b/app/components/ens/terms.css @@ -0,0 +1,10 @@ +.ens-terms__title { + padding: 40px 24px; + background: #EEF2F5; + border-radius: 4px; + margin-bottom: 30px; +} + +.ens-terms li { + +} \ No newline at end of file diff --git a/app/components/ens/terms.js b/app/components/ens/terms.js new file mode 100644 index 0000000..96d556b --- /dev/null +++ b/app/components/ens/terms.js @@ -0,0 +1,49 @@ +import React from 'react'; +import classNames from 'classnames'; +import { withStyles } from '@material-ui/core/styles'; +import Button from '@material-ui/core/Button'; + +import './terms.css'; + +const styles = theme => ({ + button: { + margin: theme.spacing.unit, + borderRadius: '4px', + backgroundColor: 'rgba(67, 96, 223, 0.1)', + } +}); + +const buttonText = { color: '#4360df', margin: '0 20px', fontWeight: 300 }; + + +const Terms = ({ classes, toggleSearch }) => ( +
+

Terms of name registration

+
    +
  • Funds are deposited for 1 year. Your SNT 
will be locked, but not spent.
  • +
  • After 1 year, you can release the name and get your deposit back, or take no action to keep the name.
  • +
  • If terms of the contract change — e.g. Status makes contract upgrades — user has the right to release the username regardless of time held.
  • +
  • The contract controller cannot access your deposited funds. They can only be moved back to the address that sent them.
  • +
  • Your address(es) will be publicly associated with your ENS name.
  • +
  • Usernames are created as subdomain nodes of stateofus.eth and are subject to the ENS smart contract terms.
  • +
  • You authorize the contract to transfer SNT on your behalf. This can only occur when you approve a transaction to authorize the transfer.
  • +
+ +

These terms are guaranteed by the smart contract logic at addresses:

+ +
    +
  • 0xb1C47B61CDaeee3fA85Fe8B93FcE6311165E6291 (ENSSubdomainRegistry — Status)
  • +
+ + +
    +
  • 0x112234455C3a32FD11230C42E7Bccd4A84e02010 (ENS).
  • +
+ + +
+); + +export default withStyles(styles)(Terms); diff --git a/app/dapp.css b/app/dapp.css index 89d945c..e6ff7fe 100644 --- a/app/dapp.css +++ b/app/dapp.css @@ -1,5 +1,6 @@ body { font-family: 'Roboto', sans-serif; + margin: 0; } .accounts { diff --git a/app/ui/components/MobileSearch.js b/app/ui/components/MobileSearch.js index 3c9c582..6ef7f97 100644 --- a/app/ui/components/MobileSearch.js +++ b/app/ui/components/MobileSearch.js @@ -13,6 +13,7 @@ const searchWrapper = { alignItems: 'center', justifyContent: 'flex-start', paddingLeft: '11px', + boxSizing: 'border-box', }; const pasteStyle = { @@ -23,7 +24,7 @@ const pasteStyle = { const MobileInput = styled.input` display: block; - border-radius: 4px; + border-radius: 0; background-color: #eef2f5; font-size: 16px; border: none;