aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app/components')
-rw-r--r--ui/app/components/drop-menu-item.js20
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', ' ✓')
+ }
+}