From 2c474b0d6e487652cf16e224e19deb0bf68abedb Mon Sep 17 00:00:00 2001 From: Dan Date: Wed, 20 Sep 2017 05:36:31 -0230 Subject: [PATCH 1/4] Export private key modal body ui. --- .../modals/export-private-key-modal.js | 22 ++++++ ui/app/css/itcss/components/modal.scss | 69 +++++++++++++++++++ ui/app/css/itcss/components/sections.scss | 2 +- 3 files changed, 92 insertions(+), 1 deletion(-) diff --git a/ui/app/components/modals/export-private-key-modal.js b/ui/app/components/modals/export-private-key-modal.js index bbcd25e0d..28b988f5a 100644 --- a/ui/app/components/modals/export-private-key-modal.js +++ b/ui/app/components/modals/export-private-key-modal.js @@ -37,5 +37,27 @@ ExportPrivateKeyModal.prototype.render = function () { h('div.account-modal-divider'), + h('span.modal-body-title', 'Download Private Keys'), + + h('div.private-key-password', {}, [ + h('span.private-key-password-label', 'Type Your Password'), + + h('input.private-key-password-input', { + type: 'password', + placeholder: 'Type password', + }), + ]), + + h('div.private-key-password-warning', `Warning: Never disclose this key. + Anyone with your private keys can take steal any assets held in your + account.` + ), + + h('div.export-private-key-buttons', {}, [ + h('button.btn-clear.btn-cancel', {}, 'Cancel'), + + h('button.btn-clear', 'Download'), + ]), + ]) } diff --git a/ui/app/css/itcss/components/modal.scss b/ui/app/css/itcss/components/modal.scss index 0afd778e9..9cdfdec8f 100644 --- a/ui/app/css/itcss/components/modal.scss +++ b/ui/app/css/itcss/components/modal.scss @@ -265,6 +265,75 @@ background-color: $alto; } +// Export Private Key Modal + +.account-modal-container .account-name { + margin-top: 9px; + font-size: 20px; +} + +.account-modal-container .modal-body-title { + margin-top: 16px; + margin-bottom: 16px; + font-size: 18px; +} + +.private-key-password { + display: flex; + flex-direction: column; +} + +.private-key-password-label { + color: $scorpion; + font-size: 14px; + line-height: 18px; + margin-bottom: 10px; +} + +.private-key-password-input { + padding: 10px 0 13px 17px; + font-size: 16px; + line-height: 21px; + width: 291px; + height: 44px; +} + +.private-key-password::-webkit-input-placeholder { + color: $dusty-gray; + font-family: 'Montserrat UltraLight'; +} + +.private-key-password-warning { + border-radius: 8px; + background-color: #FFF6F6; + font-size: 12px; + font-weight: 500; + line-height: 15px; + color: $crimson; + width: 292px; + padding: 9px 15px; + margin-top: 18px; + font-family: 'Montserrat Regular'; +} + +.export-private-key-buttons { + display: flex; + flex-direction: row; + justify-content: center; + + .btn-clear { + width: 141px; + height: 54px; + } + + .btn-cancel { + margin-right: 15px; + border-color: $dusty-gray; + color: $scorpion; + } +} + + // New Account Modal .new-account-modal-wrapper { display: flex; diff --git a/ui/app/css/itcss/components/sections.scss b/ui/app/css/itcss/components/sections.scss index 44ec3e862..5c32976a7 100644 --- a/ui/app/css/itcss/components/sections.scss +++ b/ui/app/css/itcss/components/sections.scss @@ -446,7 +446,7 @@ textarea.twelve-word-phrase { color: $white; } -.qr-ellip-address { +.qr-ellip-address, .ellip-address { overflow: hidden; text-overflow: ellipsis; } From eae40e054418c195310224194d9435ccfbf14e46 Mon Sep 17 00:00:00 2001 From: Dan Date: Fri, 22 Sep 2017 05:58:43 -0230 Subject: [PATCH 2/4] Able to change selections in to and from fields of send and send token. --- ui/app/components/send-token/index.js | 1 + ui/app/send.js | 20 ++++++++++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/ui/app/components/send-token/index.js b/ui/app/components/send-token/index.js index dd8ca6b9d..cc77c2699 100644 --- a/ui/app/components/send-token/index.js +++ b/ui/app/components/send-token/index.js @@ -181,6 +181,7 @@ SendTokenScreen.prototype.renderToAddressInput = function () { to: e.target.value, errors: {}, }), + onFocus: () => to && this.setState({ to: '' }), }), h('datalist#addresses', [ // Corresponds to the addresses owned. diff --git a/ui/app/send.js b/ui/app/send.js index 16fe470be..8fab8a384 100644 --- a/ui/app/send.js +++ b/ui/app/send.js @@ -123,7 +123,15 @@ SendTransactionScreen.prototype.renderFromInput = function (from, identities) { }) }, onBlur: () => this.setErrorsFor('from'), - onFocus: () => this.clearErrorsFor('from'), + onFocus: () => { + this.clearErrorsFor('from'), + this.state.newTx.from && this.setState({ + newTx: { + ...this.state.newTx, + from: '', + }, + }) + }, }), h('datalist#accounts', [ @@ -160,7 +168,15 @@ SendTransactionScreen.prototype.renderToInput = function (to, identities, addres }) }, onBlur: () => this.setErrorsFor('to'), - onFocus: () => this.clearErrorsFor('to'), + onFocus: () => { + this.clearErrorsFor('to') + this.state.newTx.to && this.setState({ + newTx: { + ...this.state.newTx, + to: '', + }, + }) + }, }), h('datalist#addresses', [ From 56697ea9a4399ecaccf33ae3ae1a42283bdc9dc7 Mon Sep 17 00:00:00 2001 From: Dan Date: Fri, 22 Sep 2017 18:47:05 -0230 Subject: [PATCH 3/4] Select all in to and from of send screens, instead of clearing on focus. --- ui/app/components/send-token/index.js | 2 +- ui/app/send.js | 18 ++++-------------- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/ui/app/components/send-token/index.js b/ui/app/components/send-token/index.js index cc77c2699..60fe2ac8b 100644 --- a/ui/app/components/send-token/index.js +++ b/ui/app/components/send-token/index.js @@ -181,7 +181,7 @@ SendTokenScreen.prototype.renderToAddressInput = function () { to: e.target.value, errors: {}, }), - onFocus: () => to && this.setState({ to: '' }), + onFocus: event => to && event.target.select(), }), h('datalist#addresses', [ // Corresponds to the addresses owned. diff --git a/ui/app/send.js b/ui/app/send.js index 8fab8a384..ac1ee0d84 100644 --- a/ui/app/send.js +++ b/ui/app/send.js @@ -123,14 +123,9 @@ SendTransactionScreen.prototype.renderFromInput = function (from, identities) { }) }, onBlur: () => this.setErrorsFor('from'), - onFocus: () => { + onFocus: event => { this.clearErrorsFor('from'), - this.state.newTx.from && this.setState({ - newTx: { - ...this.state.newTx, - from: '', - }, - }) + this.state.newTx.from && event.target.select() }, }), @@ -168,14 +163,9 @@ SendTransactionScreen.prototype.renderToInput = function (to, identities, addres }) }, onBlur: () => this.setErrorsFor('to'), - onFocus: () => { + onFocus: event => { this.clearErrorsFor('to') - this.state.newTx.to && this.setState({ - newTx: { - ...this.state.newTx, - to: '', - }, - }) + this.state.newTx.to && event.target.select() }, }), From 5f6ec6aa982101bed57d9a8766330af71a274183 Mon Sep 17 00:00:00 2001 From: Dan Date: Mon, 25 Sep 2017 20:35:14 -0230 Subject: [PATCH 4/4] Remove unnecessary trailing comma. --- ui/app/send.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/app/send.js b/ui/app/send.js index ac1ee0d84..6c701f982 100644 --- a/ui/app/send.js +++ b/ui/app/send.js @@ -124,7 +124,7 @@ SendTransactionScreen.prototype.renderFromInput = function (from, identities) { }, onBlur: () => this.setErrorsFor('from'), onFocus: event => { - this.clearErrorsFor('from'), + this.clearErrorsFor('from') this.state.newTx.from && event.target.select() }, }),