From aa21c83470d2fa89a5dc09a49c7ab83cf4e87ad7 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Thu, 30 Jun 2016 20:54:51 -0700 Subject: Add new user agreement --- ui/app/first-time/disclaimer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ui') diff --git a/ui/app/first-time/disclaimer.js b/ui/app/first-time/disclaimer.js index 7f615cfb0..4a9e234b1 100644 --- a/ui/app/first-time/disclaimer.js +++ b/ui/app/first-time/disclaimer.js @@ -5,7 +5,7 @@ const connect = require('react-redux').connect const actions = require('../actions') const fs = require('fs') const path = require('path') -const disclaimer = fs.readFileSync(path.join(__dirname, 'disclaimer.txt')).toString() +const disclaimer = fs.readFileSync(path.join(__dirname, '..', '..', '..', 'USER_AGREEMENT.md')).toString() module.exports = connect(mapStateToProps)(DisclaimerScreen) function mapStateToProps (state) { -- cgit v1.2.3 From a0a676c3e2f1c37613c5890ffd77542736804ba1 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Thu, 30 Jun 2016 21:24:14 -0700 Subject: Remove old disclaimer --- ui/app/first-time/disclaimer.txt | 8 -------- 1 file changed, 8 deletions(-) (limited to 'ui') diff --git a/ui/app/first-time/disclaimer.txt b/ui/app/first-time/disclaimer.txt index a1df99627..b7c2cf13e 100644 --- a/ui/app/first-time/disclaimer.txt +++ b/ui/app/first-time/disclaimer.txt @@ -1,11 +1,3 @@ Full disclaimer coming soon. In the meanwhile, be aware this is experimental software. We are not responsible for how you use MetaMask, or any funds that you spend or lose with it. The only way to be absolutely sure you will lose no funds on the internet is to put no funds onto the internet. Enjoy! -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam accumsan tortor sed fringilla ultrices. Vestibulum congue fermentum nisi, venenatis dapibus urna semper id. Phasellus pretium faucibus nisi accumsan euismod. Nunc vel leo velit. Duis est felis, bibendum non dolor et, rhoncus gravida velit. Sed nec velit at nisi congue tincidunt non at felis. Praesent tincidunt, ipsum sit amet varius vulputate, purus lacus dictum tortor, vitae tempus dui turpis a lacus. Vivamus ut elit sodales, auctor nisi vitae, gravida est. Donec id massa ac ante rhoncus interdum. Aliquam gravida augue rhoncus libero ultricies scelerisque. -Cras a ornare tortor. Vestibulum et scelerisque lacus. Proin dapibus consectetur blandit. Aliquam viverra, orci eget efficitur pharetra, velit tortor rhoncus ipsum, sit amet sollicitudin turpis velit vitae nunc. Sed pretium ut nisl sed mollis. Proin libero erat, molestie id est sed, pellentesque hendrerit nulla. Donec vitae efficitur nunc. Integer ornare nisi volutpat nisi sodales cursus. Nam ante odio, congue vel turpis non, viverra congue mauris. Maecenas ullamcorper ligula eget lorem ornare mollis. Interdum et malesuada fames ac ante ipsum primis in faucibus. - -Sed sem odio, malesuada ut convallis nec, accumsan sit amet nulla. Morbi fringilla, purus vestibulum lacinia suscipit, massa mi pulvinar lorem, sit amet vestibulum purus turpis ut dolor. Integer felis eros, accumsan id urna ac, tincidunt vehicula purus. Pellentesque felis massa, convallis euismod vestibulum a, molestie non ante. Nulla sodales fermentum ultricies. In id malesuada diam, eget blandit arcu. Nullam a lacus a mauris rhoncus maximus eu ut ex. Phasellus non mauris mi. Duis at lectus sollicitudin, malesuada augue malesuada, tempor velit. Etiam vehicula leo id sapien feugiat consequat. Donec eget ex at sapien facilisis dapibus. Morbi condimentum magna nec venenatis vulputate. Nullam lobortis ante turpis, ac fermentum ipsum posuere id. Nullam pharetra velit vel dolor faucibus vehicula. Fusce quis ipsum nec felis blandit elementum a ut augue. - -Integer faucibus enim id odio auctor, ut sagittis diam luctus. Mauris iaculis rutrum risus, quis sagittis dolor fermentum eget. Praesent sit amet augue vitae erat efficitur placerat dictum ut magna. Suspendisse consectetur, risus quis pharetra molestie, enim dui accumsan erat, sed imperdiet orci dolor et nibh. Cras odio justo, pretium sit amet consequat luctus, imperdiet a lorem. Nam vulputate tincidunt erat, eget pellentesque dui elementum non. Sed vitae ante faucibus, pulvinar felis ornare, ornare felis. - -Donec nec lorem velit. Mauris sollicitudin quam turpis, quis finibus mauris semper in. Nullam efficitur faucibus lectus, vitae sagittis neque pellentesque in. Vivamus neque tellus, mollis at ultricies at, dignissim sit amet odio. Curabitur nec mi et lacus interdum hendrerit at et est. Nullam varius purus eu volutpat luctus. Vestibulum non sem eros. Nulla tempor, leo eu varius euismod, massa est mattis massa, id finibus mi erat a odio. Quisque et tincidunt justo. Curabitur eu lacus leo. Aliquam eget odio tempor, tincidunt nunc a, maximus diam. Curabitur venenatis nunc risus, in ullamcorper neque pharetra sit amet. Sed euismod dolor sed enim venenatis dapibus. Mauris congue magna nisl, et tincidunt dui vulputate vel. -- cgit v1.2.3 From cd21a4b699fd692800e0fb6ef961d98e786925b6 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Thu, 30 Jun 2016 21:32:50 -0700 Subject: Remove scroll fixing from ui preview --- ui/index.html | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) (limited to 'ui') diff --git a/ui/index.html b/ui/index.html index ba8a8baac..9dfaefbb3 100644 --- a/ui/index.html +++ b/ui/index.html @@ -14,25 +14,7 @@
- -
- + - \ No newline at end of file + -- cgit v1.2.3 From 5a917431d8ce2587284d938b6135a62bff6e17d1 Mon Sep 17 00:00:00 2001 From: kumavis Date: Thu, 30 Jun 2016 21:46:19 -0700 Subject: disclaimer - render via react-markdown --- 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 4a9e234b1..929624814 100644 --- a/ui/app/first-time/disclaimer.js +++ b/ui/app/first-time/disclaimer.js @@ -3,6 +3,7 @@ const Component = require('react').Component const h = require('react-hyperscript') const connect = require('react-redux').connect const actions = require('../actions') +const ReactMarkdown = require('react-markdown') const fs = require('fs') const path = require('path') const disclaimer = fs.readFileSync(path.join(__dirname, '..', '..', '..', 'USER_AGREEMENT.md')).toString() @@ -36,14 +37,21 @@ DisclaimerScreen.prototype.render = function () { h('div', { style: { - whiteSpace: 'pre-line', + // whiteSpace: 'pre-line', background: 'rgb(235, 235, 235)', height: '310px', padding: '6px', width: '80%', overflowY: 'scroll', }, - }, disclaimer), + }, [ + + h(ReactMarkdown, { + source: disclaimer, + skipHtml: true, + }), + + ]), h('button', { style: { marginTop: '18px' }, -- cgit v1.2.3 From 7f9200b1bf50238e0452adb2d7867dc48868d775 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Thu, 30 Jun 2016 23:15:45 -0700 Subject: Added some basic styles --- ui/app/first-time/disclaimer.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'ui') diff --git a/ui/app/first-time/disclaimer.js b/ui/app/first-time/disclaimer.js index 929624814..f25bf9245 100644 --- a/ui/app/first-time/disclaimer.js +++ b/ui/app/first-time/disclaimer.js @@ -35,7 +35,20 @@ DisclaimerScreen.prototype.render = function () { 'MetaMask Terms & Conditions', ]), - h('div', { + h('style', ` + + .markdown { + font-family: Times New Roman; + } + .markdown h1,h2,h3,h4 { + margin: 10px 0; + font-family: arial sans-serif; + font-weight: bold; + } + + `), + + h('div.markdown', { style: { // whiteSpace: 'pre-line', background: 'rgb(235, 235, 235)', -- cgit v1.2.3 From 6ec387b6751273ad09aed876a03f7ee95dc86c1a Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Thu, 30 Jun 2016 23:50:20 -0700 Subject: Formatted dev mode better --- ui/app/app.js | 5 +++-- ui/app/first-time/disclaimer.js | 5 +++-- ui/app/first-time/disclaimer.txt | 3 --- 3 files changed, 6 insertions(+), 7 deletions(-) delete mode 100644 ui/app/first-time/disclaimer.txt (limited to 'ui') diff --git a/ui/app/app.js b/ui/app/app.js index 938caffd9..f58f695af 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -61,6 +61,7 @@ App.prototype.render = function () { style: { // Windows was showing a vertical scroll bar: overflow: 'hidden', + position: 'relative', }, }, [ @@ -197,7 +198,7 @@ App.prototype.renderNetworkDropdown = function () { this.setState({ isNetworkMenuOpen: !isOpen }) }, style: { - position: 'fixed', + position: 'absolute', left: 0, zIndex: 0, }, @@ -246,7 +247,7 @@ App.prototype.renderDropdown = function () { this.props.dispatch(actions.closeMenu()) }, style: { - position: 'fixed', + position: 'absolute', right: 0, zIndex: 0, }, diff --git a/ui/app/first-time/disclaimer.js b/ui/app/first-time/disclaimer.js index f25bf9245..c6174a220 100644 --- a/ui/app/first-time/disclaimer.js +++ b/ui/app/first-time/disclaimer.js @@ -22,13 +22,14 @@ DisclaimerScreen.prototype.render = function () { return ( h('.flex-column.flex-center.flex-grow', [ - h('h3.flex-center.text-transform-uppercase', { + h('h3.flex-center.text-transform-uppercase.terms-header', { style: { background: '#EBEBEB', color: '#AEAEAE', marginBottom: 24, width: '100%', fontSize: '20px', + textAlign: 'center', padding: 6, }, }, [ @@ -40,7 +41,7 @@ DisclaimerScreen.prototype.render = function () { .markdown { font-family: Times New Roman; } - .markdown h1,h2,h3,h4 { + .markdown h1, .markdown h2, .markdown h3 { margin: 10px 0; font-family: arial sans-serif; font-weight: bold; diff --git a/ui/app/first-time/disclaimer.txt b/ui/app/first-time/disclaimer.txt deleted file mode 100644 index b7c2cf13e..000000000 --- a/ui/app/first-time/disclaimer.txt +++ /dev/null @@ -1,3 +0,0 @@ -Full disclaimer coming soon. In the meanwhile, be aware this is experimental software. We are not responsible for how you use MetaMask, or any funds that you spend or lose with it. The only way to be absolutely sure you will lose no funds on the internet is to put no funds onto the internet. Enjoy! - - -- cgit v1.2.3 From 51a5e66cbbbf35baa62e74e3545cf478cc05241e Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Fri, 1 Jul 2016 10:25:19 -0700 Subject: Move main drop-down state to component state --- ui/app/actions.js | 19 ------------------- ui/app/app.js | 15 +++++++++------ ui/app/reducers/app.js | 10 ---------- 3 files changed, 9 insertions(+), 35 deletions(-) (limited to 'ui') diff --git a/ui/app/actions.js b/ui/app/actions.js index c6b57d29d..3e0fe55c0 100644 --- a/ui/app/actions.js +++ b/ui/app/actions.js @@ -2,10 +2,6 @@ var actions = { GO_HOME: 'GO_HOME', goHome: goHome, // menu state - TOGGLE_MENU: 'TOGGLE_MENU', - toggleMenu: toggleMenu, - SET_MENU_STATE: 'SET_MENU_STATE', - closeMenu: closeMenu, getNetworkStatus: 'getNetworkStatus', // remote state @@ -125,21 +121,6 @@ function goHome () { } } -// menu state - -function toggleMenu () { - return { - type: actions.TOGGLE_MENU, - } -} - -function closeMenu () { - return { - type: actions.SET_MENU_STATE, - value: false, - } -} - // async actions function tryUnlockMetamask (password) { diff --git a/ui/app/app.js b/ui/app/app.js index f58f695af..4652d36ff 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -178,7 +178,7 @@ App.prototype.renderAppBar = function () { onClick: (event) => { event.preventDefault() event.stopPropagation() - this.props.dispatch(actions.toggleMenu()) + this.setState({ isMainMenuOpen: true }) }, }), ]), @@ -241,10 +241,13 @@ App.prototype.renderNetworkDropdown = function () { App.prototype.renderDropdown = function () { const props = this.props + const state = this.state || {} + const isOpen = state.isMainMenuOpen + return h(MenuDroppo, { - isOpen: props.menuOpen, + isOpen: isOpen, onClickOutside: (event) => { - this.props.dispatch(actions.closeMenu()) + this.setState({ isMainMenuOpen: !isOpen }) }, style: { position: 'absolute', @@ -263,21 +266,21 @@ App.prototype.renderDropdown = function () { h(DropMenuItem, { label: 'Settings', - closeMenu: () => this.props.dispatch(actions.closeMenu()), + closeMenu: () => this.setState({ isMainMenuOpen: !isOpen }), action: () => this.props.dispatch(actions.showConfigPage()), icon: h('i.fa.fa-gear.fa-lg', { ariaHidden: true }), }), h(DropMenuItem, { label: 'Lock', - closeMenu: () => this.props.dispatch(actions.closeMenu()), + closeMenu: () => this.setState({ isMainMenuOpen: !isOpen }), action: () => this.props.dispatch(actions.lockMetamask()), icon: h('i.fa.fa-lock.fa-lg', { ariaHidden: true }), }), h(DropMenuItem, { label: 'Help', - closeMenu: () => this.props.dispatch(actions.closeMenu()), + closeMenu: () => this.setState({ isMainMenuOpen: !isOpen }), action: () => this.props.dispatch(actions.showInfoPage()), icon: h('i.fa.fa-question.fa-lg', { ariaHidden: true }), }), diff --git a/ui/app/reducers/app.js b/ui/app/reducers/app.js index f45be0433..06afd0ae1 100644 --- a/ui/app/reducers/app.js +++ b/ui/app/reducers/app.js @@ -43,16 +43,6 @@ function reduceApp (state, action) { switch (action.type) { - case actions.TOGGLE_MENU: - return extend(appState, { - menuOpen: !appState.menuOpen, - }) - - case actions.SET_MENU_STATE: - return extend(appState, { - menuOpen: action.value, - }) - // intialize case actions.SHOW_CREATE_VAULT: -- cgit v1.2.3 From 287222df25caa696583afee27f5aa77dfe0d8895 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Fri, 1 Jul 2016 10:32:54 -0700 Subject: Linted --- ui/app/app.js | 1 - 1 file changed, 1 deletion(-) (limited to 'ui') diff --git a/ui/app/app.js b/ui/app/app.js index 4652d36ff..dcc44ee65 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -240,7 +240,6 @@ App.prototype.renderNetworkDropdown = function () { } App.prototype.renderDropdown = function () { - const props = this.props const state = this.state || {} const isOpen = state.isMainMenuOpen -- cgit v1.2.3