From 5c9969e126b1da153d8b0f969fbb430d7a146b14 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Wed, 12 Oct 2016 16:31:15 -0700 Subject: Remove opinionated seed word code Completely breaking all account maangement, I have removed the opinionated seed-word code from the UI. Web3 injection still seems to work. --- ui/app/app.js | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) (limited to 'ui/app/app.js') diff --git a/ui/app/app.js b/ui/app/app.js index 71e0637d0..3266ced51 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -8,8 +8,6 @@ const ReactCSSTransitionGroup = require('react-addons-css-transition-group') const DisclaimerScreen = require('./first-time/disclaimer') const InitializeMenuScreen = require('./first-time/init-menu') const CreateVaultScreen = require('./first-time/create-vault') -const CreateVaultCompleteScreen = require('./first-time/create-vault-complete') -const RestoreVaultScreen = require('./first-time/restore-vault') // unlock const UnlockScreen = require('./unlock') // accounts @@ -19,7 +17,6 @@ const SendTransactionScreen = require('./send') const ConfirmTxScreen = require('./conf-tx') // other views const ConfigScreen = require('./config') -const RevealSeedConfirmation = require('./recover-seed/confirmation') const InfoScreen = require('./info') const LoadingIndicator = require('./components/loading') const SandwichExpando = require('sandwich-expando') @@ -402,10 +399,6 @@ App.prototype.renderPrimary = function () { return h(DisclaimerScreen, {key: 'disclaimerScreen'}) } - if (props.seedWords) { - return h(CreateVaultCompleteScreen, {key: 'createVaultComplete'}) - } - // show initialize screen if (!props.isInitialized || props.forgottenPassword) { // show current view @@ -414,12 +407,6 @@ App.prototype.renderPrimary = function () { case 'createVault': return h(CreateVaultScreen, {key: 'createVault'}) - case 'restoreVault': - return h(RestoreVaultScreen, {key: 'restoreVault'}) - - case 'createVaultComplete': - return h(CreateVaultCompleteScreen, {key: 'createVaultComplete'}) - default: return h(InitializeMenuScreen, {key: 'menuScreenInit'}) @@ -451,16 +438,15 @@ App.prototype.renderPrimary = function () { case 'config': return h(ConfigScreen, {key: 'config'}) - case 'reveal-seed-conf': - return h(RevealSeedConfirmation, {key: 'reveal-seed-conf'}) - case 'info': return h(InfoScreen, {key: 'info'}) case 'createVault': return h(CreateVaultScreen, {key: 'createVault'}) + case 'buyEth': return h(BuyView, {key: 'buyEthView'}) + case 'qr': return h('div', { style: { -- cgit v1.2.3 From 1481a3ef8e3352eb74fa11c4f578d15d84c76de7 Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Sat, 15 Oct 2016 10:48:12 -0700 Subject: Initial work on UI side --- ui/app/app.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ui/app/app.js') diff --git a/ui/app/app.js b/ui/app/app.js index 3266ced51..7392e275d 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -8,6 +8,7 @@ const ReactCSSTransitionGroup = require('react-addons-css-transition-group') const DisclaimerScreen = require('./first-time/disclaimer') const InitializeMenuScreen = require('./first-time/init-menu') const CreateVaultScreen = require('./first-time/create-vault') +const NewKeychainScreen = require('./new-keychain') // unlock const UnlockScreen = require('./unlock') // accounts @@ -432,6 +433,9 @@ App.prototype.renderPrimary = function () { case 'sendTransaction': return h(SendTransactionScreen, {key: 'send-transaction'}) + case 'newKeychain': + return h(NewKeyChainScreen, {key: 'new-keychain'}) + case 'confTx': return h(ConfirmTxScreen, {key: 'confirm-tx'}) -- cgit v1.2.3 From e5c95d68f80eba3e3d4645f7ac1f6606d0dddd52 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Thu, 20 Oct 2016 11:00:38 -0700 Subject: Fix state updating after vault creation and unlocking --- ui/app/app.js | 1 + 1 file changed, 1 insertion(+) (limited to 'ui/app/app.js') diff --git a/ui/app/app.js b/ui/app/app.js index 7392e275d..cbe02b683 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -402,6 +402,7 @@ App.prototype.renderPrimary = function () { // show initialize screen if (!props.isInitialized || props.forgottenPassword) { + // show current view switch (props.currentView.name) { -- cgit v1.2.3 From 383f8ea7dc4a264613cfe92b257878eb78438ce7 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Thu, 20 Oct 2016 11:33:18 -0700 Subject: Linted & added salting to vault --- ui/app/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ui/app/app.js') diff --git a/ui/app/app.js b/ui/app/app.js index cbe02b683..fb9b16a3a 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -8,7 +8,7 @@ const ReactCSSTransitionGroup = require('react-addons-css-transition-group') const DisclaimerScreen = require('./first-time/disclaimer') const InitializeMenuScreen = require('./first-time/init-menu') const CreateVaultScreen = require('./first-time/create-vault') -const NewKeychainScreen = require('./new-keychain') +const NewKeyChainScreen = require('./new-keychain') // unlock const UnlockScreen = require('./unlock') // accounts -- cgit v1.2.3 From 55d56f77cf42a9c4e80768fd7e4a9bb6f0485606 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Thu, 20 Oct 2016 16:44:31 -0700 Subject: Began adding first basic keyring --- ui/app/app.js | 1 - 1 file changed, 1 deletion(-) (limited to 'ui/app/app.js') diff --git a/ui/app/app.js b/ui/app/app.js index fb9b16a3a..3ceae0027 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -405,7 +405,6 @@ App.prototype.renderPrimary = function () { // show current view switch (props.currentView.name) { - case 'createVault': return h(CreateVaultScreen, {key: 'createVault'}) -- cgit v1.2.3 From a462fc82e00c98f4e8c018fbd5dac36d74b88efc Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Fri, 21 Oct 2016 15:19:16 -0700 Subject: Fix duplicate provider menu item bug --- ui/app/app.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'ui/app/app.js') diff --git a/ui/app/app.js b/ui/app/app.js index 3ceae0027..a1004b74b 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -501,12 +501,7 @@ App.prototype.renderCustomOption = function (rpcTarget) { return null case 'http://localhost:8545': - return h(DropMenuItem, { - label: 'Custom RPC', - closeMenu: () => this.setState({ isNetworkMenuOpen: false }), - action: () => this.props.dispatch(actions.showConfigPage()), - icon: h('i.fa.fa-question-circle.fa-lg'), - }) + return null default: return h(DropMenuItem, { -- cgit v1.2.3 From 678301a20e6112d79a052c13f921bb75c451c613 Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Tue, 25 Oct 2016 13:24:03 -0700 Subject: Phase out extra warning screen. --- ui/app/app.js | 5 ----- 1 file changed, 5 deletions(-) (limited to 'ui/app/app.js') diff --git a/ui/app/app.js b/ui/app/app.js index a1004b74b..061545d59 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -25,7 +25,6 @@ const MenuDroppo = require('menu-droppo') const DropMenuItem = require('./components/drop-menu-item') const NetworkIndicator = require('./components/network') const Tooltip = require('./components/tooltip') -const EthStoreWarning = require('./eth-store-warning') const BuyView = require('./components/buy-button-subview') const QrView = require('./components/qr-code') module.exports = connect(mapStateToProps)(App) @@ -38,7 +37,6 @@ function mapStateToProps (state) { // state from plugin isLoading: state.appState.isLoading, isConfirmed: state.metamask.isConfirmed, - isEthConfirmed: state.metamask.isEthConfirmed, isInitialized: state.metamask.isInitialized, isUnlocked: state.metamask.isUnlocked, currentView: state.appState.currentView, @@ -421,9 +419,6 @@ App.prototype.renderPrimary = function () { // show current view switch (props.currentView.name) { - case 'EthStoreWarning': - return h(EthStoreWarning, {key: 'ethWarning'}) - case 'accounts': return h(AccountsScreen, {key: 'accounts'}) -- cgit v1.2.3 From 96643c222a74552d98218fe1f9fc81e493a1960f Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Mon, 31 Oct 2016 11:35:09 -0700 Subject: Implement seed word confirmation page. Remove logs. Move HD render files to ui/app. --- ui/app/app.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'ui/app/app.js') diff --git a/ui/app/app.js b/ui/app/app.js index 588aa9896..f3ad8efc3 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -27,6 +27,8 @@ const NetworkIndicator = require('./components/network') const Tooltip = require('./components/tooltip') const BuyView = require('./components/buy-button-subview') const QrView = require('./components/qr-code') +const HDCreateVaultComplete = require('./keychains/hd/create-vault-complete') + module.exports = connect(mapStateToProps)(App) inherits(App, Component) @@ -35,6 +37,7 @@ function App () { Component.call(this) } function mapStateToProps (state) { return { // state from plugin + seedWords: state.metamask.seedWords, isLoading: state.appState.isLoading, isConfirmed: state.metamask.isConfirmed, isInitialized: state.metamask.isInitialized, @@ -392,6 +395,10 @@ App.prototype.renderPrimary = function () { return h(DisclaimerScreen, {key: 'disclaimerScreen'}) } + if (props.seedWords) { + return h(HDCreateVaultComplete, {key: 'HDCreateVaultComplete'}) + } + // show initialize screen if (!props.isInitialized || props.forgottenPassword) { -- cgit v1.2.3 From 0643c35936b66f3f3d6b59423aae615cc90a0fbf Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Mon, 31 Oct 2016 11:38:48 -0700 Subject: Linted --- ui/app/app.js | 1 - 1 file changed, 1 deletion(-) (limited to 'ui/app/app.js') diff --git a/ui/app/app.js b/ui/app/app.js index f3ad8efc3..a593af0a2 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -37,7 +37,6 @@ function App () { Component.call(this) } function mapStateToProps (state) { return { // state from plugin - seedWords: state.metamask.seedWords, isLoading: state.appState.isLoading, isConfirmed: state.metamask.isConfirmed, isInitialized: state.metamask.isInitialized, -- cgit v1.2.3 From db356a181a3fde4ad528c699f6da517053171866 Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Tue, 1 Nov 2016 11:25:38 -0700 Subject: Made progress on parity for MultiVault - Deleted some unused items - Renamed files and paths to match with new locations. - Modified keyring controller logic to separate concerns. - Fix account naming issues. - Enable creation of new vault with default HD keyring. - Formatting issues. --- ui/app/app.js | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) (limited to 'ui/app/app.js') diff --git a/ui/app/app.js b/ui/app/app.js index a593af0a2..b40219763 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -7,7 +7,6 @@ const ReactCSSTransitionGroup = require('react-addons-css-transition-group') // init const DisclaimerScreen = require('./first-time/disclaimer') const InitializeMenuScreen = require('./first-time/init-menu') -const CreateVaultScreen = require('./first-time/create-vault') const NewKeyChainScreen = require('./new-keychain') // unlock const UnlockScreen = require('./unlock') @@ -28,6 +27,7 @@ const Tooltip = require('./components/tooltip') const BuyView = require('./components/buy-button-subview') const QrView = require('./components/qr-code') const HDCreateVaultComplete = require('./keychains/hd/create-vault-complete') +const HDRestoreVaultScreen = require('./keychains/hd/restore-vault') module.exports = connect(mapStateToProps)(App) @@ -349,16 +349,6 @@ App.prototype.renderBackToInitButton = function () { } else if (props.isInitialized) { var style switch (props.currentView.name) { - case 'createVault': - style = { - position: 'absolute', - top: '41px', - left: '80px', - fontSize: '21px', - fontFamily: 'Montserrat Bold', - color: 'rgb(174, 174, 174)', - } - return this.renderBackButton(style, true) case 'restoreVault': style = { position: 'absolute', @@ -403,8 +393,9 @@ App.prototype.renderPrimary = function () { // show current view switch (props.currentView.name) { - case 'createVault': - return h(CreateVaultScreen, {key: 'createVault'}) + + case 'restoreVault': + return h(HDRestoreVaultScreen, {key: 'HDRestoreVaultScreen'}) default: return h(InitializeMenuScreen, {key: 'menuScreenInit'}) @@ -440,9 +431,6 @@ App.prototype.renderPrimary = function () { case 'info': return h(InfoScreen, {key: 'info'}) - case 'createVault': - return h(CreateVaultScreen, {key: 'createVault'}) - case 'buyEth': return h(BuyView, {key: 'buyEthView'}) -- cgit v1.2.3 From 72729060dc8366dbe965bd66c3b98b88bdb21830 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Tue, 1 Nov 2016 15:00:28 -0700 Subject: Make forgot password button. --- ui/app/app.js | 41 ++++++++++++----------------------------- 1 file changed, 12 insertions(+), 29 deletions(-) (limited to 'ui/app/app.js') diff --git a/ui/app/app.js b/ui/app/app.js index b40219763..4b1818b93 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -300,6 +300,7 @@ App.prototype.renderDropdown = function () { }), ]) } + App.prototype.renderBackButton = function (style, justArrow = false) { var props = this.props return ( @@ -317,12 +318,13 @@ App.prototype.renderBackButton = function (style, justArrow = false) { }, 'BACK'), ]) ) - } + App.prototype.renderBackToInitButton = function () { var props = this.props var button = null if (!props.isConfirmed) return button + if (!props.isUnlocked) { if (props.currentView.name === 'InitMenu') { button = props.forgottenPassword ? h('.flex-row', { @@ -346,32 +348,6 @@ App.prototype.renderBackToInitButton = function () { }, 'LOGIN'), h('i.fa.fa-arrow-right.cursor-pointer'), ]) : null - } else if (props.isInitialized) { - var style - switch (props.currentView.name) { - case 'restoreVault': - style = { - position: 'absolute', - top: '41px', - left: '70px', - fontSize: '21px', - fontFamily: 'Montserrat Bold', - color: 'rgb(174, 174, 174)', - } - return this.renderBackButton(style, true) - default: - style = { - position: 'absolute', - bottom: '10px', - left: '15px', - fontSize: '21px', - fontFamily: 'Montserrat Light', - color: '#7F8082', - width: '71.969px', - alignItems: 'flex-end', - } - return this.renderBackButton(style) - } } } return button @@ -399,17 +375,24 @@ App.prototype.renderPrimary = function () { default: return h(InitializeMenuScreen, {key: 'menuScreenInit'}) - } } // show unlock screen if (!props.isUnlocked) { - return h(UnlockScreen, {key: 'locked'}) + switch (props.currentView.name) { + + case 'restoreVault': + return h(HDRestoreVaultScreen, {key: 'HDRestoreVaultScreen'}) + + default: + return h(UnlockScreen, {key: 'locked'}) + } } // show current view switch (props.currentView.name) { + case 'accounts': return h(AccountsScreen, {key: 'accounts'}) -- cgit v1.2.3 From 8f3db0dbc0bafdc604bd7359bd41370f594c792c Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Tue, 1 Nov 2016 22:19:04 -0700 Subject: Add reveal of seed words. --- ui/app/app.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ui/app/app.js') diff --git a/ui/app/app.js b/ui/app/app.js index 4b1818b93..a2532c153 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -28,6 +28,7 @@ const BuyView = require('./components/buy-button-subview') const QrView = require('./components/qr-code') const HDCreateVaultComplete = require('./keychains/hd/create-vault-complete') const HDRestoreVaultScreen = require('./keychains/hd/restore-vault') +const RevealSeedConfirmation = require('./keychains/hd/recover-seed/confirmation') module.exports = connect(mapStateToProps)(App) @@ -411,6 +412,9 @@ App.prototype.renderPrimary = function () { case 'config': return h(ConfigScreen, {key: 'config'}) + case 'reveal-seed-conf': + return h(RevealSeedConfirmation, {key: 'reveal-seed-conf'}) + case 'info': return h(InfoScreen, {key: 'info'}) -- cgit v1.2.3 From 23263bec7d5100accd61f7648fd9355fc95e2bb7 Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Fri, 11 Nov 2016 10:26:12 -0800 Subject: Linting to the max. --- ui/app/app.js | 2 -- 1 file changed, 2 deletions(-) (limited to 'ui/app/app.js') diff --git a/ui/app/app.js b/ui/app/app.js index a2532c153..abe609eca 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -98,7 +98,6 @@ App.prototype.render = function () { } App.prototype.renderAppBar = function () { - if (window.METAMASK_UI_TYPE === 'notification') { return null } @@ -367,7 +366,6 @@ App.prototype.renderPrimary = function () { // show initialize screen if (!props.isInitialized || props.forgottenPassword) { - // show current view switch (props.currentView.name) { -- cgit v1.2.3 From 7de6b12aad4a674bdbb0749d2e61d9fd5f69c536 Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Mon, 14 Nov 2016 16:49:16 -0800 Subject: Re-enable disclaimer screen. Rename variables to reflect role more clearly. --- ui/app/app.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ui/app/app.js') diff --git a/ui/app/app.js b/ui/app/app.js index abe609eca..977392c57 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -39,7 +39,7 @@ function mapStateToProps (state) { return { // state from plugin isLoading: state.appState.isLoading, - isConfirmed: state.metamask.isConfirmed, + isDisclaimerConfirmed: state.metamask.isDisclaimerConfirmed, isInitialized: state.metamask.isInitialized, isUnlocked: state.metamask.isUnlocked, currentView: state.appState.currentView, @@ -323,7 +323,7 @@ App.prototype.renderBackButton = function (style, justArrow = false) { App.prototype.renderBackToInitButton = function () { var props = this.props var button = null - if (!props.isConfirmed) return button + if (!props.isDisclaimerConfirmed) return button if (!props.isUnlocked) { if (props.currentView.name === 'InitMenu') { @@ -356,7 +356,7 @@ App.prototype.renderBackToInitButton = function () { App.prototype.renderPrimary = function () { var props = this.props - if (!props.isConfirmed) { + if (!props.isDisclaimerConfirmed) { return h(DisclaimerScreen, {key: 'disclaimerScreen'}) } -- cgit v1.2.3 From 6ae2400ef2fc6e6c5096cc71b3fcf422ccc5e8b2 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Mon, 21 Nov 2016 11:45:31 -0800 Subject: Fix custom provider menu item The Custom RPC menu item in the provider menu would not appear when Localhost:8545 was selected. --- ui/app/app.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'ui/app/app.js') diff --git a/ui/app/app.js b/ui/app/app.js index 977392c57..ba0a57e02 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -250,6 +250,14 @@ App.prototype.renderNetworkDropdown = function () { }), this.renderCustomOption(props.provider.rpcTarget), + + h(DropMenuItem, { + label: 'Custom RPC', + closeMenu: () => this.setState({ isNetworkMenuOpen: false }), + action: () => this.props.dispatch(actions.showConfigPage()), + icon: h('i.fa.fa-question-circle.fa-lg'), + }), + ]) } @@ -465,13 +473,6 @@ App.prototype.toggleMetamaskActive = function () { App.prototype.renderCustomOption = function (rpcTarget) { switch (rpcTarget) { - case undefined: - return h(DropMenuItem, { - label: 'Custom RPC', - closeMenu: () => this.setState({ isNetworkMenuOpen: false }), - action: () => this.props.dispatch(actions.showConfigPage()), - icon: h('i.fa.fa-question-circle.fa-lg'), - }) case 'http://localhost:8545': return null -- cgit v1.2.3 From 1e46d858e995c6c50f155f1bcdaf64b922402599 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Tue, 22 Nov 2016 16:34:02 -0800 Subject: Fix undefined provider menu item --- ui/app/app.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'ui/app/app.js') diff --git a/ui/app/app.js b/ui/app/app.js index f9694214a..94e8adc34 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -258,7 +258,7 @@ App.prototype.renderNetworkDropdown = function () { activeNetworkRender: props.provider.rpcTarget, }), - this.renderCustomOption(props.provider.rpcTarget), + this.renderCustomOption(props.provider), h(DropMenuItem, { label: 'Custom RPC', @@ -480,7 +480,10 @@ App.prototype.toggleMetamaskActive = function () { } } -App.prototype.renderCustomOption = function (rpcTarget) { +App.prototype.renderCustomOption = function (provider) { + const { rpcTarget, type } = provider + if (type !== 'rpc') return null + switch (rpcTarget) { case 'http://localhost:8545': -- cgit v1.2.3 From 5251fb373f00d96b1a90bc9038a15e4d9ad98b85 Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Wed, 23 Nov 2016 13:05:02 -0800 Subject: Modify forgot password flow to go back to init screen. --- ui/app/app.js | 34 ---------------------------------- 1 file changed, 34 deletions(-) (limited to 'ui/app/app.js') diff --git a/ui/app/app.js b/ui/app/app.js index 94e8adc34..9538a6b93 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -90,7 +90,6 @@ App.prototype.render = function () { transitionLeaveTimeout: 300, }, [ this.renderPrimary(), - this.renderBackToInitButton(), ]), ]), ]) @@ -337,39 +336,6 @@ App.prototype.renderBackButton = function (style, justArrow = false) { ) } -App.prototype.renderBackToInitButton = function () { - var props = this.props - var button = null - if (!props.isDisclaimerConfirmed) return button - - if (!props.isUnlocked) { - if (props.currentView.name === 'InitMenu') { - button = props.forgottenPassword ? h('.flex-row', { - key: 'rightArrow', - style: { - position: 'absolute', - bottom: '10px', - right: '15px', - fontSize: '21px', - fontFamily: 'Montserrat Light', - color: '#7F8082', - width: '77.578px', - alignItems: 'flex-end', - }, - }, [ - h('div.cursor-pointer', { - style: { - marginRight: '3px', - }, - onClick: () => props.dispatch(actions.backToUnlockView()), - }, 'LOGIN'), - h('i.fa.fa-arrow-right.cursor-pointer'), - ]) : null - } - } - return button -} - App.prototype.renderPrimary = function () { var props = this.props -- cgit v1.2.3 From 233094e19d862014937e8f765fd5961d40fc3fbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Iv=C3=A1n=20Cuende?= Date: Tue, 13 Dec 2016 23:38:55 -0800 Subject: Beautified disclaimer --- ui/app/app.js | 1 - 1 file changed, 1 deletion(-) (limited to 'ui/app/app.js') diff --git a/ui/app/app.js b/ui/app/app.js index 9538a6b93..d870cec4a 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -114,7 +114,6 @@ App.prototype.renderAppBar = function () { alignItems: 'center', visibility: props.isUnlocked ? 'visible' : 'none', background: props.isUnlocked ? 'white' : 'none', - height: '36px', position: 'relative', zIndex: 2, }, -- cgit v1.2.3 From 4a8bc63c8d8cd4191bbfc0e13077f2356ea7cfbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Iv=C3=A1n=20Cuende?= Date: Wed, 14 Dec 2016 10:03:56 -0800 Subject: Better account details view --- ui/app/app.js | 8 -------- 1 file changed, 8 deletions(-) (limited to 'ui/app/app.js') diff --git a/ui/app/app.js b/ui/app/app.js index d870cec4a..ba891f1cf 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -126,14 +126,6 @@ App.prototype.renderAppBar = function () { alignItems: 'center', }, }, [ - - // mini logo - h('img', { - height: 24, - width: 24, - src: '/images/icon-128.png', - }), - h(NetworkIndicator, { network: this.props.network, provider: this.props.provider, -- cgit v1.2.3 From 3969526403c487eb45f8a34774b3267ab126cdda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Iv=C3=A1n=20Cuende?= Date: Wed, 14 Dec 2016 14:35:36 -0800 Subject: Fixed header h1 alignment and network name --- ui/app/app.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ui/app/app.js') diff --git a/ui/app/app.js b/ui/app/app.js index ba891f1cf..7da03cdd1 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -140,8 +140,9 @@ App.prototype.renderAppBar = function () { // metamask name h('h1', { style: { - position: 'relative', - left: '9px', + position: 'absolute', + left: '50%', + transform: 'translateX(-50%)', }, }, 'MetaMask'), -- cgit v1.2.3 From 6d13ef691f4162caad6b8742a21d0b75f8baccca Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Fri, 16 Dec 2016 10:04:57 -0800 Subject: Revert "Interface enhancements" --- ui/app/app.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'ui/app/app.js') diff --git a/ui/app/app.js b/ui/app/app.js index 7da03cdd1..9538a6b93 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -114,6 +114,7 @@ App.prototype.renderAppBar = function () { alignItems: 'center', visibility: props.isUnlocked ? 'visible' : 'none', background: props.isUnlocked ? 'white' : 'none', + height: '36px', position: 'relative', zIndex: 2, }, @@ -126,6 +127,14 @@ App.prototype.renderAppBar = function () { alignItems: 'center', }, }, [ + + // mini logo + h('img', { + height: 24, + width: 24, + src: '/images/icon-128.png', + }), + h(NetworkIndicator, { network: this.props.network, provider: this.props.provider, @@ -140,9 +149,8 @@ App.prototype.renderAppBar = function () { // metamask name h('h1', { style: { - position: 'absolute', - left: '50%', - transform: 'translateX(-50%)', + position: 'relative', + left: '9px', }, }, 'MetaMask'), -- cgit v1.2.3 From 931ae5f64a233b472c3dada8aa6af77e0bffad5e Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Tue, 20 Dec 2016 13:53:14 -0800 Subject: Make notices confirmation configurable - Confirm button will now dismiss the lost accounts array. --- ui/app/app.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'ui/app/app.js') diff --git a/ui/app/app.js b/ui/app/app.js index 2fa6415dd..886bc987a 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -17,6 +17,7 @@ const SendTransactionScreen = require('./send') const ConfirmTxScreen = require('./conf-tx') // notice const NoticeScreen = require('./notice') +const lostAccountsNotice = require('../lib/lost-accounts-notice') // other views const ConfigScreen = require('./config') const InfoScreen = require('./info') @@ -55,6 +56,8 @@ function mapStateToProps (state) { network: state.metamask.network, provider: state.metamask.provider, forgottenPassword: state.appState.forgottenPassword, + lastUnreadNotice: state.metamask.lastUnreadNotice, + lostAccounts: state.metamask.lostAccounts, } } @@ -366,8 +369,19 @@ App.prototype.renderPrimary = function () { } } + // notices if (!props.noActiveNotices) { - return h(NoticeScreen, {key: 'NoticeScreen'}) + return h(NoticeScreen, { + notice: props.lastUnreadNotice, + key: 'NoticeScreen', + onConfirm: () => props.dispatch(actions.markNoticeRead(notice)), + }) + } else if (props.lostAccounts && props.lostAccounts.length > 0) { + return h(NoticeScreen, { + notice: lostAccountsNotice(props.lostAccounts), + key: 'LostAccountsNotice', + onConfirm: () => props.dispatch(actions.markAccountsFound()), + }) } // show current view -- cgit v1.2.3 From 11c1004a41a9287c13ef15f28805863aab9fdea9 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Tue, 20 Dec 2016 15:54:59 -0800 Subject: Linted --- ui/app/app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ui/app/app.js') diff --git a/ui/app/app.js b/ui/app/app.js index 886bc987a..e98e635a2 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -16,7 +16,7 @@ const AccountDetailScreen = require('./account-detail') const SendTransactionScreen = require('./send') const ConfirmTxScreen = require('./conf-tx') // notice -const NoticeScreen = require('./notice') +const NoticeScreen = require('./components/notice') const lostAccountsNotice = require('../lib/lost-accounts-notice') // other views const ConfigScreen = require('./config') @@ -374,7 +374,7 @@ App.prototype.renderPrimary = function () { return h(NoticeScreen, { notice: props.lastUnreadNotice, key: 'NoticeScreen', - onConfirm: () => props.dispatch(actions.markNoticeRead(notice)), + onConfirm: () => props.dispatch(actions.markNoticeRead(props.lastUnreadNotice)), }) } else if (props.lostAccounts && props.lostAccounts.length > 0) { return h(NoticeScreen, { -- cgit v1.2.3 From d3b2698f341e1d0dda86612cdf331e51067719c5 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Thu, 22 Dec 2016 14:09:10 -0800 Subject: Rename function to be an action --- ui/app/app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ui/app/app.js') diff --git a/ui/app/app.js b/ui/app/app.js index e98e635a2..6da0c3b1d 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -17,7 +17,7 @@ const SendTransactionScreen = require('./send') const ConfirmTxScreen = require('./conf-tx') // notice const NoticeScreen = require('./components/notice') -const lostAccountsNotice = require('../lib/lost-accounts-notice') +const generateLostAccountsNotice = require('../lib/lost-accounts-notice') // other views const ConfigScreen = require('./config') const InfoScreen = require('./info') @@ -378,7 +378,7 @@ App.prototype.renderPrimary = function () { }) } else if (props.lostAccounts && props.lostAccounts.length > 0) { return h(NoticeScreen, { - notice: lostAccountsNotice(props.lostAccounts), + notice: generateLostAccountsNotice(props.lostAccounts), key: 'LostAccountsNotice', onConfirm: () => props.dispatch(actions.markAccountsFound()), }) -- cgit v1.2.3 From a8a37e4d40ac543025f7f7d111a59dc17c6f3a8c Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Wed, 4 Jan 2017 14:30:14 -0800 Subject: Make network somewhat more modular, add new network indicator. --- ui/app/app.js | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'ui/app/app.js') diff --git a/ui/app/app.js b/ui/app/app.js index 6da0c3b1d..bd235998b 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -141,15 +141,21 @@ App.prototype.renderAppBar = function () { src: '/images/icon-128.png', }), - h(NetworkIndicator, { - network: this.props.network, - provider: this.props.provider, - onClick: (event) => { - event.preventDefault() - event.stopPropagation() - this.setState({ isNetworkMenuOpen: !isNetworkMenuOpen }) - }, - }), + h('#network-spacer.flex-center', { + style: { + marginRight: '-72px', + } + }, [ + h(NetworkIndicator, { + network: this.props.network, + provider: this.props.provider, + onClick: (event) => { + event.preventDefault() + event.stopPropagation() + this.setState({ isNetworkMenuOpen: !isNetworkMenuOpen }) + }, + }), + ]), ]), // metamask name -- cgit v1.2.3 From b8d312f8b92c2edf88348196297b67b5f9fa3b2a Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Wed, 4 Jan 2017 15:04:51 -0800 Subject: Linting. --- ui/app/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ui/app/app.js') diff --git a/ui/app/app.js b/ui/app/app.js index bd235998b..9efe95874 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -144,7 +144,7 @@ App.prototype.renderAppBar = function () { h('#network-spacer.flex-center', { style: { marginRight: '-72px', - } + }, }, [ h(NetworkIndicator, { network: this.props.network, -- cgit v1.2.3