Merge pull request #1022 from MetaMask/i715-AddImportMenu
Add ability to import private keysfeature/default_network_editable
commit
28212d167c
@ -0,0 +1,84 @@ |
||||
{ |
||||
"metamask": { |
||||
"isInitialized": true, |
||||
"isUnlocked": true, |
||||
"rpcTarget": "https://rawtestrpc.metamask.io/", |
||||
"identities": { |
||||
"0x58bda1f9d87dc7d2bcc6f7c2513efc9d03fca683": { |
||||
"address": "0x58bda1f9d87dc7d2bcc6f7c2513efc9d03fca683", |
||||
"name": "Account 1" |
||||
}, |
||||
"0x9858e7d8b79fc3e6d989636721584498926da38a": { |
||||
"address": "0x9858e7d8b79fc3e6d989636721584498926da38a", |
||||
"name": "Imported Account" |
||||
} |
||||
}, |
||||
"unconfTxs": {}, |
||||
"currentFiat": "USD", |
||||
"conversionRate": 10.19458075, |
||||
"conversionDate": 1484696373, |
||||
"noActiveNotices": true, |
||||
"network": "3", |
||||
"accounts": { |
||||
"0x58bda1f9d87dc7d2bcc6f7c2513efc9d03fca683": { |
||||
"code": "0x", |
||||
"balance": "0x0", |
||||
"nonce": "0x0", |
||||
"address": "0x58bda1f9d87dc7d2bcc6f7c2513efc9d03fca683" |
||||
}, |
||||
"0x9858e7d8b79fc3e6d989636721584498926da38a": { |
||||
"code": "0x", |
||||
"balance": "0x0", |
||||
"nonce": "0x0", |
||||
"address": "0x9858e7d8b79fc3e6d989636721584498926da38a" |
||||
} |
||||
}, |
||||
"transactions": [], |
||||
"provider": { |
||||
"type": "testnet" |
||||
}, |
||||
"selectedAccount": "0x9858e7d8b79fc3e6d989636721584498926da38a", |
||||
"selectedAccountTxList": [], |
||||
"isDisclaimerConfirmed": true, |
||||
"unconfMsgs": {}, |
||||
"messages": [], |
||||
"shapeShiftTxList": [], |
||||
"keyringTypes": [ |
||||
"Simple Key Pair", |
||||
"HD Key Tree" |
||||
], |
||||
"keyrings": [ |
||||
{ |
||||
"type": "HD Key Tree", |
||||
"accounts": [ |
||||
"58bda1f9d87dc7d2bcc6f7c2513efc9d03fca683" |
||||
] |
||||
}, |
||||
{ |
||||
"type": "Simple Key Pair", |
||||
"accounts": [ |
||||
"0x9858e7d8b79fc3e6d989636721584498926da38a" |
||||
] |
||||
} |
||||
], |
||||
"lostAccounts": [], |
||||
"seedWords": null |
||||
}, |
||||
"appState": { |
||||
"menuOpen": false, |
||||
"currentView": { |
||||
"name": "accounts" |
||||
}, |
||||
"accountDetail": { |
||||
"subview": "transactions", |
||||
"accountExport": "none", |
||||
"privateKey": "" |
||||
}, |
||||
"transForward": true, |
||||
"isLoading": false, |
||||
"warning": null, |
||||
"scrollToBottom": false, |
||||
"forgottenPassword": false |
||||
}, |
||||
"identities": {} |
||||
} |
@ -0,0 +1,124 @@ |
||||
{ |
||||
"metamask": { |
||||
"isInitialized": true, |
||||
"isUnlocked": true, |
||||
"rpcTarget": "https://rawtestrpc.metamask.io/", |
||||
"identities": { |
||||
"0xac39b311dceb2a4b2f5d8461c1cdaf756f4f7ae9": { |
||||
"address": "0xac39b311dceb2a4b2f5d8461c1cdaf756f4f7ae9", |
||||
"name": "Account 1" |
||||
}, |
||||
"0xd7c0cd9e7d2701c710d64fc492c7086679bdf7b4": { |
||||
"address": "0xd7c0cd9e7d2701c710d64fc492c7086679bdf7b4", |
||||
"name": "Account 2" |
||||
}, |
||||
"0x1acfb961c5a8268eac8e09d6241a26cbeff42241": { |
||||
"address": "0x1acfb961c5a8268eac8e09d6241a26cbeff42241", |
||||
"name": "Account 3" |
||||
}, |
||||
"0xabc2bca51709b8615147352c62420f547a63a00c": { |
||||
"address": "0xabc2bca51709b8615147352c62420f547a63a00c", |
||||
"name": "Account 4" |
||||
} |
||||
}, |
||||
"unconfTxs": { |
||||
"7992944905869041": { |
||||
"id": 7992944905869041, |
||||
"txParams": { |
||||
"from": "0xac39b311dceb2a4b2f5d8461c1cdaf756f4f7ae9", |
||||
"value": "0x0", |
||||
"data": "0x606060405234610000575b60da806100186000396000f30060606040526000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630dbe671f14603c575b6000565b3460005760466088565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16815600a165627a7a72305820a99dfa6091771f518dd1ae8d1ee347bae3304dffd98fd24b1b99a8380bc60a750029", |
||||
"gas": "0x1af75", |
||||
"metamaskId": 7992944905869041, |
||||
"metamaskNetworkId": "3" |
||||
}, |
||||
"time": 1482279685589, |
||||
"status": "unconfirmed", |
||||
"gasMultiplier": 1, |
||||
"metamaskNetworkId": "3", |
||||
"gasLimitSpecified": true, |
||||
"estimatedGas": "0x1af75", |
||||
"simulationFails": true |
||||
} |
||||
}, |
||||
"currentFiat": "USD", |
||||
"conversionRate": 7.69158136, |
||||
"conversionDate": 1482279663, |
||||
"noActiveNotices": true, |
||||
"network": "3", |
||||
"accounts": { |
||||
"0xac39b311dceb2a4b2f5d8461c1cdaf756f4f7ae9": { |
||||
"code": "0x", |
||||
"nonce": "0x3", |
||||
"balance": "0x11f646fe14c9c000", |
||||
"address": "0xac39b311dceb2a4b2f5d8461c1cdaf756f4f7ae9" |
||||
}, |
||||
"0xd7c0cd9e7d2701c710d64fc492c7086679bdf7b4": { |
||||
"code": "0x", |
||||
"nonce": "0x0", |
||||
"balance": "0x0", |
||||
"address": "0xd7c0cd9e7d2701c710d64fc492c7086679bdf7b4" |
||||
}, |
||||
"0x1acfb961c5a8268eac8e09d6241a26cbeff42241": { |
||||
"code": "0x", |
||||
"balance": "0x0", |
||||
"nonce": "0x0", |
||||
"address": "0x1acfb961c5a8268eac8e09d6241a26cbeff42241" |
||||
}, |
||||
"0xabc2bca51709b8615147352c62420f547a63a00c": { |
||||
"code": "0x", |
||||
"balance": "0x0", |
||||
"nonce": "0x0", |
||||
"address": "0xabc2bca51709b8615147352c62420f547a63a00c" |
||||
} |
||||
}, |
||||
"transactions": [ |
||||
{ |
||||
"id": 7992944905869041, |
||||
"txParams": { |
||||
"from": "0xac39b311dceb2a4b2f5d8461c1cdaf756f4f7ae9", |
||||
"value": "0x0", |
||||
"data": "0x606060405234610000575b60da806100186000396000f30060606040526000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630dbe671f14603c575b6000565b3460005760466088565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16815600a165627a7a72305820a99dfa6091771f518dd1ae8d1ee347bae3304dffd98fd24b1b99a8380bc60a750029", |
||||
"gas": "0x1af75", |
||||
"metamaskId": 7992944905869041, |
||||
"metamaskNetworkId": "3" |
||||
}, |
||||
"time": 1482279685589, |
||||
"status": "unconfirmed", |
||||
"gasMultiplier": 1, |
||||
"metamaskNetworkId": "3", |
||||
"gasLimitSpecified": true, |
||||
"estimatedGas": "0x1af75", |
||||
"simulationFails": true |
||||
} |
||||
], |
||||
"provider": { |
||||
"type": "testnet" |
||||
}, |
||||
"selectedAccount": "0xac39b311dceb2a4b2f5d8461c1cdaf756f4f7ae9", |
||||
"seedWords": false, |
||||
"isDisclaimerConfirmed": true, |
||||
"unconfMsgs": {}, |
||||
"messages": [], |
||||
"shapeShiftTxList": [], |
||||
"keyringTypes": [ |
||||
"Simple Key Pair", |
||||
"HD Key Tree" |
||||
], |
||||
"lostAccounts": [] |
||||
}, |
||||
"appState": { |
||||
"menuOpen": false, |
||||
"currentView": { |
||||
"name": "confTx", |
||||
"context": 0 |
||||
}, |
||||
"accountDetail": { |
||||
"subview": "transactions" |
||||
}, |
||||
"transForward": true, |
||||
"isLoading": false, |
||||
"warning": null |
||||
}, |
||||
"identities": {} |
||||
} |
@ -0,0 +1,92 @@ |
||||
{ |
||||
"metamask": { |
||||
"isInitialized": true, |
||||
"isUnlocked": true, |
||||
"rpcTarget": "https://rawtestrpc.metamask.io/", |
||||
"identities": { |
||||
"0x01208723ba84e15da2e71656544a2963b0c06d40": { |
||||
"address": "0x01208723ba84e15da2e71656544a2963b0c06d40", |
||||
"name": "Account 1" |
||||
} |
||||
}, |
||||
"unconfTxs": {}, |
||||
"currentFiat": "USD", |
||||
"conversionRate": 10.1219126, |
||||
"conversionDate": 1484695442, |
||||
"noActiveNotices": true, |
||||
"network": "3", |
||||
"accounts": { |
||||
"0x01208723ba84e15da2e71656544a2963b0c06d40": { |
||||
"nonce": "0x0", |
||||
"balance": "0x0", |
||||
"code": "0x", |
||||
"address": "0x01208723ba84e15da2e71656544a2963b0c06d40" |
||||
} |
||||
}, |
||||
"transactions": [], |
||||
"provider": { |
||||
"type": "testnet" |
||||
}, |
||||
"selectedAccount": "0x01208723ba84e15da2e71656544a2963b0c06d40", |
||||
"selectedAccountTxList": [], |
||||
"seedWords": false, |
||||
"isDisclaimerConfirmed": true, |
||||
"unconfMsgs": {}, |
||||
"messages": [], |
||||
"shapeShiftTxList": [], |
||||
"keyringTypes": [ |
||||
"Simple Key Pair", |
||||
"HD Key Tree" |
||||
], |
||||
"keyrings": [ |
||||
{ |
||||
"type": "Simple Key Pair", |
||||
"accounts": [] |
||||
}, |
||||
{ |
||||
"type": "Simple Key Pair", |
||||
"accounts": [] |
||||
}, |
||||
{ |
||||
"type": "Simple Key Pair", |
||||
"accounts": [] |
||||
}, |
||||
{ |
||||
"type": "Simple Key Pair", |
||||
"accounts": [] |
||||
}, |
||||
{ |
||||
"type": "Simple Key Pair", |
||||
"accounts": [] |
||||
}, |
||||
{ |
||||
"type": "Simple Key Pair", |
||||
"accounts": [] |
||||
}, |
||||
{ |
||||
"type": "Simple Key Pair", |
||||
"accounts": [] |
||||
}, |
||||
{ |
||||
"type": "HD Key Tree", |
||||
"accounts": [ |
||||
"01208723ba84e15da2e71656544a2963b0c06d40" |
||||
] |
||||
} |
||||
], |
||||
"lostAccounts": [] |
||||
}, |
||||
"appState": { |
||||
"menuOpen": false, |
||||
"currentView": { |
||||
"name": "import-menu" |
||||
}, |
||||
"accountDetail": { |
||||
"subview": "transactions" |
||||
}, |
||||
"transForward": true, |
||||
"isLoading": false, |
||||
"warning": "Invalid hex string" |
||||
}, |
||||
"identities": {} |
||||
} |
@ -0,0 +1,64 @@ |
||||
{ |
||||
"metamask": { |
||||
"isInitialized": true, |
||||
"isUnlocked": true, |
||||
"rpcTarget": "https://rawtestrpc.metamask.io/", |
||||
"identities": { |
||||
"0x01208723ba84e15da2e71656544a2963b0c06d40": { |
||||
"address": "0x01208723ba84e15da2e71656544a2963b0c06d40", |
||||
"name": "Account 1" |
||||
} |
||||
}, |
||||
"unconfTxs": {}, |
||||
"currentFiat": "USD", |
||||
"conversionRate": 10.10788584, |
||||
"conversionDate": 1484694362, |
||||
"noActiveNotices": true, |
||||
"network": "3", |
||||
"accounts": { |
||||
"0x01208723ba84e15da2e71656544a2963b0c06d40": { |
||||
"balance": "0x0", |
||||
"code": "0x", |
||||
"nonce": "0x0", |
||||
"address": "0x01208723ba84e15da2e71656544a2963b0c06d40" |
||||
} |
||||
}, |
||||
"transactions": [], |
||||
"provider": { |
||||
"type": "testnet" |
||||
}, |
||||
"selectedAccount": "0x01208723ba84e15da2e71656544a2963b0c06d40", |
||||
"selectedAccountTxList": [], |
||||
"seedWords": null, |
||||
"isDisclaimerConfirmed": true, |
||||
"unconfMsgs": {}, |
||||
"messages": [], |
||||
"shapeShiftTxList": [], |
||||
"keyringTypes": [ |
||||
"Simple Key Pair", |
||||
"HD Key Tree" |
||||
], |
||||
"keyrings": [ |
||||
{ |
||||
"type": "HD Key Tree", |
||||
"accounts": [ |
||||
"01208723ba84e15da2e71656544a2963b0c06d40" |
||||
] |
||||
} |
||||
], |
||||
"lostAccounts": [] |
||||
}, |
||||
"appState": { |
||||
"menuOpen": false, |
||||
"currentView": { |
||||
"name": "import-menu" |
||||
}, |
||||
"accountDetail": { |
||||
"subview": "transactions" |
||||
}, |
||||
"transForward": true, |
||||
"isLoading": false, |
||||
"warning": null |
||||
}, |
||||
"identities": {} |
||||
} |
@ -0,0 +1,66 @@ |
||||
{ |
||||
"metamask": { |
||||
"isInitialized": true, |
||||
"isUnlocked": true, |
||||
"rpcTarget": "https://rawtestrpc.metamask.io/", |
||||
"identities": { |
||||
"0xa6ef573d60594731178b7f85d80da13cc2af52dd": { |
||||
"address": "0xa6ef573d60594731178b7f85d80da13cc2af52dd", |
||||
"name": "Dan! 1" |
||||
}, |
||||
"0xf9f52e84ad2c9122caa87478d27041ddaa215666": { |
||||
"address": "0xf9f52e84ad2c9122caa87478d27041ddaa215666", |
||||
"name": "Account 2" |
||||
} |
||||
}, |
||||
"unconfTxs": {}, |
||||
"currentFiat": "USD", |
||||
"conversionRate": 10.92067835, |
||||
"conversionDate": 1478282884, |
||||
"network": null, |
||||
"accounts": { |
||||
"0xa6ef573d60594731178b7f85d80da13cc2af52dd": { |
||||
"balance": "0x00", |
||||
"nonce": "0x100000", |
||||
"code": "0x", |
||||
"address": "0xa6ef573d60594731178b7f85d80da13cc2af52dd" |
||||
}, |
||||
"0xf9f52e84ad2c9122caa87478d27041ddaa215666": { |
||||
"balance": "0x00", |
||||
"nonce": "0x100000", |
||||
"code": "0x", |
||||
"address": "0xf9f52e84ad2c9122caa87478d27041ddaa215666" |
||||
} |
||||
}, |
||||
"transactions": [], |
||||
"provider": { |
||||
"type": "testnet" |
||||
}, |
||||
"selectedAccount": "0xa6ef573d60594731178b7f85d80da13cc2af52dd", |
||||
"isConfirmed": true, |
||||
"unconfMsgs": {}, |
||||
"messages": [], |
||||
"selectedAddress": "0xa6ef573d60594731178b7f85d80da13cc2af52dd", |
||||
"shapeShiftTxList": [], |
||||
"keyringTypes": [ |
||||
"Simple Key Pair", |
||||
"HD Key Tree" |
||||
] |
||||
}, |
||||
"appState": { |
||||
"menuOpen": false, |
||||
"currentView": { |
||||
"name": "new-account" |
||||
}, |
||||
"accountDetail": { |
||||
"subview": "transactions" |
||||
}, |
||||
"transForward": true, |
||||
"isLoading": false, |
||||
"warning": null, |
||||
"forgottenPassword": null, |
||||
"detailView": {}, |
||||
"scrollToBottom": false |
||||
}, |
||||
"identities": {} |
||||
} |
@ -0,0 +1,91 @@ |
||||
const inherits = require('util').inherits |
||||
const Component = require('react').Component |
||||
const h = require('react-hyperscript') |
||||
const connect = require('react-redux').connect |
||||
import Select from 'react-select' |
||||
|
||||
// Subviews
|
||||
const JsonImportView = require('./json.js') |
||||
const SeedImportView = require('./seed.js') |
||||
const PrivateKeyImportView = require('./private-key.js') |
||||
|
||||
const menuItems = [ |
||||
'Private Key', |
||||
] |
||||
|
||||
module.exports = connect(mapStateToProps)(AccountImportSubview) |
||||
|
||||
function mapStateToProps (state) { |
||||
return { |
||||
menuItems, |
||||
} |
||||
} |
||||
|
||||
inherits(AccountImportSubview, Component) |
||||
function AccountImportSubview () { |
||||
Component.call(this) |
||||
} |
||||
|
||||
AccountImportSubview.prototype.render = function () { |
||||
const props = this.props |
||||
const state = this.state || {} |
||||
const { menuItems } = props |
||||
const { type } = state |
||||
|
||||
return ( |
||||
h('div', { |
||||
style: { |
||||
}, |
||||
}, [ |
||||
h('div', { |
||||
style: { |
||||
padding: '10px', |
||||
color: 'rgb(174, 174, 174)', |
||||
}, |
||||
}, [ |
||||
|
||||
h('h3', { style: { padding: '3px' } }, 'SELECT TYPE'), |
||||
|
||||
h('style', ` |
||||
.has-value.Select--single > .Select-control .Select-value .Select-value-label, .Select-value-label { |
||||
color: rgb(174,174,174); |
||||
} |
||||
`),
|
||||
|
||||
h(Select, { |
||||
name: 'import-type-select', |
||||
clearable: false, |
||||
value: type || menuItems[0], |
||||
options: menuItems.map((type) => { |
||||
return { |
||||
value: type, |
||||
label: type, |
||||
} |
||||
}), |
||||
onChange: (opt) => { |
||||
this.setState({ type: opt.value }) |
||||
}, |
||||
}), |
||||
]), |
||||
|
||||
this.renderImportView(), |
||||
]) |
||||
) |
||||
} |
||||
|
||||
AccountImportSubview.prototype.renderImportView = function() { |
||||
const props = this.props |
||||
const state = this.state || {} |
||||
const { type } = state |
||||
const { menuItems } = props |
||||
const current = type || menuItems[0] |
||||
|
||||
switch (current) { |
||||
case 'HD Key Tree': |
||||
return h(SeedImportView) |
||||
case 'Private Key': |
||||
return h(PrivateKeyImportView) |
||||
default: |
||||
return h(JsonImportView) |
||||
} |
||||
} |
@ -0,0 +1,27 @@ |
||||
const inherits = require('util').inherits |
||||
const Component = require('react').Component |
||||
const h = require('react-hyperscript') |
||||
const connect = require('react-redux').connect |
||||
|
||||
module.exports = connect(mapStateToProps)(JsonImportSubview) |
||||
|
||||
function mapStateToProps (state) { |
||||
return {} |
||||
} |
||||
|
||||
inherits(JsonImportSubview, Component) |
||||
function JsonImportSubview () { |
||||
Component.call(this) |
||||
} |
||||
|
||||
JsonImportSubview.prototype.render = function () { |
||||
return ( |
||||
h('div', { |
||||
style: { |
||||
}, |
||||
}, [ |
||||
`Upload your json file here!`, |
||||
]) |
||||
) |
||||
} |
||||
|
@ -0,0 +1,69 @@ |
||||
const inherits = require('util').inherits |
||||
const Component = require('react').Component |
||||
const h = require('react-hyperscript') |
||||
const connect = require('react-redux').connect |
||||
const type = 'Simple Key Pair' |
||||
const actions = require('../../actions') |
||||
|
||||
module.exports = connect(mapStateToProps)(PrivateKeyImportView) |
||||
|
||||
function mapStateToProps (state) { |
||||
return { |
||||
error: state.appState.warning, |
||||
} |
||||
} |
||||
|
||||
inherits(PrivateKeyImportView, Component) |
||||
function PrivateKeyImportView () { |
||||
Component.call(this) |
||||
} |
||||
|
||||
PrivateKeyImportView.prototype.render = function () { |
||||
const { error } = this.props |
||||
|
||||
return ( |
||||
h('div', { |
||||
style: { |
||||
display: 'flex', |
||||
flexDirection: 'column', |
||||
alignItems: 'center', |
||||
padding: '5px 15px 0px 15px', |
||||
}, |
||||
}, [ |
||||
h('span', 'Paste your private key string here'), |
||||
|
||||
h('input.large-input.letter-spacey', { |
||||
type: 'password', |
||||
id: 'private-key-box', |
||||
onKeyPress: this.createKeyringOnEnter.bind(this), |
||||
style: { |
||||
width: 260, |
||||
marginTop: 12, |
||||
}, |
||||
}), |
||||
|
||||
h('button.primary', { |
||||
onClick: this.createNewKeychain.bind(this), |
||||
style: { |
||||
margin: 12, |
||||
}, |
||||
}, 'Import'), |
||||
|
||||
error ? h('span.warning', error) : null, |
||||
]) |
||||
) |
||||
} |
||||
|
||||
PrivateKeyImportView.prototype.createKeyringOnEnter = function (event) { |
||||
if (event.key === 'Enter') { |
||||
event.preventDefault() |
||||
this.createNewKeychain() |
||||
} |
||||
} |
||||
|
||||
PrivateKeyImportView.prototype.createNewKeychain = function () { |
||||
const input = document.getElementById('private-key-box') |
||||
const privateKey = input.value |
||||
this.props.dispatch(actions.addNewKeyring(type, [ privateKey ])) |
||||
} |
||||
|
@ -0,0 +1,30 @@ |
||||
const inherits = require('util').inherits |
||||
const Component = require('react').Component |
||||
const h = require('react-hyperscript') |
||||
const connect = require('react-redux').connect |
||||
|
||||
module.exports = connect(mapStateToProps)(SeedImportSubview) |
||||
|
||||
function mapStateToProps (state) { |
||||
return {} |
||||
} |
||||
|
||||
inherits(SeedImportSubview, Component) |
||||
function SeedImportSubview () { |
||||
Component.call(this) |
||||
} |
||||
|
||||
SeedImportSubview.prototype.render = function () { |
||||
return ( |
||||
h('div', { |
||||
style: { |
||||
}, |
||||
}, [ |
||||
`Paste your seed phrase here!`, |
||||
h('textarea'), |
||||
h('br'), |
||||
h('button', 'Submit'), |
||||
]) |
||||
) |
||||
} |
||||
|
@ -0,0 +1,35 @@ |
||||
const Component = require('react').Component |
||||
const h = require('react-hyperscript') |
||||
const inherits = require('util').inherits |
||||
|
||||
module.exports = TabBar |
||||
|
||||
inherits(TabBar, Component) |
||||
function TabBar () { |
||||
Component.call(this) |
||||
} |
||||
|
||||
TabBar.prototype.render = function () { |
||||
const props = this.props |
||||
const state = this.state || {} |
||||
const { tabs = [], defaultTab, tabSelected } = props |
||||
const { subview = defaultTab } = state |
||||
|
||||
return ( |
||||
h('.flex-row.space-around.text-transform-uppercase', { |
||||
style: { |
||||
background: '#EBEBEB', |
||||
color: '#AEAEAE', |
||||
paddingTop: '4px', |
||||
}, |
||||
}, tabs.map((tab) => { |
||||
const { key, content } = tab |
||||
return h(subview === key ? '.activeForm' : '.inactiveForm.pointer', { |
||||
onClick: () => { |
||||
this.setState({ subview: key }) |
||||
tabSelected(key) |
||||
}, |
||||
}, content) |
||||
})) |
||||
) |
||||
} |
Loading…
Reference in new issue