From fe5817051b00a7288fb97541c5674641e978aead Mon Sep 17 00:00:00 2001 From: sdtsui Date: Mon, 21 Aug 2017 09:50:22 -0700 Subject: [WIP] Aggregate data for QRView --- ui/app/components/qr-code.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'ui/app/components/qr-code.js') diff --git a/ui/app/components/qr-code.js b/ui/app/components/qr-code.js index 06b9aed9b..df749fe17 100644 --- a/ui/app/components/qr-code.js +++ b/ui/app/components/qr-code.js @@ -10,7 +10,11 @@ module.exports = connect(mapStateToProps)(QrCodeView) function mapStateToProps (state) { return { - Qr: state.appState.Qr, + // Qr: state.appState.Qr, + /* + Qr.message - address + Qr.data - identity + */ buyView: state.appState.buyView, warning: state.appState.warning, } -- cgit From b836d0483d835b0665a14e41f68f9fbd574fd655 Mon Sep 17 00:00:00 2001 From: sdtsui Date: Mon, 21 Aug 2017 10:06:29 -0700 Subject: [WIP] Render a QR code in AccountDetailsModal --- ui/app/components/qr-code.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'ui/app/components/qr-code.js') diff --git a/ui/app/components/qr-code.js b/ui/app/components/qr-code.js index df749fe17..5a2e4963a 100644 --- a/ui/app/components/qr-code.js +++ b/ui/app/components/qr-code.js @@ -10,11 +10,7 @@ module.exports = connect(mapStateToProps)(QrCodeView) function mapStateToProps (state) { return { - // Qr: state.appState.Qr, - /* - Qr.message - address - Qr.data - identity - */ + // Qr code is not fetched from state. 'message' and 'data' props are passed instead. buyView: state.appState.buyView, warning: state.appState.warning, } -- cgit From 877faaf09608fbb5f1ba9dd853959e7399893068 Mon Sep 17 00:00:00 2001 From: sdtsui Date: Mon, 21 Aug 2017 10:27:56 -0700 Subject: Integrate old QR component with new modal layout --- ui/app/components/qr-code.js | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'ui/app/components/qr-code.js') diff --git a/ui/app/components/qr-code.js b/ui/app/components/qr-code.js index 5a2e4963a..914d3aa29 100644 --- a/ui/app/components/qr-code.js +++ b/ui/app/components/qr-code.js @@ -29,28 +29,28 @@ QrCodeView.prototype.render = function () { const qrImage = qrCode(4, 'M') qrImage.addData(address) qrImage.make() - return h('.main-container.flex-column', { - key: 'qr', + return h('.div.flex-column.flex-center', { + // key: 'qr', style: { - justifyContent: 'center', - paddingBottom: '45px', - paddingLeft: '45px', - paddingRight: '45px', - alignItems: 'center', + // justifyContent: 'center', + // paddingBottom: '45px', + // paddingLeft: '45px', + // paddingRight: '45px', + // alignItems: 'center', }, }, [ Array.isArray(Qr.message) ? h('.message-container', this.renderMultiMessage()) : h('.qr-header', Qr.message), this.props.warning ? this.props.warning && h('span.error.flex-center', { style: { - textAlign: 'center', - width: '229px', - height: '82px', + // textAlign: 'center', + // width: '229px', + // height: '82px', }, }, this.props.warning) : null, - h('#qr-container.flex-column', { + h('.div', { style: { marginTop: '25px', marginBottom: '15px', @@ -59,15 +59,15 @@ QrCodeView.prototype.render = function () { __html: qrImage.createTableTag(4), }, }), - h('.flex-row', [ - h('h3.ellip-address', { + h('.div', [ + h('span.qr-ellip-address', { style: { width: '247px', }, }, Qr.data), - h(CopyButton, { - value: Qr.data, - }), + // h(CopyButton, { + // value: Qr.data, + // }), ]), ]) } -- cgit From 27b75b67b42c232051660c33da976d64a63ff407 Mon Sep 17 00:00:00 2001 From: sdtsui Date: Mon, 21 Aug 2017 12:26:36 -0700 Subject: Hook up identicon and buttons to AccountDetailsModal, clean up colors --- ui/app/components/qr-code.js | 9 --------- 1 file changed, 9 deletions(-) (limited to 'ui/app/components/qr-code.js') diff --git a/ui/app/components/qr-code.js b/ui/app/components/qr-code.js index 914d3aa29..1de5f7352 100644 --- a/ui/app/components/qr-code.js +++ b/ui/app/components/qr-code.js @@ -30,22 +30,13 @@ QrCodeView.prototype.render = function () { qrImage.addData(address) qrImage.make() return h('.div.flex-column.flex-center', { - // key: 'qr', style: { - // justifyContent: 'center', - // paddingBottom: '45px', - // paddingLeft: '45px', - // paddingRight: '45px', - // alignItems: 'center', }, }, [ Array.isArray(Qr.message) ? h('.message-container', this.renderMultiMessage()) : h('.qr-header', Qr.message), this.props.warning ? this.props.warning && h('span.error.flex-center', { style: { - // textAlign: 'center', - // width: '229px', - // height: '82px', }, }, this.props.warning) : null, -- cgit From 744b78e9c8c032cdd13acf121f891c28f319ed4d Mon Sep 17 00:00:00 2001 From: Dan J Miller Date: Thu, 24 Aug 2017 21:55:27 -0230 Subject: Patch 2 account details modal (#1957) * Account details modal styling changes. * Tweaking styles. --- ui/app/components/qr-code.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'ui/app/components/qr-code.js') diff --git a/ui/app/components/qr-code.js b/ui/app/components/qr-code.js index 1de5f7352..6559fcb7a 100644 --- a/ui/app/components/qr-code.js +++ b/ui/app/components/qr-code.js @@ -41,16 +41,13 @@ QrCodeView.prototype.render = function () { }, this.props.warning) : null, - h('.div', { - style: { - marginTop: '25px', - marginBottom: '15px', - }, + h('.div.qr-wrapper', { + style: {}, dangerouslySetInnerHTML: { __html: qrImage.createTableTag(4), }, }), - h('.div', [ + h('.div.ellip-address-wrapper', [ h('span.qr-ellip-address', { style: { width: '247px', -- cgit From e7b3ef0708290a81dad5c469adaa6fab3f1c45b5 Mon Sep 17 00:00:00 2001 From: Dan Date: Tue, 29 Aug 2017 12:20:48 -0230 Subject: Lint fixes --- ui/app/components/qr-code.js | 1 - 1 file changed, 1 deletion(-) (limited to 'ui/app/components/qr-code.js') diff --git a/ui/app/components/qr-code.js b/ui/app/components/qr-code.js index 6559fcb7a..8d6b43b6c 100644 --- a/ui/app/components/qr-code.js +++ b/ui/app/components/qr-code.js @@ -4,7 +4,6 @@ const qrCode = require('qrcode-npm').qrcode const inherits = require('util').inherits const connect = require('react-redux').connect const isHexPrefixed = require('ethereumjs-util').isHexPrefixed -const CopyButton = require('./copyButton') module.exports = connect(mapStateToProps)(QrCodeView) -- cgit From c4eb2fb3ea1c1f0753a6bed736503528f4e539cf Mon Sep 17 00:00:00 2001 From: Dan Date: Wed, 6 Sep 2017 10:54:27 -0230 Subject: Account-detail address is a readonly input. --- ui/app/components/qr-code.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'ui/app/components/qr-code.js') diff --git a/ui/app/components/qr-code.js b/ui/app/components/qr-code.js index 8d6b43b6c..8e4d01c00 100644 --- a/ui/app/components/qr-code.js +++ b/ui/app/components/qr-code.js @@ -47,11 +47,13 @@ QrCodeView.prototype.render = function () { }, }), h('.div.ellip-address-wrapper', [ - h('span.qr-ellip-address', { + h('input.qr-ellip-address', { style: { width: '247px', }, - }, Qr.data), + value: Qr.data, + readonly: 'readonly', + }), // h(CopyButton, { // value: Qr.data, // }), -- cgit From a0ca3fab774307e806fc881f1ce2bc6fc3a789ce Mon Sep 17 00:00:00 2001 From: Dan Date: Thu, 7 Sep 2017 14:15:21 -0230 Subject: Modify readonly value in for input in qr-code. --- ui/app/components/qr-code.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ui/app/components/qr-code.js') diff --git a/ui/app/components/qr-code.js b/ui/app/components/qr-code.js index 8e4d01c00..4257c1a15 100644 --- a/ui/app/components/qr-code.js +++ b/ui/app/components/qr-code.js @@ -52,7 +52,7 @@ QrCodeView.prototype.render = function () { width: '247px', }, value: Qr.data, - readonly: 'readonly', + readonly: true, }), // h(CopyButton, { // value: Qr.data, -- cgit From 24fd16b1bee31352ef7f364804eb5f06c08c3bf6 Mon Sep 17 00:00:00 2001 From: Dan Date: Tue, 19 Sep 2017 22:26:10 -0230 Subject: Abstract account modal. --- ui/app/components/qr-code.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ui/app/components/qr-code.js') diff --git a/ui/app/components/qr-code.js b/ui/app/components/qr-code.js index 4257c1a15..dca5c8c47 100644 --- a/ui/app/components/qr-code.js +++ b/ui/app/components/qr-code.js @@ -52,7 +52,7 @@ QrCodeView.prototype.render = function () { width: '247px', }, value: Qr.data, - readonly: true, + readOnly: true, }), // h(CopyButton, { // value: Qr.data, -- cgit From 48867d95fe1a064683f96ad60fd36c893500f62c Mon Sep 17 00:00:00 2001 From: Dan Date: Tue, 19 Sep 2017 22:46:51 -0230 Subject: ReadOnlyInput component. --- ui/app/components/qr-code.js | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'ui/app/components/qr-code.js') diff --git a/ui/app/components/qr-code.js b/ui/app/components/qr-code.js index dca5c8c47..cc723df14 100644 --- a/ui/app/components/qr-code.js +++ b/ui/app/components/qr-code.js @@ -4,6 +4,7 @@ const qrCode = require('qrcode-npm').qrcode const inherits = require('util').inherits const connect = require('react-redux').connect const isHexPrefixed = require('ethereumjs-util').isHexPrefixed +const ReadOnlyInput = require('./readonly-input') module.exports = connect(mapStateToProps)(QrCodeView) @@ -46,18 +47,11 @@ QrCodeView.prototype.render = function () { __html: qrImage.createTableTag(4), }, }), - h('.div.ellip-address-wrapper', [ - h('input.qr-ellip-address', { - style: { - width: '247px', - }, - value: Qr.data, - readOnly: true, - }), - // h(CopyButton, { - // value: Qr.data, - // }), - ]), + h(ReadOnlyInput, { + wrapperClass: 'ellip-address-wrapper', + inputClass: 'qr-ellip-address', + value: Qr.data, + }), ]) } -- cgit From 22d9e3a7e6dfd21b3ea52007030d71f53e29b851 Mon Sep 17 00:00:00 2001 From: Alexander Tseung Date: Wed, 25 Oct 2017 18:23:46 -0700 Subject: Allow editing account name in account details modal --- ui/app/components/qr-code.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'ui/app/components/qr-code.js') diff --git a/ui/app/components/qr-code.js b/ui/app/components/qr-code.js index cc723df14..83885539c 100644 --- a/ui/app/components/qr-code.js +++ b/ui/app/components/qr-code.js @@ -29,11 +29,11 @@ QrCodeView.prototype.render = function () { const qrImage = qrCode(4, 'M') qrImage.addData(address) qrImage.make() - return h('.div.flex-column.flex-center', { - style: { - }, - }, [ - Array.isArray(Qr.message) ? h('.message-container', this.renderMultiMessage()) : h('.qr-header', Qr.message), + + return h('.div.flex-column.flex-center', [ + Array.isArray(Qr.message) + ? h('.message-container', this.renderMultiMessage()) + : Qr.message && h('.qr-header', Qr.message), this.props.warning ? this.props.warning && h('span.error.flex-center', { style: { -- cgit