From 2330ac966ea48235b815f1da5baa23f52a637a96 Mon Sep 17 00:00:00 2001 From: Aleksandr Pantiukhov Date: Tue, 9 Oct 2018 18:39:37 +0200 Subject: [PATCH] Better terms and conditions --- app/actions/accounts.js | 6 +- app/components/ens/DisplayBox.js | 4 +- app/components/ens/terms.css | 10 --- app/components/ens/terms.js | 114 +++++++++++++++++++++---------- app/dapp.js | 2 +- app/reducers/accounts.js | 8 +-- 6 files changed, 87 insertions(+), 57 deletions(-) delete mode 100644 app/components/ens/terms.css diff --git a/app/actions/accounts.js b/app/actions/accounts.js index 4d5dafa..d172543 100644 --- a/app/actions/accounts.js +++ b/app/actions/accounts.js @@ -30,9 +30,9 @@ export const checkAndDispatchStatusContactCode = dispatch => { dispatch(receiveStatusContactCode(data)); }) .catch(err => { - console.log('Error:', err); + console.warn('Error:', err); }) -} +}; export const fetchAndDispatchSNTAllowance = dispatch => { const { methods: { allowance } } = TestToken; @@ -43,4 +43,4 @@ export const fetchAndDispatchSNTAllowance = dispatch => { .then(allowance => { dispatch(receiveSntAllowance(allowance)) }) -} +}; diff --git a/app/components/ens/DisplayBox.js b/app/components/ens/DisplayBox.js index 41e0f10..40c24fe 100644 --- a/app/components/ens/DisplayBox.js +++ b/app/components/ens/DisplayBox.js @@ -23,11 +23,11 @@ const DisplayBox = styled.div` `; const WrappedDisplayBox = ({displayType, pubKey, getStatusContactCode}) => ( -
getStatusContactCode(displayType, pubKey)}> +
{displayType} - + getStatusContactCode(displayType, pubKey)}>
{pubKey}
diff --git a/app/components/ens/terms.css b/app/components/ens/terms.css deleted file mode 100644 index 6a7dc8c..0000000 --- a/app/components/ens/terms.css +++ /dev/null @@ -1,10 +0,0 @@ -.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 index 153a21b..6eac9cf 100644 --- a/app/components/ens/terms.js +++ b/app/components/ens/terms.js @@ -1,55 +1,95 @@ import React from 'react'; import classNames from 'classnames'; -import { withStyles } from '@material-ui/core/styles'; -import Button from '@material-ui/core/Button'; +import {withStyles} from '@material-ui/core/styles'; import Dialog from '@material-ui/core/Dialog'; +import {Button} from '../../ui/components'; +import styled from "styled-components"; -import './terms.css'; +const TermsContainer = styled.div` + word-wrap: break-word; +`; -const styles = theme => ({ - button: { - margin: theme.spacing.unit, - borderRadius: '4px', - backgroundColor: 'rgba(67, 96, 223, 0.1)', +const TermsDescription = styled.div` + padding: 24px; + font-size: 14px; + line-height: 20.5px; +`; + +const InfoHeading = styled.h2` + line-height: 26px; + font-size: 22px; + text-align: center; + letter-spacing: -0.275px; + padding: 40px 24px; + background: #EEF2F5; + margin: 0; + color: #000000; +`; + +const ListContainer = styled.ul` + padding-left: 16px; + + li { + margin-bottom: 16px; + padding-left: 12px; } -}); +`; + +const StyledButton = styled(Button)` + background-color: rgba(67, 96, 223, 0.1); + + div { + color: #4360df; + margin: 0 20px; + font-weight: 400; + text-transform: uppercase; + } +`; const buttonText = { color: '#4360df', margin: '0 20px', fontWeight: 300 }; - const Terms = ({ classes, open, onSubmit }) => ( - -
-

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.
  • -
+ + + Terms of name registration -

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

+ + +
  • 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. +
  • +
    -
      -
    • 0xb1C47B61CDaeee3fA85Fe8B93FcE6311165E6291 (ENSSubdomainRegistry — Status)
    • -
    +

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

    + +
  • 0xb1C47B61CDaeee3fA85Fe8B93FcE6311165E6291 (ENSSubdomainRegistry — Status)
  • +
    -
      -
    • 0x112234455C3a32FD11230C42E7Bccd4A84e02010 (ENS).
    • -
    + +
  • 0x112234455C3a32FD11230C42E7Bccd4A84e02010 (ENS).
  • +
    - -
    +
    + +
    Let's Go
    +
    +
    + +
    ); -export default withStyles(styles)(Terms); +export default Terms; diff --git a/app/dapp.js b/app/dapp.js index 7cabf36..f24f98f 100644 --- a/app/dapp.js +++ b/app/dapp.js @@ -60,7 +60,7 @@ class App extends React.Component { const { admin, network } = this.state; return ( - +
    diff --git a/app/reducers/accounts.js b/app/reducers/accounts.js index 6b2d0da..2993b5b 100644 --- a/app/reducers/accounts.js +++ b/app/reducers/accounts.js @@ -56,12 +56,12 @@ export default function(state = { loading: true, accounts: [] }, action) { } } case types.RECEIVE_STATUS_CONTACT_CODE: { - const { statusContactCode } = action.payload - return { ...state, statusContactCode } + const { statusContactCode } = action.payload; + return { ...state, statusContactCode }; } case types.RECEIVE_SNT_ALLOWANCE: { - const { SNTAllowance } = action.payload - return { ...state, SNTAllowance } + const { SNTAllowance } = action.payload; + return { ...state, SNTAllowance }; } default: return state;