From 2368c2993d44375203e0b85158bac707489d1137 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Tue, 26 Jul 2016 15:15:40 -0700 Subject: Add platform specific builds and zip tasks (#486) * Add platform specific folders to dist folder * Remove gulp hacks * Add platform specific bundling dev and dist tasks now build into platform-specific folders within the `dist` folder. Added tasks `gulp zip` and `gulp dist`. `zip` builds the platform-specific folders into platform-specific bundles within the `dist` folder. `dist` builds and then zips all at once. * Fix chrome bundle zipping * Fix broken reference in eth warning * Fix but where web3.eth.accounts are not available in firefox. * Bump changelog --- ui/app/eth-store-warning.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ui') diff --git a/ui/app/eth-store-warning.js b/ui/app/eth-store-warning.js index 4cc5da81c..d77cc0870 100644 --- a/ui/app/eth-store-warning.js +++ b/ui/app/eth-store-warning.js @@ -56,7 +56,7 @@ EthStoreWarning.prototype.render = function () { }, [ h('input', { type: 'checkbox', - onChange: this.toggleShowWarning.bind(this, event), + onChange: this.toggleShowWarning.bind(this), }), h('.warning', { style: { @@ -80,7 +80,7 @@ EthStoreWarning.prototype.render = function () { ) } -EthStoreWarning.prototype.toggleShowWarning = function (event) { +EthStoreWarning.prototype.toggleShowWarning = function () { this.props.dispatch(actions.agreeToEthWarning()) } -- cgit From 3a4744dec179d0845cd9a3c306a6318dd609f4bd Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Wed, 27 Jul 2016 15:31:30 +0900 Subject: Fix menu droppo issues caused by Chrome 52. --- ui/app/app.js | 1 + ui/app/css/index.css | 1 + 2 files changed, 2 insertions(+) (limited to 'ui') diff --git a/ui/app/app.js b/ui/app/app.js index a11d679f1..df5350f67 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -203,6 +203,7 @@ App.prototype.renderNetworkDropdown = function () { style: { position: 'absolute', left: 0, + top: '36px', }, innerStyle: { background: 'white', diff --git a/ui/app/css/index.css b/ui/app/css/index.css index 36430b5eb..77bf7bf97 100644 --- a/ui/app/css/index.css +++ b/ui/app/css/index.css @@ -151,6 +151,7 @@ textarea.twelve-word-phrase { .network-name { position: absolute; top: 8px; + left: 60px; width: 5.2em; line-height: 9px; text-rendering: geometricPrecision; -- cgit From 9b43ec2278a5647c427c426ed798ab90bbf093cc Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Thu, 28 Jul 2016 10:53:51 -0700 Subject: Add eth classic to provider menu --- ui/app/app.js | 12 ++++++++++++ ui/app/components/drop-menu-item.js | 14 +++++++++----- ui/app/components/network.js | 21 ++++++++++++++++++--- ui/app/css/lib.css | 5 +++++ ui/app/settings.js | 1 - 5 files changed, 44 insertions(+), 9 deletions(-) (limited to 'ui') diff --git a/ui/app/app.js b/ui/app/app.js index df5350f67..b8deedc13 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -131,6 +131,7 @@ App.prototype.renderAppBar = function () { h(NetworkIndicator, { network: this.props.network, + provider: this.props.provider, onClick: (event) => { event.preventDefault() event.stopPropagation() @@ -221,6 +222,16 @@ App.prototype.renderNetworkDropdown = function () { action: () => props.dispatch(actions.setProviderType('mainnet')), icon: h('.menu-icon.diamond'), activeNetworkRender: props.network, + provider: props.provider, + }), + + h(DropMenuItem, { + label: 'Ethereum Classic Network', + closeMenu: () => this.setState({ isNetworkMenuOpen: false }), + action: () => props.dispatch(actions.setProviderType('classic')), + icon: h('.menu-icon.hollow-diamond'), + activeNetworkRender: props.network, + provider: props.provider, }), h(DropMenuItem, { @@ -238,6 +249,7 @@ App.prototype.renderNetworkDropdown = function () { icon: h('i.fa.fa-question-circle.fa-lg', { ariaHidden: true }), activeNetworkRender: props.provider.rpcTarget, }), + this.renderCustomOption(props.provider.rpcTarget), ]) } diff --git a/ui/app/components/drop-menu-item.js b/ui/app/components/drop-menu-item.js index f5800f799..8bff3e131 100644 --- a/ui/app/components/drop-menu-item.js +++ b/ui/app/components/drop-menu-item.js @@ -32,20 +32,24 @@ DropMenuItem.prototype.render = function () { } DropMenuItem.prototype.activeNetworkRender = function () { - var activeNetwork = this.props.activeNetworkRender + let activeNetwork = this.props.activeNetworkRender + let { provider } = this.props if (activeNetwork === undefined) return switch (this.props.label) { case 'Main Ethereum Network': - if (activeNetwork === '1') return h('.check', ' ✓') + if (provider.type === 'mainnet') return h('.check', '✓') + break + case 'Ethereum Classic Network': + if (provider.type === 'classic') return h('.check', '✓') break case 'Morden Test Network': - if (activeNetwork === '2') return h('.check', ' ✓') + if (activeNetwork === '2') return h('.check', '✓') break case 'Localhost 8545': - if (activeNetwork === 'http://localhost:8545') return h('.check', ' ✓') + if (activeNetwork === 'http://localhost:8545') return h('.check', '✓') break default: - if (activeNetwork === 'custom') return h('.check', ' ✓') + if (activeNetwork === 'custom') return h('.check', '✓') } } diff --git a/ui/app/components/network.js b/ui/app/components/network.js index 032e71699..22b11aa6c 100644 --- a/ui/app/components/network.js +++ b/ui/app/components/network.js @@ -11,11 +11,13 @@ function Network () { } Network.prototype.render = function () { - const state = this.props - const networkNumber = state.network + const props = this.props + const networkNumber = props.network + const providerName = props.provider.type let iconName, hoverText if (networkNumber === 'loading') { + return h('img', { title: 'Attempting to connect to blockchain.', onClick: (event) => this.props.onClick(event), @@ -25,9 +27,13 @@ Network.prototype.render = function () { }, src: 'images/loading.svg', }) - } else if (parseInt(networkNumber) === 1) { + + } else if (providerName === 'mainnet') { hoverText = 'Main Ethereum Network' iconName = 'ethereum-network' + } else if (providerName === 'classic') { + hoverText = 'Ethereum Classic Network' + iconName = 'classic-network' } else if (parseInt(networkNumber) === 2) { hoverText = 'Morden Test Network' iconName = 'morden-test-network' @@ -55,6 +61,15 @@ Network.prototype.render = function () { }}, 'Etherum Main Net'), ]) + case 'classic-network': + return h('.network-indicator', [ + h('.menu-icon.hollow-diamond'), + h('.network-name', { + style: { + color: '#039396', + }}, + 'Etherum Classic'), + ]) case 'morden-test-network': return h('.network-indicator', [ h('.menu-icon.red-dot'), diff --git a/ui/app/css/lib.css b/ui/app/css/lib.css index 22b26d4f1..bcd6a4a67 100644 --- a/ui/app/css/lib.css +++ b/ui/app/css/lib.css @@ -178,6 +178,11 @@ hr.horizontal-line { background: #038789; } +.hollow-diamond { + transform: rotate(45deg); + border: 1px solid #038789; +} + .pending-dot { background: red; left: 14px; diff --git a/ui/app/settings.js b/ui/app/settings.js index e56f4ee63..454cc95e0 100644 --- a/ui/app/settings.js +++ b/ui/app/settings.js @@ -32,7 +32,6 @@ AppSettingsPage.prototype.render = function () { htmlFor: 'settings-rpc-endpoint', }, 'RPC Endpoint:'), h('input', { - // value: '//testrpc.metamask.io', type: 'url', id: 'settings-rpc-endpoint', onKeyPress: this.onKeyPress.bind(this), -- cgit From 51535ab0cc489baf8410e3cbd2ab99c6376716d0 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Thu, 28 Jul 2016 10:54:00 -0700 Subject: Fix margin on provider checkmarks --- ui/app/css/index.css | 1 + 1 file changed, 1 insertion(+) (limited to 'ui') diff --git a/ui/app/css/index.css b/ui/app/css/index.css index 77bf7bf97..612dc9d9a 100644 --- a/ui/app/css/index.css +++ b/ui/app/css/index.css @@ -158,6 +158,7 @@ textarea.twelve-word-phrase { } .check { + margin-left: 7px; color: #F7861C; flex: 1 0 auto; display: flex; -- cgit From 5feff0b1f5d14bb723ff16224d67e87668d72757 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Thu, 28 Jul 2016 11:04:02 -0700 Subject: Add missing reference for provider --- ui/app/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ui') diff --git a/ui/app/app.js b/ui/app/app.js index b8deedc13..0bafb07ae 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -131,7 +131,7 @@ App.prototype.renderAppBar = function () { h(NetworkIndicator, { network: this.props.network, - provider: this.props.provider, + provider: this.props.provider onClick: (event) => { event.preventDefault() event.stopPropagation() -- cgit From c805963a22715b3d575a2dc8f7b6585e673614e2 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Thu, 28 Jul 2016 11:10:54 -0700 Subject: Linted --- ui/app/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ui') diff --git a/ui/app/app.js b/ui/app/app.js index 0bafb07ae..b8deedc13 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -131,7 +131,7 @@ App.prototype.renderAppBar = function () { h(NetworkIndicator, { network: this.props.network, - provider: this.props.provider + provider: this.props.provider, onClick: (event) => { event.preventDefault() event.stopPropagation() -- cgit From 8a4d8eca6463d7dd846515fdd62732a419a07344 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Fri, 29 Jul 2016 12:19:15 -0700 Subject: Fix network name reference When adding the classic network to the menu, I left a reference to a property that is not always existent, so we needed a fallback for it. --- ui/app/components/network.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'ui') diff --git a/ui/app/components/network.js b/ui/app/components/network.js index 22b11aa6c..95901fe70 100644 --- a/ui/app/components/network.js +++ b/ui/app/components/network.js @@ -13,7 +13,12 @@ function Network () { Network.prototype.render = function () { const props = this.props const networkNumber = props.network - const providerName = props.provider.type + let providerName + try { + providerName = props.provider.type + } catch (e) { + providerName = null + } let iconName, hoverText if (networkNumber === 'loading') { -- cgit From c7691b7e64597b873da706d842e360f3e2ec8347 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Fri, 29 Jul 2016 12:22:39 -0700 Subject: Fix reference in drop menu item --- ui/app/components/drop-menu-item.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ui') diff --git a/ui/app/components/drop-menu-item.js b/ui/app/components/drop-menu-item.js index 8bff3e131..1a0d6cbd5 100644 --- a/ui/app/components/drop-menu-item.js +++ b/ui/app/components/drop-menu-item.js @@ -34,14 +34,15 @@ DropMenuItem.prototype.render = function () { DropMenuItem.prototype.activeNetworkRender = function () { let activeNetwork = this.props.activeNetworkRender let { provider } = this.props + let providerType = provider ? provider.type : null if (activeNetwork === undefined) return switch (this.props.label) { case 'Main Ethereum Network': - if (provider.type === 'mainnet') return h('.check', '✓') + if (providerType === 'mainnet') return h('.check', '✓') break case 'Ethereum Classic Network': - if (provider.type === 'classic') return h('.check', '✓') + if (providerType === 'classic') return h('.check', '✓') break case 'Morden Test Network': if (activeNetwork === '2') return h('.check', '✓') -- cgit From f8ac9ca52270d1abbd8d9e5c2bcc1cfa09f94c58 Mon Sep 17 00:00:00 2001 From: Frankie Date: Wed, 3 Aug 2016 19:43:54 -0700 Subject: Fix issue with dropdown menu --- ui/app/app.js | 1 + 1 file changed, 1 insertion(+) (limited to 'ui') diff --git a/ui/app/app.js b/ui/app/app.js index b8deedc13..cc616fb7c 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -267,6 +267,7 @@ App.prototype.renderDropdown = function () { style: { position: 'absolute', right: 0, + top: '36px', }, innerStyle: { background: 'white', -- cgit From 31b38e820bcc576158ce6c43bfe10da9a48c139b Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Thu, 4 Aug 2016 11:14:39 -0700 Subject: Fix typos with missing apostrophe --- ui/app/eth-store-warning.js | 2 +- ui/app/first-time/create-vault.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'ui') diff --git a/ui/app/eth-store-warning.js b/ui/app/eth-store-warning.js index d77cc0870..7fe54a309 100644 --- a/ui/app/eth-store-warning.js +++ b/ui/app/eth-store-warning.js @@ -63,7 +63,7 @@ EthStoreWarning.prototype.render = function () { fontSize: '11px', }, - }, 'Dont show me this message again'), + }, 'Don\'t show me this message again'), ]), h('.flex-row', { style: { diff --git a/ui/app/first-time/create-vault.js b/ui/app/first-time/create-vault.js index 3dfbf0dbd..33ae62179 100644 --- a/ui/app/first-time/create-vault.js +++ b/ui/app/first-time/create-vault.js @@ -120,7 +120,7 @@ CreateVaultScreen.prototype.createNewVault = function () { return } if (password !== passwordConfirm) { - this.warning = 'passwords dont match' + this.warning = 'passwords don\'t match' this.props.dispatch(actions.displayWarning(this.warning)) return } -- cgit