aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/accounts
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-11-05 03:00:56 +0800
committerDan Finlay <dan@danfinlay.com>2016-11-05 03:01:41 +0800
commit1bbe0ed9e8fb9f9944c27453cb9791686c4d8d9d (patch)
tree98fb5e3c8e47a43675f0963ef5b7f07866c243f1 /ui/app/accounts
parente3fb7fa7bbe28dcdb3202c6b228700d5812fbdf9 (diff)
downloadtangerine-wallet-browser-1bbe0ed9e8fb9f9944c27453cb9791686c4d8d9d.tar
tangerine-wallet-browser-1bbe0ed9e8fb9f9944c27453cb9791686c4d8d9d.tar.gz
tangerine-wallet-browser-1bbe0ed9e8fb9f9944c27453cb9791686c4d8d9d.tar.bz2
tangerine-wallet-browser-1bbe0ed9e8fb9f9944c27453cb9791686c4d8d9d.tar.lz
tangerine-wallet-browser-1bbe0ed9e8fb9f9944c27453cb9791686c4d8d9d.tar.xz
tangerine-wallet-browser-1bbe0ed9e8fb9f9944c27453cb9791686c4d8d9d.tar.zst
tangerine-wallet-browser-1bbe0ed9e8fb9f9944c27453cb9791686c4d8d9d.zip
Scaffold new account view
Diffstat (limited to 'ui/app/accounts')
-rw-r--r--ui/app/accounts/index.js2
-rw-r--r--ui/app/accounts/new.js60
2 files changed, 61 insertions, 1 deletions
diff --git a/ui/app/accounts/index.js b/ui/app/accounts/index.js
index 2e8321a77..65cf82b2c 100644
--- a/ui/app/accounts/index.js
+++ b/ui/app/accounts/index.js
@@ -143,7 +143,7 @@ AccountsScreen.prototype.onShowDetail = function (address, event) {
}
AccountsScreen.prototype.addNewAccount = function () {
- this.props.dispatch(actions.addNewAccount(0))
+ this.props.dispatch(actions.navigateToNewAccountScreen())
}
AccountsScreen.prototype.goHome = function () {
diff --git a/ui/app/accounts/new.js b/ui/app/accounts/new.js
new file mode 100644
index 000000000..0356bb313
--- /dev/null
+++ b/ui/app/accounts/new.js
@@ -0,0 +1,60 @@
+const inherits = require('util').inherits
+const Component = require('react').Component
+const h = require('react-hyperscript')
+const connect = require('react-redux').connect
+const TabBar = require('../components/tab-bar')
+
+module.exports = connect(mapStateToProps)(NewAccountScreen)
+
+function mapStateToProps (state) {
+ return {}
+}
+
+inherits(NewAccountScreen, Component)
+function NewAccountScreen () {
+ Component.call(this)
+}
+
+NewAccountScreen.prototype.render = function () {
+ const props = this.props
+ const state = this.state || {}
+ const subview = state.subview || 'new'
+
+ return (
+ h('.flex-column', {
+ style: {
+ },
+ }, [
+
+ // title and nav
+ h('.flex-row.space-between', {
+ style: {
+ alignItems: 'center',
+ padding: '0px 20px',
+ }
+ }, [
+ h('i.fa.fa-arrow-left.fa-lg.cursor-pointer', {
+ onClick: this.goHome.bind(this),
+ }),
+ h('h2.page-subtitle', 'Add Account'),
+ h('i', { style: { width: '18px' } }),
+ ]),
+
+ h(TabBar, {
+ tabs: [
+ { content: 'Create New', key: 'new' },
+ { content: 'Import', key: 'import' },
+ ],
+ defaultTab: 'new',
+ tabSelected: (key) => {
+ console.log('selected ' + key)
+ }
+ }),
+
+ ])
+ )
+}
+
+NewAccountScreen.prototype.goHome = function() {
+ this.props.dispatch(actions.showAccountPage())
+}