Buy page customization for tests networks, header for Mainnet, header customization for all white pages

This commit is contained in:
Victor Baranov 2018-08-08 13:33:56 +03:00
parent 1cab8c0d2c
commit fcd890ef01
15 changed files with 58 additions and 75 deletions

View File

@ -1 +1,3 @@
<svg height="21" viewBox="0 0 25 21" width="25" xmlns="http://www.w3.org/2000/svg"><path d="m13.2809946.46746227c-.633283.62445421-.633283 1.63539927 0 2.25825641l5.8242608 5.74306227h-16.48641542c-.89404669 0-1.6196498.71548718-1.6196498 1.59706955v.0015971c0 .8815824.72560311 1.5954725 1.6196498 1.5954725h16.48641542l-5.8242608 5.7446594c-.633283.6228571-.633283 1.6338022 0 2.2582564.6316635.6228571 1.6569018.6228571 2.2901849 0l9.7340953-9.5999854-9.7340953-9.59838823c-.6332831-.62285714-1.6585214-.62285714-2.2901849 0" fill="#5b5b5b" fill-rule="evenodd" transform="translate(-1)"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14">
<path fill="#6729A8" fill-rule="evenodd" d="M13.926 7.366a.855.855 0 0 1-.21.378l-5.972 5.972c-.367.366-.99.337-1.394-.066-.403-.404-.432-1.027-.066-1.394L10.54 8H1a1 1 0 0 1 0-2h9.54L6.284 1.744c-.366-.367-.337-.99.066-1.394.404-.403 1.027-.432 1.394-.066l5.972 5.972c.107.107.17.239.21.378A.992.992 0 0 1 14 7c0 .13-.029.252-.074.366z"/>
</svg>

Before

Width:  |  Height:  |  Size: 597 B

After

Width:  |  Height:  |  Size: 415 B

View File

