From 3628c5b324b1c9afb052bb73bd53026d51116545 Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Tue, 4 Oct 2016 17:42:17 -0700 Subject: Implemented scroll-to-bottom functionality for button activation. --- ui/app/first-time/disclaimer.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'ui') diff --git a/ui/app/first-time/disclaimer.js b/ui/app/first-time/disclaimer.js index c6174a220..244b7bc97 100644 --- a/ui/app/first-time/disclaimer.js +++ b/ui/app/first-time/disclaimer.js @@ -50,6 +50,14 @@ DisclaimerScreen.prototype.render = function () { `), h('div.markdown', { + onScroll: (e) => { + var object = e.currentTarget + if (object.offsetHeight + object.scrollTop + 100 >= object.scrollHeight) { + var button = document.getElementById('agree') + button.disabled = false + button.addEventListener('click', () => this.props.dispatch(actions.agreeToDisclaimer())) + } + }, style: { // whiteSpace: 'pre-line', background: 'rgb(235, 235, 235)', @@ -67,11 +75,11 @@ DisclaimerScreen.prototype.render = function () { ]), - h('button', { + h('button#agree', { style: { marginTop: '18px' }, + disabled: true, onClick: () => this.props.dispatch(actions.agreeToDisclaimer()), }, 'I Agree'), ]) ) } - -- cgit v1.2.3 From 991c06e5421406ab352bbc59d3a6a343ee78b383 Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Tue, 4 Oct 2016 18:39:54 -0700 Subject: Add CSS rules for proper formatting. --- ui/app/first-time/disclaimer.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'ui') diff --git a/ui/app/first-time/disclaimer.js b/ui/app/first-time/disclaimer.js index 244b7bc97..84c9e6a56 100644 --- a/ui/app/first-time/disclaimer.js +++ b/ui/app/first-time/disclaimer.js @@ -43,10 +43,16 @@ DisclaimerScreen.prototype.render = function () { } .markdown h1, .markdown h2, .markdown h3 { margin: 10px 0; - font-family: arial sans-serif; font-weight: bold; } + .markdown strong { + font-weight: bold; + } + .markdown em { + font-style: italic; + } + `), h('div.markdown', { -- cgit v1.2.3 From 1158855a15c6b14a5d9fde0a6007feabcc05ea85 Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Tue, 4 Oct 2016 18:45:01 -0700 Subject: Add padding to markdown paragraphs. --- ui/app/first-time/disclaimer.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ui') diff --git a/ui/app/first-time/disclaimer.js b/ui/app/first-time/disclaimer.js index 84c9e6a56..423d327ca 100644 --- a/ui/app/first-time/disclaimer.js +++ b/ui/app/first-time/disclaimer.js @@ -53,6 +53,10 @@ DisclaimerScreen.prototype.render = function () { font-style: italic; } + .markdown p { + margin: 10px 0; + } + `), h('div.markdown', { -- cgit v1.2.3 From 64d8f91371ad6253e694c472a681e69474a3df94 Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Tue, 4 Oct 2016 20:49:06 -0700 Subject: Add conditional logic for adding listener. --- ui/app/first-time/disclaimer.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'ui') diff --git a/ui/app/first-time/disclaimer.js b/ui/app/first-time/disclaimer.js index 423d327ca..1c01718eb 100644 --- a/ui/app/first-time/disclaimer.js +++ b/ui/app/first-time/disclaimer.js @@ -62,9 +62,11 @@ DisclaimerScreen.prototype.render = function () { h('div.markdown', { onScroll: (e) => { var object = e.currentTarget - if (object.offsetHeight + object.scrollTop + 100 >= object.scrollHeight) { - var button = document.getElementById('agree') + var button = document.getElementById('agree') + if ((object.offsetHeight + object.scrollTop + 100 >= object.scrollHeight) && button.disabled) { button.disabled = false + button.innerHTML = 'I Agree' + console.log("YAHALLO") button.addEventListener('click', () => this.props.dispatch(actions.agreeToDisclaimer())) } }, @@ -89,7 +91,7 @@ DisclaimerScreen.prototype.render = function () { style: { marginTop: '18px' }, disabled: true, onClick: () => this.props.dispatch(actions.agreeToDisclaimer()), - }, 'I Agree'), + }, 'Scroll to Enable'), ]) ) } -- cgit v1.2.3 From 94bfb5410b8548440436215d68769963725adb59 Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Tue, 4 Oct 2016 21:03:14 -0700 Subject: Add links to relevant legal pages on user agreement page. --- ui/app/first-time/disclaimer.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'ui') diff --git a/ui/app/first-time/disclaimer.js b/ui/app/first-time/disclaimer.js index 1c01718eb..312c864d7 100644 --- a/ui/app/first-time/disclaimer.js +++ b/ui/app/first-time/disclaimer.js @@ -40,6 +40,7 @@ DisclaimerScreen.prototype.render = function () { .markdown { font-family: Times New Roman; + overflow-x: hidden; } .markdown h1, .markdown h2, .markdown h3 { margin: 10px 0; @@ -57,6 +58,10 @@ DisclaimerScreen.prototype.render = function () { margin: 10px 0; } + .markdown a { + color: blue; + } + `), h('div.markdown', { @@ -66,7 +71,6 @@ DisclaimerScreen.prototype.render = function () { if ((object.offsetHeight + object.scrollTop + 100 >= object.scrollHeight) && button.disabled) { button.disabled = false button.innerHTML = 'I Agree' - console.log("YAHALLO") button.addEventListener('click', () => this.props.dispatch(actions.agreeToDisclaimer())) } }, @@ -91,7 +95,7 @@ DisclaimerScreen.prototype.render = function () { style: { marginTop: '18px' }, disabled: true, onClick: () => this.props.dispatch(actions.agreeToDisclaimer()), - }, 'Scroll to Enable'), + }, 'Scroll Down to Enable'), ]) ) } -- cgit v1.2.3 From 9b619787386cd951ebe96555574829b7c632a2c2 Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Tue, 4 Oct 2016 21:06:31 -0700 Subject: Make config page title consistent with menu item. --- ui/app/config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ui') diff --git a/ui/app/config.js b/ui/app/config.js index b043a47d6..e09a38cd8 100644 --- a/ui/app/config.js +++ b/ui/app/config.js @@ -31,7 +31,7 @@ ConfigScreen.prototype.render = function () { state.dispatch(actions.goHome()) }, }), - h('h2.page-subtitle', 'Configuration'), + h('h2.page-subtitle', 'Settings'), ]), // conf view -- cgit v1.2.3 From f7714412e5da4a514d978b3f49404f015a106711 Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Tue, 4 Oct 2016 21:46:33 -0700 Subject: Add relevant legal links to help page. --- ui/app/info.js | 49 +++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 41 insertions(+), 8 deletions(-) (limited to 'ui') diff --git a/ui/app/info.js b/ui/app/info.js index 5c06409bd..f014e53fe 100644 --- a/ui/app/info.js +++ b/ui/app/info.js @@ -56,6 +56,41 @@ InfoScreen.prototype.render = function () { }, `Version: ${manifest.version}`), ]), + h('div', { + style: { + marginBottom: '10px', + }}, + [ + h('div', [ + h('a', { + href: 'https://metamask.io/privacy.html', + target: '_blank', + onClick (event) { this.navigateTo(event.target.href) }, + }, [ + h('div.info', 'Privacy Policy'), + ]), + ]), + h('div', [ + h('a', { + href: 'https://metamask.io/terms.html', + target: '_blank', + onClick (event) { this.navigateTo(event.target.href) }, + }, [ + h('div.info', 'Terms of Use'), + ]), + ]), + h('div', [ + h('a', { + href: 'https://metamask.io/attributions.html', + target: '_blank', + onClick (event) { this.navigateTo(event.target.href) }, + }, [ + h('div.info', 'Attributions'), + ]), + ]), + ] + ), + h('hr', { style: { margin: '20px 0 ', @@ -63,12 +98,6 @@ InfoScreen.prototype.render = function () { }, }), - h('.info', - `For more information on MetaMask - you can visit our web site. If you want to - contact us with questions or just - say 'Hi', you can find us on these platforms:`), - h('div', { style: { paddingLeft: '30px', @@ -82,6 +111,10 @@ InfoScreen.prototype.render = function () { }, [ h('img.icon-size', { src: manifest.icons[128], + style: { + filter: "grayscale(100%)", /* IE6-9 */ + WebkitFilter: "grayscale(100%)", /* Microsoft Edge and Firefox 35+ */ + } }), h('div.info', 'Visit our web site'), ]), @@ -107,7 +140,7 @@ InfoScreen.prototype.render = function () { target: '_blank', style: { width: '85vw' }, onClick () { extension.tabs.create({url: 'mailto:help@metamask.io?subject=Feedback'}) }, - }, 'Email us any questions or comments!'), + }, 'Email us!'), ]), h('div.fa.fa-github', [ @@ -115,7 +148,7 @@ InfoScreen.prototype.render = function () { href: 'https://github.com/metamask/talk/issues', target: '_blank', onClick (event) { this.navigateTo(event.target.href) }, - }, 'Start a thread on Github'), + }, 'Start a thread on GitHub'), ]), ]), ]), -- cgit v1.2.3 From 862adf3a4bde68e20885a16bf7c8ab241476429e Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Tue, 4 Oct 2016 21:47:17 -0700 Subject: Rename drop menu item to be consistent with naming. --- ui/app/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ui') diff --git a/ui/app/app.js b/ui/app/app.js index d26af4e77..def683bba 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -301,7 +301,7 @@ App.prototype.renderDropdown = function () { }), h(DropMenuItem, { - label: 'Help', + label: 'Info', closeMenu: () => this.setState({ isMainMenuOpen: !isOpen }), action: () => this.props.dispatch(actions.showInfoPage()), icon: h('i.fa.fa-question.fa-lg'), -- cgit v1.2.3 From a59422c01dbea4ec3db08ba5efc2d0baf490c6e0 Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Tue, 4 Oct 2016 21:50:56 -0700 Subject: Linting. --- ui/app/info.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ui') diff --git a/ui/app/info.js b/ui/app/info.js index f014e53fe..9eb2c2e98 100644 --- a/ui/app/info.js +++ b/ui/app/info.js @@ -112,9 +112,9 @@ InfoScreen.prototype.render = function () { h('img.icon-size', { src: manifest.icons[128], style: { - filter: "grayscale(100%)", /* IE6-9 */ - WebkitFilter: "grayscale(100%)", /* Microsoft Edge and Firefox 35+ */ - } + filter: 'grayscale(100%)', /* IE6-9 */ + WebkitFilter: 'grayscale(100%)', /* Microsoft Edge and Firefox 35+ */ + }, }), h('div.info', 'Visit our web site'), ]), -- cgit v1.2.3 From c0d6dcff00b36e89242695a4a29c5f52f4d3a5be Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Wed, 5 Oct 2016 02:42:19 -0700 Subject: Rewritten to react standards. Way easier. --- ui/app/first-time/disclaimer.js | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'ui') diff --git a/ui/app/first-time/disclaimer.js b/ui/app/first-time/disclaimer.js index 312c864d7..3ec0b37c3 100644 --- a/ui/app/first-time/disclaimer.js +++ b/ui/app/first-time/disclaimer.js @@ -19,6 +19,9 @@ function DisclaimerScreen () { } DisclaimerScreen.prototype.render = function () { + const state = this.state || {disclaimerDisabled: true} + const disabled = state.disclaimerDisabled + return ( h('.flex-column.flex-center.flex-grow', [ @@ -67,15 +70,11 @@ DisclaimerScreen.prototype.render = function () { h('div.markdown', { onScroll: (e) => { var object = e.currentTarget - var button = document.getElementById('agree') - if ((object.offsetHeight + object.scrollTop + 100 >= object.scrollHeight) && button.disabled) { - button.disabled = false - button.innerHTML = 'I Agree' - button.addEventListener('click', () => this.props.dispatch(actions.agreeToDisclaimer())) + if (object.offsetHeight + object.scrollTop + 100 >= object.scrollHeight) { + this.setState({disclaimerDisabled: false}) } }, style: { - // whiteSpace: 'pre-line', background: 'rgb(235, 235, 235)', height: '310px', padding: '6px', @@ -91,11 +90,11 @@ DisclaimerScreen.prototype.render = function () { ]), - h('button#agree', { + h('button', { style: { marginTop: '18px' }, - disabled: true, + disabled: disabled, onClick: () => this.props.dispatch(actions.agreeToDisclaimer()), - }, 'Scroll Down to Enable'), + }, disabled ? 'Scroll Down to Enable' : 'I Agree'), ]) ) } -- cgit v1.2.3 From 0ecf364c5b2d8dc3b3cb8474b2124e50955bc602 Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Fri, 7 Oct 2016 02:11:03 -0700 Subject: Prevent back/login buttons from appearing on the terms of service. --- ui/app/app.js | 1 + 1 file changed, 1 insertion(+) (limited to 'ui') diff --git a/ui/app/app.js b/ui/app/app.js index def683bba..71e0637d0 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -330,6 +330,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.isUnlocked) { if (props.currentView.name === 'InitMenu') { button = props.forgottenPassword ? h('.flex-row', { -- cgit v1.2.3 From ed03b89e266ab25444d69f23e5f9f0070f0080d7 Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Tue, 11 Oct 2016 14:32:03 -0700 Subject: Move tos hash logic to build phase. Create dynamic global variables based on build. --- ui/app/store.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ui') diff --git a/ui/app/store.js b/ui/app/store.js index 8d891bdc9..ba9e58b49 100644 --- a/ui/app/store.js +++ b/ui/app/store.js @@ -4,7 +4,7 @@ const thunkMiddleware = require('redux-thunk') const rootReducer = require('./reducers') const createLogger = require('redux-logger') -global.METAMASK_DEBUG = false +global.METAMASK_DEBUG = 'GULP_METAMASK_DEBUG' module.exports = configureStore -- cgit v1.2.3 From 5e9bc31c58aff4b9d1d0d1bd54416ffb0a1b14d3 Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Tue, 11 Oct 2016 15:50:02 -0700 Subject: Cleanup. --- ui/app/account-detail.js | 3 +++ ui/app/first-time/disclaimer.js | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'ui') diff --git a/ui/app/account-detail.js b/ui/app/account-detail.js index 01c7e8781..00dd57b6f 100644 --- a/ui/app/account-detail.js +++ b/ui/app/account-detail.js @@ -44,6 +44,9 @@ AccountDetailScreen.prototype.render = function () { var props = this.props var selected = props.address || Object.keys(props.accounts)[0] var identity = props.identities[selected] + console.log(props) + console.log(selected) + console.log(identity) var account = props.accounts[selected] const { network } = props diff --git a/ui/app/first-time/disclaimer.js b/ui/app/first-time/disclaimer.js index 3ec0b37c3..819d4a110 100644 --- a/ui/app/first-time/disclaimer.js +++ b/ui/app/first-time/disclaimer.js @@ -92,7 +92,7 @@ DisclaimerScreen.prototype.render = function () { h('button', { style: { marginTop: '18px' }, - disabled: disabled, + disabled, onClick: () => this.props.dispatch(actions.agreeToDisclaimer()), }, disabled ? 'Scroll Down to Enable' : 'I Agree'), ]) -- cgit v1.2.3 From 1dc2612f8e03fb26810784e71c0ce075534d585e Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Tue, 11 Oct 2016 15:59:55 -0700 Subject: Remove flex class from account list container --- ui/app/accounts/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ui') diff --git a/ui/app/accounts/index.js b/ui/app/accounts/index.js index 735526c60..7551c498e 100644 --- a/ui/app/accounts/index.js +++ b/ui/app/accounts/index.js @@ -54,7 +54,7 @@ AccountsScreen.prototype.render = function () { h('hr.horizontal-line'), // identity selection - h('section.identity-section.flex-column', { + h('section.identity-section', { style: { height: '418px', overflowY: 'auto', -- cgit v1.2.3 From 39f2118d314b4d12a4ebfdebd736e40d9474fad3 Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Tue, 11 Oct 2016 16:03:52 -0700 Subject: Remove logs. --- ui/app/account-detail.js | 3 --- 1 file changed, 3 deletions(-) (limited to 'ui') diff --git a/ui/app/account-detail.js b/ui/app/account-detail.js index 00dd57b6f..01c7e8781 100644 --- a/ui/app/account-detail.js +++ b/ui/app/account-detail.js @@ -44,9 +44,6 @@ AccountDetailScreen.prototype.render = function () { var props = this.props var selected = props.address || Object.keys(props.accounts)[0] var identity = props.identities[selected] - console.log(props) - console.log(selected) - console.log(identity) var account = props.accounts[selected] const { network } = props -- cgit v1.2.3