From 746c3e5f1803e9b3712d22a4e4dd7ab43e84e060 Mon Sep 17 00:00:00 2001 From: Dan Date: Tue, 27 Feb 2018 13:34:31 -0330 Subject: Body width container in first time flow is consistent with app bar. --- mascara/src/app/first-time/index.css | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'mascara/src/app') diff --git a/mascara/src/app/first-time/index.css b/mascara/src/app/first-time/index.css index 4314efbe6..4f2400222 100644 --- a/mascara/src/app/first-time/index.css +++ b/mascara/src/app/first-time/index.css @@ -4,6 +4,8 @@ width: 100vw; background-color: #FFF; overflow: auto; + display: flex; + justify-content: center; } .alpha-warning { @@ -23,7 +25,6 @@ display: flex; flex-flow: column; margin-top: 70px; - margin-right: 10vw; width: 35vw; max-width: 550px; } @@ -48,6 +49,10 @@ max-width: 35rem; } +.create-password { + margin: 67px 0 50px 0px; +} + .import-account { max-width: initial; } -- cgit From 07edf3f9ffdee9459f4d0b9d30b8b6821d26dbf0 Mon Sep 17 00:00:00 2001 From: Dan Date: Tue, 27 Feb 2018 13:35:29 -0330 Subject: NewUI first time flow warning message change. --- mascara/src/app/first-time/create-password-screen.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mascara/src/app') diff --git a/mascara/src/app/first-time/create-password-screen.js b/mascara/src/app/first-time/create-password-screen.js index d1a2ec70f..d348eaa1a 100644 --- a/mascara/src/app/first-time/create-password-screen.js +++ b/mascara/src/app/first-time/create-password-screen.js @@ -59,7 +59,7 @@ class CreatePasswordScreen extends Component { ? : (
-

Warning: This is Experimental software and is a Developer BETA

+

Please be aware that this version is still in under development.

Date: Tue, 27 Feb 2018 13:43:22 -0330 Subject: Move beta warning to app header. --- mascara/src/app/first-time/create-password-screen.js | 1 - 1 file changed, 1 deletion(-) (limited to 'mascara/src/app') diff --git a/mascara/src/app/first-time/create-password-screen.js b/mascara/src/app/first-time/create-password-screen.js index d348eaa1a..450d6a479 100644 --- a/mascara/src/app/first-time/create-password-screen.js +++ b/mascara/src/app/first-time/create-password-screen.js @@ -59,7 +59,6 @@ class CreatePasswordScreen extends Component { ? : (
-

Please be aware that this version is still in under development.

Date: Tue, 27 Feb 2018 14:14:55 -0330 Subject: Padding of alpha warning aligns with app-bar --- mascara/src/app/first-time/index.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mascara/src/app') diff --git a/mascara/src/app/first-time/index.css b/mascara/src/app/first-time/index.css index 4f2400222..109946e1d 100644 --- a/mascara/src/app/first-time/index.css +++ b/mascara/src/app/first-time/index.css @@ -12,7 +12,7 @@ background: #f7861c; color: #fff; line-height: 2em; - padding-left: 2em; + padding-left: 10vw; } .first-view-main { -- cgit From 5f8a632fec0e83b148e4e0b7fc95339fb870d804 Mon Sep 17 00:00:00 2001 From: Alexander Tseung Date: Tue, 6 Mar 2018 09:14:57 -0800 Subject: Fix seed phrase validation clearing form (#3417) * Fix seed phrase validation clearing form * Make new ui import seed error feedback live, and allow newlines with and without carriage returns. --- .../app/first-time/import-seed-phrase-screen.js | 191 ++++++++++++--------- mascara/src/app/first-time/index.css | 16 +- 2 files changed, 123 insertions(+), 84 deletions(-) (limited to 'mascara/src/app') diff --git a/mascara/src/app/first-time/import-seed-phrase-screen.js b/mascara/src/app/first-time/import-seed-phrase-screen.js index 93c3f9203..de8d675e1 100644 --- a/mascara/src/app/first-time/import-seed-phrase-screen.js +++ b/mascara/src/app/first-time/import-seed-phrase-screen.js @@ -1,13 +1,12 @@ import React, { Component } from 'react' import PropTypes from 'prop-types' import {connect} from 'react-redux' -import LoadingScreen from './loading-screen' +import classnames from 'classnames' import { createNewVaultAndRestore, hideWarning, displayWarning, unMarkPasswordForgotten, - clearNotices, } from '../../../../ui/app/actions' class ImportSeedPhraseScreen extends Component { @@ -17,8 +16,8 @@ class ImportSeedPhraseScreen extends Component { next: PropTypes.func.isRequired, createNewVaultAndRestore: PropTypes.func.isRequired, hideWarning: PropTypes.func.isRequired, - isLoading: PropTypes.bool.isRequired, displayWarning: PropTypes.func, + leaveImportSeedScreenState: PropTypes.func, }; state = { @@ -27,98 +26,130 @@ class ImportSeedPhraseScreen extends Component { confirmPassword: '', } - onClick = () => { - const { password, seedPhrase, confirmPassword } = this.state - const { createNewVaultAndRestore, next, displayWarning, leaveImportSeedScreenState } = this.props + parseSeedPhrase = (seedPhrase) => { + return seedPhrase + .match(/\w+/g) + .join(' ') + } - if (seedPhrase.split(' ').length !== 12) { - this.warning = 'Seed Phrases are 12 words long' - displayWarning(this.warning) - return - } + onChange = ({ seedPhrase, password, confirmPassword }) => { + const { + password: prevPassword, + confirmPassword: prevConfirmPassword, + } = this.state + const { displayWarning, hideWarning } = this.props + + let warning = null - if (password.length < 8) { - this.warning = 'Passwords require a mimimum length of 8' - displayWarning(this.warning) - return + if (seedPhrase && this.parseSeedPhrase(seedPhrase).split(' ').length !== 12) { + warning = 'Seed Phrases are 12 words long' + } else if (password && password.length < 8) { + warning = 'Passwords require a mimimum length of 8' + } else if ((password || prevPassword) !== (confirmPassword || prevConfirmPassword)) { + warning = 'Confirmed password does not match' } - if (password !== confirmPassword) { - this.warning = 'Confirmed password does not match' - displayWarning(this.warning) - return + if (warning) { + displayWarning(warning) + } else { + hideWarning() } - this.warning = null + + seedPhrase && this.setState({ seedPhrase }) + password && this.setState({ password }) + confirmPassword && this.setState({ confirmPassword }) + } + + onClick = () => { + const { password, seedPhrase } = this.state + const { + createNewVaultAndRestore, + next, + displayWarning, + leaveImportSeedScreenState, + } = this.props + leaveImportSeedScreenState() - createNewVaultAndRestore(password, seedPhrase) + createNewVaultAndRestore(password, this.parseSeedPhrase(seedPhrase)) .then(next) } render () { - return this.props.isLoading - ? - : ( -
- { - e.preventDefault() - this.props.back() - }} - href="#" - > - {`< Back`} - -
- Import an Account with Seed Phrase -
-
- Enter your secret twelve word phrase here to restore your vault. -
-
- -