@ -60,7 +60,11 @@ AccountImportSubview.prototype.render = function () {
left: '30px',
},
}),
h('h2.page-subtitle', 'Import Accounts'),
h('h2.page-subtitle', {
style: {
fontFamily: 'Nunito SemiBold',
},
}, 'Import Accounts'),
]),
h('.error', {
style: {

View File

@ -114,6 +114,7 @@ ExportAccountView.prototype.render = function () {
h('label', {
style: {
textAlign: 'center',
fontFamily: 'Nunito Semibold',
},
}, 'Your private key'),
h('div.flex-row', [

View File

@ -119,9 +119,9 @@ BuyButtonSubview.prototype.headerSubview = function () {
width: '100%',
background: '#ffffff',
color: '#333333',
paddingBottom: '4px',
paddingLeft: '30px',
justifyContent: 'left',
fontFamily: 'Nunito Semibold',
},
}, 'Select Service'),
]),
@ -154,49 +154,44 @@ BuyButtonSubview.prototype.primarySubview = function () {
return (
h('div.flex-column', {
style: {
alignItems: 'center',
margin: '20px 50px',
margin: '20px 30px',
},
}, [
network !== '99' ? h('button', {
network !== '99' ? h('p.cursor-pointer', {
style: {marginBottom: '10px'},
onClick: () => this.props.dispatch(actions.buyEth({ network })),
style: {
marginTop: '15px',
},
}, label) : null,
network === '99' ? h('button', {
},
[h('span', {style: {marginRight: '10px', color: '#6729a8'}}, label), h('i.arrow-right')]) : null,
network === '99' ? h('p.cursor-pointer', {
style: {marginBottom: '10px'},
onClick: () => this.props.dispatch(actions.buyEth({ network, exchange: 'binance' })),
style: {
marginTop: '15px',
},
}, 'Binance') : null,
network === '99' ? h('button', {
}, [h('span', {style: {marginRight: '10px', color: '#6729a8'}}, 'Binance'), h('i.arrow-right')]) : null,
network === '99' ? h('p.cursor-pointer', {
style: {marginBottom: '10px'},
onClick: () => this.props.dispatch(actions.buyEth({ network, exchange: 'bibox' })),
style: {
marginTop: '15px',
},
}, 'BiBox') : null,
network === '99' ? h('button', {
}, [h('span', {style: {marginRight: '10px', color: '#6729a8'}}, 'BiBox'), h('i.arrow-right')]) : null,
network === '99' ? h('p.cursor-pointer', {
style: {marginBottom: '10px'},
onClick: () => this.props.dispatch(actions.buyEth({ network, exchange: 'cex.plus' })),
style: {
marginTop: '15px',
},
}, 'CEX Plus') : null,
}, [h('span', {style: {marginRight: '10px', color: '#6729a8'}}, 'CEX Plus'), h('i.arrow-right')]) : null,
// Kovan only: Dharma loans beta
network === '42' ? (
h('button', {
h('p.cursor-pointer', {
style: {marginBottom: '10px'},
onClick: () => this.navigateTo('https://borrow.dharma.io/'),
style: {
marginTop: '15px',
},
}, 'Borrow With Dharma (Beta)')
}, [h('span', {style: {marginRight: '10px', color: '#6729a8'}}, 'Borrow With Dharma (Beta)'), h('i.arrow-right')])
) : null,
])
)
default:
return (
h('h2.error', 'Unknown network ID')
h('div', {
style: {
padding: '20px 30px',
}},
h('h2.error', 'Unknown network ID')
)
)
}
@ -233,13 +228,12 @@ BuyButtonSubview.prototype.mainnetSubview = function () {
h('h3', {
style: {
paddingLeft: '15px',
fontFamily: 'Nunito Light',
width: '100vw',
background: '#6729a8',
color: '#ffffff',
paddingTop: '4px',
paddingBottom: '4px',
padding: '20px 30px',
fontFamily: 'Nunito Semibold',
color: '#333333',
paddingTop: '20px',
paddingBottom: '20px',
borderTop: '1px solid #e2e2e2',
},
}, props.buyView.subview),

View File

@ -47,7 +47,7 @@ RadioList.prototype.render = function () {
if (props.subtext) {
return h('.flex-row', {}, [
h('.radio-titles.font-pre-medium', label),
h('.radio-titles-subtext', `- ${props.subtext[label]}`),
h('.radio-titles-subtext.font-pre-medium', ` - ${props.subtext[label]}`),
])
} else {
return h('.radio-titles.font-pre-medium', label)

View File

@ -40,15 +40,6 @@ PendingMsg.prototype.render = function () {
dangerous side effects. Only sign messages from
sites you fully trust with your entire account.
This dangerous method will be removed in a future version. `,
h('a', {
href: 'https://medium.com/metamask/the-new-secure-way-to-sign-data-in-your-browser-6af9dd2a1527',
style: { color: 'rgb(247, 134, 28)' },
onClick: (event) => {
event.preventDefault()
const url = 'https://medium.com/metamask/the-new-secure-way-to-sign-data-in-your-browser-6af9dd2a1527'
global.platform.openWindow({ url })
},
}, 'Read more here.'),
]),
// message details

View File

@ -40,13 +40,7 @@ QrCodeView.prototype.render = function () {
},
}, [
this.props.warning ? this.props.warning && h('span.error.flex-center', {
style: {
textAlign: 'center',
width: '229px',
height: '82px',
},
},
this.props.warning ? this.props.warning && h('span.error.flex-center',
this.props.warning) : null,
h('#qr-container.flex-column', {

View File

@ -30,13 +30,13 @@ TokenList.prototype.render = function () {
log.error(error)
return h('.hotFix', {
style: {
padding: '80px',
padding: '30px',
},
}, [
'We had trouble loading your token balances. You can view them ',
h('span.hotFix', {
style: {
color: 'rgba(247, 134, 28, 1)',
color: '#8fdc97',
cursor: 'pointer',
},
onClick: () => {

View File

@ -50,7 +50,7 @@ ConfigScreen.prototype.render = function () {
left: '30px',
},
}),
h('h2.page-subtitle', 'Settings'),
h('h2', 'Settings'),
]),
h('div', {

View File

@ -138,16 +138,6 @@ app
color: #909090;
}
button.primary {
padding: 8px 12px;
background: #F7861C;
box-shadow: 0px 3px 6px rgba(247, 134, 28, 0.36);
color: white;
font-size: 1.1em;
font-family: 'Nunito Regular';
text-transform: none;
}
button.btn-thin {
border: 1px solid;
border-color: #4D4D4D;
@ -322,6 +312,12 @@ app sections
height: 14px;
}
.arrow-right {
content: url('../images/arrow-right.svg');
width: 14px;
height: 14px;
}
.fa-clipboard {
content: url('../images/copy.svg');
width: 14px;
@ -384,6 +380,7 @@ app sections
.section-title {
border-top: 1px solid #e2e2e2;
height: 80px;
font-family: 'Nunito Semibold';
}
.trash {
@ -716,7 +713,8 @@ input.large-input {
}
.radio-titles-subtext {
color: #777777;
font-family: 'Nunito SemiBold';
}
.selected-exchange {

View File

@ -37,7 +37,7 @@ InfoScreen.prototype.render = function () {
left: '30px',
},
}),
h('h2.page-subtitle', 'Info'),
h('h2', 'Info'),
]),
// main view

View File

@ -38,7 +38,6 @@ CreateVaultCompleteScreen.prototype.render = function () {
color: '#333333',
marginBottom: 8,
width: '100%',
fontSize: '20px',
padding: '30px 6px 6px 6px',
},
}, [

View File

@ -44,10 +44,9 @@ RestoreVaultScreen.prototype.render = function () {
fontFamily: 'Nunito SemiBold',
background: '#ffffff',
color: '#333333',
marginBottom: 24,
width: '100%',
fontSize: '16px',
padding: 6,
padding: 30,
},
}, [
h('.page-subtitle', 'Restore Vault'),
@ -58,6 +57,7 @@ RestoreVaultScreen.prototype.render = function () {
style: {
width: '100%',
marginBottom: '20px',
fontFamily: 'Nunito SemiBold',
},
}, 'Wallet Seed'),
h('textarea.twelve-word-phrase', {

View File

@ -29,7 +29,7 @@ AppSettingsPage.prototype.render = function () {
left: '30px',
},
}),
h('h2.page-subtitle', 'Settings'),
h('h2', 'Settings'),
]),
h('label', {

View File

@ -366,7 +366,7 @@ describe('Metamask popup page', function () {
it('add custom rpc', async function () {
const customUrl = 'http://test.com'
const input = await driver.findElement(By.id('new_rpc'))
const input = await driver.findElement(By.css('#new_rpc'))
input.sendKeys(customUrl)
await driver.findElement(By.css('#app-content > div > div.app-primary.from-right > div > div.flex-column.flex-justify-center.flex-grow.select-none > div > div:nth-child(2) > button')).click()
if (process.env.SELENIUM_BROWSER === 'firefox') {