mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Merge branch 'master' into i18n
This commit is contained in:
commit
829b0a8926
@ -83,7 +83,7 @@ DepositEtherModal.prototype.renderRow = function ({
|
||||
|
||||
]),
|
||||
|
||||
h('div.deposit-ether-modal__buy-row__logo', [logo]),
|
||||
h('div.deposit-ether-modal__buy-row__logo-container', [logo]),
|
||||
|
||||
h('div.deposit-ether-modal__buy-row__description', [
|
||||
|
||||
@ -109,17 +109,17 @@ DepositEtherModal.prototype.render = function () {
|
||||
const isTestNetwork = ['3', '4', '42'].find(n => n === network)
|
||||
const networkName = networkNames[network]
|
||||
|
||||
return h('div.deposit-ether-modal', {}, [
|
||||
return h('div.page-container.page-container--full-width', {}, [
|
||||
|
||||
h('div.deposit-ether-modal__header', [
|
||||
h('div.page-container__header', [
|
||||
|
||||
h('div.deposit-ether-modal__header__title', [t('depositEther')]),
|
||||
h('div.page-container__title', [t('depositEther')]),
|
||||
|
||||
h('div.deposit-ether-modal__header__description', [
|
||||
h'div.page-container__subtitle', [
|
||||
t('needEtherInWallet'),
|
||||
]),
|
||||
|
||||
h('div.deposit-ether-modal__header__close', {
|
||||
h('div.page-container__header-close', {
|
||||
onClick: () => {
|
||||
this.setState({ buyingWithShapeshift: false })
|
||||
this.props.hideWarning()
|
||||
@ -128,55 +128,64 @@ DepositEtherModal.prototype.render = function () {
|
||||
}),
|
||||
|
||||
]),
|
||||
|
||||
h('.page-container__content', {}, [
|
||||
|
||||
h('div.deposit-ether-modal__buy-rows', [
|
||||
|
||||
h('div.deposit-ether-modal__buy-rows', [
|
||||
|
||||
this.renderRow({
|
||||
logo: h('img.deposit-ether-modal__buy-row__eth-logo', { src: '../../../images/eth_logo.svg' }),
|
||||
title: DIRECT_DEPOSIT_ROW_TITLE,
|
||||
text: DIRECT_DEPOSIT_ROW_TEXT,
|
||||
buttonLabel: t('viewAccount'),
|
||||
onButtonClick: () => this.goToAccountDetailsModal(),
|
||||
hide: buyingWithShapeshift,
|
||||
}),
|
||||
|
||||
this.renderRow({
|
||||
logo: h('i.fa.fa-tint.fa-2x'),
|
||||
title: FAUCET_ROW_TITLE,
|
||||
text: facuetRowText(networkName),
|
||||
buttonLabel: t('getEther'),
|
||||
onButtonClick: () => toFaucet(network),
|
||||
hide: !isTestNetwork || buyingWithShapeshift,
|
||||
}),
|
||||
|
||||
this.renderRow({
|
||||
logo: h('img.deposit-ether-modal__buy-row__coinbase-logo', {
|
||||
src: '../../../images/coinbase logo.png',
|
||||
this.renderRow({
|
||||
logo: h('img.deposit-ether-modal__buy-row__eth-logo', { src: '../../../images/eth_logo.svg' }),
|
||||
title: DIRECT_DEPOSIT_ROW_TITLE,
|
||||
text: DIRECT_DEPOSIT_ROW_TEXT,
|
||||
buttonLabel: t('viewAccount'),
|
||||
onButtonClick: () => this.goToAccountDetailsModal(),
|
||||
hide: buyingWithShapeshift,
|
||||
}),
|
||||
title: COINBASE_ROW_TITLE,
|
||||
text: COINBASE_ROW_TEXT,
|
||||
buttonLabel: t('continueToCoinbase'),
|
||||
onButtonClick: () => toCoinbase(address),
|
||||
hide: isTestNetwork || buyingWithShapeshift,
|
||||
}),
|
||||
|
||||
this.renderRow({
|
||||
logo: h('img.deposit-ether-modal__buy-row__shapeshift-logo', {
|
||||
src: '../../../images/shapeshift logo.png',
|
||||
this.renderRow({
|
||||
logo: h('i.fa.fa-tint.fa-2x'),
|
||||
title: FAUCET_ROW_TITLE,
|
||||
text: facuetRowText(networkName),
|
||||
buttonLabel: t('getEther'),
|
||||
onButtonClick: () => toFaucet(network),
|
||||
hide: !isTestNetwork || buyingWithShapeshift,
|
||||
}),
|
||||
title: SHAPESHIFT_ROW_TITLE,
|
||||
text: SHAPESHIFT_ROW_TEXT,
|
||||
buttonLabel: t('shapeshiftBuy'),
|
||||
onButtonClick: () => this.setState({ buyingWithShapeshift: true }),
|
||||
hide: isTestNetwork,
|
||||
hideButton: buyingWithShapeshift,
|
||||
hideTitle: buyingWithShapeshift,
|
||||
onBackClick: () => this.setState({ buyingWithShapeshift: false }),
|
||||
showBackButton: this.state.buyingWithShapeshift,
|
||||
className: buyingWithShapeshift && 'deposit-ether-modal__buy-row__shapeshift-buy',
|
||||
}),
|
||||
|
||||
buyingWithShapeshift && h(ShapeshiftForm),
|
||||
this.renderRow({
|
||||
logo: h('div.deposit-ether-modal__logo', {
|
||||
style: {
|
||||
backgroundImage: 'url(\'../../../images/coinbase logo.png\')',
|
||||
height: '40px',
|
||||
},
|
||||
}),
|
||||
title: COINBASE_ROW_TITLE,
|
||||
text: COINBASE_ROW_TEXT,
|
||||
buttonLabel: t('continueToCoinbase'),
|
||||
onButtonClick: () => toCoinbase(address),
|
||||
hide: isTestNetwork || buyingWithShapeshift,
|
||||
}),
|
||||
|
||||
this.renderRow({
|
||||
logo: h('div.deposit-ether-modal__logo', {
|
||||
style: {
|
||||
backgroundImage: 'url(\'../../../images/shapeshift logo.png\')',
|
||||
},
|
||||
}),
|
||||
title: SHAPESHIFT_ROW_TITLE,
|
||||
text: SHAPESHIFT_ROW_TEXT,
|
||||
buttonLabel: t('shapeshiftBuy'),
|
||||
onButtonClick: () => this.setState({ buyingWithShapeshift: true }),
|
||||
hide: isTestNetwork,
|
||||
hideButton: buyingWithShapeshift,
|
||||
hideTitle: buyingWithShapeshift,
|
||||
onBackClick: () => this.setState({ buyingWithShapeshift: false }),
|
||||
showBackButton: this.state.buyingWithShapeshift,
|
||||
className: buyingWithShapeshift && 'deposit-ether-modal__buy-row__shapeshift-buy',
|
||||
}),
|
||||
|
||||
buyingWithShapeshift && h(ShapeshiftForm),
|
||||
|
||||
]),
|
||||
|
||||
]),
|
||||
])
|
||||
|
@ -93,18 +93,20 @@ const MODALS = {
|
||||
display: 'flex',
|
||||
},
|
||||
laptopModalStyle: {
|
||||
width: '900px',
|
||||
maxWidth: '900px',
|
||||
width: '850px',
|
||||
top: 'calc(10% + 10px)',
|
||||
left: '0',
|
||||
right: '0',
|
||||
margin: '0 auto',
|
||||
boxShadow: '0 0 6px 0 rgba(0,0,0,0.3)',
|
||||
borderRadius: '8px',
|
||||
borderRadius: '7px',
|
||||
transform: 'none',
|
||||
height: 'calc(80% - 20px)',
|
||||
overflowY: 'hidden',
|
||||
},
|
||||
contentStyle: {
|
||||
borderRadius: '8px',
|
||||
borderRadius: '7px',
|
||||
height: '100%',
|
||||
},
|
||||
},
|
||||
|
||||
|
@ -641,32 +641,40 @@
|
||||
|
||||
&__buy-rows {
|
||||
width: 100%;
|
||||
padding: 33px;
|
||||
padding-top: 0px;
|
||||
padding: 0 30px;
|
||||
display: flex;
|
||||
flex-flow: column nowrap;
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
|
||||
@media screen and (max-width: 575px) {
|
||||
height: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&__logo {
|
||||
height: 60px;
|
||||
background-repeat: no-repeat;
|
||||
background-size: contain;
|
||||
background-position: center;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
&__buy-row {
|
||||
border-bottom: 1px solid $alto;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
flex: 1;
|
||||
padding-bottom: 25px;
|
||||
padding-top: 25px;
|
||||
flex: 1 0 auto;
|
||||
padding: 30px 0 20px;
|
||||
min-height: 170px;
|
||||
|
||||
@media screen and (max-width: 575px) {
|
||||
min-height: 360px;
|
||||
min-height: 270px;
|
||||
flex-flow: column;
|
||||
justify-content: center;
|
||||
padding-top: 45px;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
&__back {
|
||||
@ -692,30 +700,35 @@
|
||||
}
|
||||
}
|
||||
|
||||
&__logo {
|
||||
&__logo-container {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex: 0.3 1 auto;
|
||||
flex: 0 0 auto;
|
||||
padding: 0 20px;
|
||||
|
||||
@media screen and (min-width: 575px) {
|
||||
min-width: 215px;
|
||||
@media screen and (min-width: 576px) {
|
||||
width: 12rem;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 575px) {
|
||||
width: 100%;
|
||||
max-height: 6rem;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
&__coinbase-logo {
|
||||
height: 40px;
|
||||
width: 180px;
|
||||
}
|
||||
|
||||
&__shapeshift-logo {
|
||||
height: 60px;
|
||||
width: 174px;
|
||||
}
|
||||
|
||||
&__eth-logo {
|
||||
border-radius: 50%;
|
||||
width: 68px;
|
||||
height: 68px;
|
||||
width: 68px;
|
||||
border: 3px solid $tundora;
|
||||
z-index: 25;
|
||||
padding: 4px;
|
||||
@ -728,10 +741,11 @@
|
||||
|
||||
&__description {
|
||||
color: $cape-cod;
|
||||
flex: 0.5 1 auto;
|
||||
padding-bottom: 20px;
|
||||
align-self: flex-start;
|
||||
|
||||
@media screen and (min-width: 575px) {
|
||||
min-width: 315px;
|
||||
width: 15rem;
|
||||
}
|
||||
|
||||
&__title {
|
||||
|
@ -161,15 +161,14 @@
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
align-items: center;
|
||||
padding: 30px 30px 0;
|
||||
|
||||
&__input-label {
|
||||
color: $scorpion;
|
||||
font-family: Roboto;
|
||||
font-size: 16px;
|
||||
line-height: 21px;
|
||||
margin-top: 29px;
|
||||
align-self: flex-start;
|
||||
margin-left: 30px;
|
||||
}
|
||||
|
||||
&__input {
|
||||
|
@ -81,25 +81,30 @@ input.large-input {
|
||||
z-index: 25;
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
border-radius: 7px;
|
||||
height: 100%;
|
||||
|
||||
&__header {
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
border-bottom: 1px solid $geyser;
|
||||
padding: 1.15rem 0.95rem;
|
||||
padding: 20px;
|
||||
flex: 0 0 auto;
|
||||
background: $alabaster;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
&__header-close::after {
|
||||
content: '\00D7';
|
||||
font-size: 40px;
|
||||
&__header-close {
|
||||
color: $tundora;
|
||||
position: absolute;
|
||||
top: 21.5px;
|
||||
right: 28.5px;
|
||||
top: 20px;
|
||||
right: 20px;
|
||||
cursor: pointer;
|
||||
overflow: hidden;
|
||||
|
||||
&::after {
|
||||
content: '\00D7';
|
||||
font-size: 40px;
|
||||
}
|
||||
}
|
||||
|
||||
&__footer {
|
||||
@ -118,7 +123,7 @@ input.large-input {
|
||||
|
||||
&__footer-button {
|
||||
width: 165px;
|
||||
height: 60px;
|
||||
height: 55px;
|
||||
font-size: 1rem;
|
||||
text-transform: uppercase;
|
||||
margin-right: 1rem;
|
||||
@ -134,7 +139,7 @@ input.large-input {
|
||||
font-family: Roboto;
|
||||
font-size: 2rem;
|
||||
font-weight: 500;
|
||||
line-height: initial;
|
||||
line-height: 2rem;
|
||||
}
|
||||
|
||||
&__subtitle {
|
||||
@ -178,6 +183,15 @@ input.large-input {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&--full-width {
|
||||
width: initial;
|
||||
}
|
||||
|
||||
&__content {
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 250px) {
|
||||
@ -204,5 +218,6 @@ input.large-input {
|
||||
width: 100%;
|
||||
overflow-y: auto;
|
||||
background-color: $white;
|
||||
border-radius: 0;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user