diff options
author | Frankie <frankie.pangilinan@consensys.net> | 2016-06-30 06:04:16 +0800 |
---|---|---|
committer | Frankie <frankie.pangilinan@consensys.net> | 2016-06-30 06:04:16 +0800 |
commit | 2c36c17238b7641295e1ed6e51e11b2842c03fdb (patch) | |
tree | 32a489fceb1678e671559569a9ce193840ed6b5f /ui/app/components/drop-menu-item.js | |
parent | 8d9a0e71771db12757f8f9dc4c3682f5e377a6b6 (diff) | |
download | tangerine-wallet-browser-2c36c17238b7641295e1ed6e51e11b2842c03fdb.tar tangerine-wallet-browser-2c36c17238b7641295e1ed6e51e11b2842c03fdb.tar.gz tangerine-wallet-browser-2c36c17238b7641295e1ed6e51e11b2842c03fdb.tar.bz2 tangerine-wallet-browser-2c36c17238b7641295e1ed6e51e11b2842c03fdb.tar.lz tangerine-wallet-browser-2c36c17238b7641295e1ed6e51e11b2842c03fdb.tar.xz tangerine-wallet-browser-2c36c17238b7641295e1ed6e51e11b2842c03fdb.tar.zst tangerine-wallet-browser-2c36c17238b7641295e1ed6e51e11b2842c03fdb.zip |
Add ✓ charchter to indicate active network
Diffstat (limited to 'ui/app/components/drop-menu-item.js')
-rw-r--r-- | ui/app/components/drop-menu-item.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/ui/app/components/drop-menu-item.js b/ui/app/components/drop-menu-item.js index 5531ebf9f..a31c9c7c4 100644 --- a/ui/app/components/drop-menu-item.js +++ b/ui/app/components/drop-menu-item.js @@ -25,5 +25,25 @@ DropMenuItem.prototype.render = function () { }, [ this.props.icon, this.props.label, + this.activeNetworkRender(), ]) } + +DropMenuItem.prototype.activeNetworkRender = function () { + var activeNetwork = this.props.activeNetworkRender + if( activeNetwork === undefined) return + + switch (this.props.label) { + case 'Main Ethereum Network': + if (activeNetwork === '1') return h('.check', ' ✓') + break + case 'Morden Test Network': + if (activeNetwork === '2') return h('.check', ' ✓') + break + case 'Localhost 8545': + if (activeNetwork > '2') return h('.check', ' ✓') + break + default: + if (activeNetwork === 'custom') return h('.check', ' ✓') + } +} |