From baba71946859ea8e8d059f1ba4145297097c6dc9 Mon Sep 17 00:00:00 2001 From: kumavis Date: Mon, 27 Jun 2016 16:28:07 -0700 Subject: notif - change size for better readability --- app/scripts/lib/notifications.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/scripts/lib/notifications.js b/app/scripts/lib/notifications.js index a5746ae6e..2a058db75 100644 --- a/app/scripts/lib/notifications.js +++ b/app/scripts/lib/notifications.js @@ -154,8 +154,8 @@ function renderNotificationSVG(content, cb){ var container = document.createElement('div') var confirmView = h('div.app-primary', { style: { - width: '450px', - height: '300px', + width: '360px', + height: '240px', padding: '16px', // background: '#F7F7F7', background: 'white', @@ -177,7 +177,7 @@ function renderNotificationSVG(content, cb){ function svgWrapper(content){ var wrapperSource = ` - + {{content}} -- cgit From 9f5b62752e6c022a05bcda6cd922241120d52274 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Tue, 28 Jun 2016 11:38:29 -0700 Subject: Fix formatting on terms & conditions page --- CHANGELOG.md | 1 + ui/app/first-time/disclaimer.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e70ef5e51..2ee7dc930 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - Fixed bug where MetaMask interfered with PDF loading. - Moved switch account icon into menu bar. - Changed status shapes to be a yellow warning sign for failure and ellipsis for pending transactions. +- Fix formatting on terms & conditions page. ## 2.4.4 2016-06-23 diff --git a/ui/app/first-time/disclaimer.js b/ui/app/first-time/disclaimer.js index bfd6c490d..7f615cfb0 100644 --- a/ui/app/first-time/disclaimer.js +++ b/ui/app/first-time/disclaimer.js @@ -38,7 +38,7 @@ DisclaimerScreen.prototype.render = function () { style: { whiteSpace: 'pre-line', background: 'rgb(235, 235, 235)', - height: '336px', + height: '310px', padding: '6px', width: '80%', overflowY: 'scroll', -- cgit From 6a8725901676804711372fb60865db16e8b80615 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Tue, 28 Jun 2016 11:50:42 -0700 Subject: Simplify `send ether` button to `send`. --- ui/app/account-detail.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/app/account-detail.js b/ui/app/account-detail.js index 695a1a3f9..7daa3a4dd 100644 --- a/ui/app/account-detail.js +++ b/ui/app/account-detail.js @@ -145,7 +145,7 @@ AccountDetailScreen.prototype.render = function () { style: { margin: 10, }, - }, 'SEND ETH'), + }, 'SEND'), ]), -- cgit From c82d7585b824f7617d3765036b2d9d82b49c3493 Mon Sep 17 00:00:00 2001 From: kumavis Date: Tue, 28 Jun 2016 12:36:53 -0700 Subject: background - prepare state for notifcations --- app/scripts/background.js | 32 ++++++++++++++++++++++++-------- app/scripts/lib/notifications.js | 40 ++++------------------------------------ 2 files changed, 28 insertions(+), 44 deletions(-) diff --git a/app/scripts/background.js b/app/scripts/background.js index 97e3269ba..7ffbe5c41 100644 --- a/app/scripts/background.js +++ b/app/scripts/background.js @@ -30,21 +30,37 @@ function unlockAccountMessage () { } function showUnconfirmedMessage (msgParams, msgId) { + var controllerState = controller.getState() + createMsgNotification({ - title: 'New Unsigned Message', - msgParams: msgParams, - confirm: idStore.approveMessage.bind(idStore, msgId, noop), - cancel: idStore.cancelMessage.bind(idStore, msgId), + imageifyIdenticons: false, + txData: { + msgParams: opts.msgParams, + time: (new Date()).getTime(), + }, + identities: controllerState.identities, + accounts: controllerState.accounts, + onConfirm: idStore.approveMessage.bind(idStore, msgId, noop), + onCancel: idStore.cancelMessage.bind(idStore, msgId), }) + } function showUnconfirmedTx (txParams, txData, onTxDoneCb) { + var controllerState = controller.getState() + createTxNotification({ - title: 'New Unsigned Transaction', - txParams: txParams, - confirm: idStore.approveTransaction.bind(idStore, txData.id, noop), - cancel: idStore.cancelTransaction.bind(idStore, txData.id), + imageifyIdenticons: false, + txData: { + txParams: txParams, + time: (new Date()).getTime(), + }, + identities: controllerState.identities, + accounts: controllerState.accounts, + onConfirm: idStore.approveTransaction.bind(idStore, txData.id, noop), + onCancel: idStore.cancelTransaction.bind(idStore, txData.id), }) + } // diff --git a/app/scripts/lib/notifications.js b/app/scripts/lib/notifications.js index 2a058db75..2f97f22ac 100644 --- a/app/scripts/lib/notifications.js +++ b/app/scripts/lib/notifications.js @@ -53,62 +53,30 @@ function createUnlockRequestNotification (opts) { }) } -function createTxNotification (opts) { +function createTxNotification (state) { // guard for chrome bug https://github.com/MetaMask/metamask-plugin/issues/236 if (!chrome.notifications) return console.error('Chrome notifications API missing...') - var state = { - title: 'New Unsigned Transaction', - imageifyIdenticons: false, - txData: { - txParams: opts.txParams, - time: (new Date()).getTime(), - }, - identities: { - - }, - accounts: { - - }, - onConfirm: opts.confirm, - onCancel: opts.cancel, - } - renderTxNotificationSVG(state, function(err, notificationSvgSource){ if (err) throw err showNotification(extend(state, { + title: 'New Unsigned Transaction', imageUrl: toSvgUri(notificationSvgSource), })) }) } -function createMsgNotification (opts) { +function createMsgNotification (state) { // guard for chrome bug https://github.com/MetaMask/metamask-plugin/issues/236 if (!chrome.notifications) return console.error('Chrome notifications API missing...') - var state = { - title: 'New Unsigned Message', - imageifyIdenticons: false, - txData: { - msgParams: opts.msgParams, - time: (new Date()).getTime(), - }, - identities: { - - }, - accounts: { - - }, - onConfirm: opts.confirm, - onCancel: opts.cancel, - } - renderMsgNotificationSVG(state, function(err, notificationSvgSource){ if (err) throw err showNotification(extend(state, { + title: 'New Unsigned Message', imageUrl: toSvgUri(notificationSvgSource), })) -- cgit From b1d5a332c08412afd2effe4f516648ed77fe91d2 Mon Sep 17 00:00:00 2001 From: kumavis Date: Tue, 28 Jun 2016 12:41:37 -0700 Subject: fix typo --- app/scripts/background.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/scripts/background.js b/app/scripts/background.js index 7ffbe5c41..28285fd70 100644 --- a/app/scripts/background.js +++ b/app/scripts/background.js @@ -35,7 +35,7 @@ function showUnconfirmedMessage (msgParams, msgId) { createMsgNotification({ imageifyIdenticons: false, txData: { - msgParams: opts.msgParams, + msgParams: msgParams, time: (new Date()).getTime(), }, identities: controllerState.identities, -- cgit From 56087543c807e24ff7d3fd2d7b38050ae4bbb598 Mon Sep 17 00:00:00 2001 From: kumavis Date: Tue, 28 Jun 2016 13:03:16 -0700 Subject: clean - remove svg notifications doc --- svg-notifications.md | 38 -------------------------------------- 1 file changed, 38 deletions(-) delete mode 100644 svg-notifications.md diff --git a/svg-notifications.md b/svg-notifications.md deleted file mode 100644 index 577e7d07c..000000000 --- a/svg-notifications.md +++ /dev/null @@ -1,38 +0,0 @@ -Chrome notifications allow you to show an SVG image via a data-uri - -Taking advantage of this might allow us to show nicely formatted notifications - -build a template using pure svg: - -```svg - - - - Domain: https://boardroom.to - From: 0xabcdef - To: 0xfedcba - Value: 1.025 Ether - Gas: 0.025 Ether - - -``` - -generate uri -`'data:image/svg+xml;charset=utf-8,'+encodeURIComponent(svgSrc)` - -or svg-embedded html: - -```svg - - - - -
- The quick brown fox jumps over the lazy dog. - Pack my box with five dozen liquor jugs -
- -
-
-``` -- cgit