From 7cb724bfbe8cad88cfb0cbb5cac006e4535eeaa6 Mon Sep 17 00:00:00 2001 From: Jannis R Date: Thu, 3 Nov 2016 17:47:27 +0100 Subject: [PATCH 01/57] put SMS verification into action bar --- js/src/modals/index.js | 2 ++ js/src/views/Account/account.js | 31 ++++++++++++++++++++++++++++++- 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/js/src/modals/index.js b/js/src/modals/index.js index 0e8c33563..1979fb088 100644 --- a/js/src/modals/index.js +++ b/js/src/modals/index.js @@ -22,6 +22,7 @@ import EditMeta from './EditMeta'; import ExecuteContract from './ExecuteContract'; import FirstRun from './FirstRun'; import Shapeshift from './Shapeshift'; +import SMSVerification from './SMSVerification'; import Transfer from './Transfer'; import PasswordManager from './PasswordManager'; @@ -34,6 +35,7 @@ export { ExecuteContract, FirstRun, Shapeshift, + SMSVerification, Transfer, PasswordManager }; diff --git a/js/src/views/Account/account.js b/js/src/views/Account/account.js index 902e3e7c1..2e0759242 100644 --- a/js/src/views/Account/account.js +++ b/js/src/views/Account/account.js @@ -20,8 +20,9 @@ import { bindActionCreators } from 'redux'; import ContentCreate from 'material-ui/svg-icons/content/create'; import ContentSend from 'material-ui/svg-icons/content/send'; import LockIcon from 'material-ui/svg-icons/action/lock'; +import VerifyIcon from 'material-ui/svg-icons/action/verified-user'; -import { EditMeta, Shapeshift, Transfer, PasswordManager } from '../../modals'; +import { EditMeta, Shapeshift, SMSVerification, Transfer, PasswordManager } from '../../modals'; import { Actionbar, Button, Page } from '../../ui'; import shapeshiftBtn from '../../../assets/images/shapeshift-btn.png'; @@ -45,6 +46,7 @@ class Account extends Component { state = { showEditDialog: false, showFundDialog: false, + showVerificationDialog: false, showTransferDialog: false, showPasswordDialog: false } @@ -64,6 +66,7 @@ class Account extends Component {
{ this.renderEditDialog(account) } { this.renderFundDialog() } + { this.renderVerificationDialog() } { this.renderTransferDialog() } { this.renderPasswordDialog() } { this.renderActionbar() } @@ -99,6 +102,11 @@ class Account extends Component { icon={ } label='shapeshift' onClick={ this.onShapeshiftAccountClick } />, +
+ ); + } +} diff --git a/js/src/modals/SMSVerification/index.js b/js/src/modals/SMSVerification/index.js new file mode 100644 index 000000000..d9b0990db --- /dev/null +++ b/js/src/modals/SMSVerification/index.js @@ -0,0 +1,17 @@ +// Copyright 2015, 2016 Ethcore (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see . + +export default from './SMSVerification'; From fc76fa9252b7741c4c3e1e2eeebbf5f4fc578424 Mon Sep 17 00:00:00 2001 From: Jannis R Date: Thu, 3 Nov 2016 18:13:45 +0100 Subject: [PATCH 03/57] sms verification: basic stepper --- .../modals/SMSVerification/SMSVerification.js | 71 +++++++++++++++---- js/src/views/Account/account.js | 5 +- 2 files changed, 62 insertions(+), 14 deletions(-) diff --git a/js/src/modals/SMSVerification/SMSVerification.js b/js/src/modals/SMSVerification/SMSVerification.js index d68b25291..75330bd21 100644 --- a/js/src/modals/SMSVerification/SMSVerification.js +++ b/js/src/modals/SMSVerification/SMSVerification.js @@ -33,7 +33,6 @@ export default class SMSVerification extends Component { } static propTypes = { - isTest: PropTypes.bool, account: PropTypes.string, onClose: PropTypes.func.isRequired } @@ -54,36 +53,82 @@ export default class SMSVerification extends Component { } render () { + const { step } = this.state; + return ( - foo + { this.renderStep() } ); } renderDialogActions () { const { onClose, account } = this.props; + const { step } = this.state; + + const cancel = ( +