mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Fixes mobile styling.
This commit is contained in:
parent
776e8241f0
commit
f01d119cc1
@ -17,7 +17,7 @@ GasFeeDisplay.prototype.render = function () {
|
|||||||
onClick,
|
onClick,
|
||||||
} = this.props
|
} = this.props
|
||||||
|
|
||||||
return h('div', [
|
return h('div.send-v2__gas-fee-display', [
|
||||||
|
|
||||||
gasTotal
|
gasTotal
|
||||||
? h(CurrencyDisplay, {
|
? h(CurrencyDisplay, {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
.currency-display {
|
.currency-display {
|
||||||
height: 54px;
|
height: 54px;
|
||||||
width: 240px;
|
width: 100%ß;
|
||||||
border: 1px solid $alto;
|
border: 1px solid $alto;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
background-color: $white;
|
background-color: $white;
|
||||||
|
@ -414,7 +414,6 @@
|
|||||||
|
|
||||||
@media screen and (max-width: $break-small) {
|
@media screen and (max-width: $break-small) {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
overflow-y: auto;
|
|
||||||
top: 0;
|
top: 0;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
}
|
}
|
||||||
@ -457,6 +456,10 @@
|
|||||||
left: 199px;
|
left: 199px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
|
|
||||||
|
@media screen and (max-width: $break-small) {
|
||||||
|
top: 36px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&__header {
|
&__header {
|
||||||
@ -467,6 +470,10 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
|
@media screen and (max-width: $break-small) {
|
||||||
|
height: 59px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&__header-tip {
|
&__header-tip {
|
||||||
@ -477,6 +484,10 @@
|
|||||||
transform: rotate(45deg);
|
transform: rotate(45deg);
|
||||||
left: 178px;
|
left: 178px;
|
||||||
top: 65px;
|
top: 65px;
|
||||||
|
|
||||||
|
@media screen and (max-width: $break-small) {
|
||||||
|
top: 46px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&__title {
|
&__title {
|
||||||
@ -509,32 +520,47 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&__form {
|
&__form {
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
margin-top: 13px;
|
margin-top: 13px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
|
@media screen and (max-width: $break-small) {
|
||||||
|
margin-top: 0px;
|
||||||
|
height: 407px;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&__form-header, &__form-header-copy {
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-flow: column;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__form-row {
|
&__form-row {
|
||||||
margin: 14.5px 18px 0px;
|
margin: 14.5px 18px 0px;
|
||||||
display: flex;
|
|
||||||
position: relative;
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
flex-flow: row;
|
||||||
|
flex: 1 0 auto;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&__form-field {
|
||||||
|
flex: 1 1 auto;
|
||||||
|
}
|
||||||
|
|
||||||
&__form-label {
|
&__form-label {
|
||||||
color: $scorpion;
|
color: $scorpion;
|
||||||
font-family: Roboto;
|
font-family: Roboto;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
line-height: 22px;
|
line-height: 22px;
|
||||||
display: flex;
|
width: 88px;
|
||||||
flex-flow: column;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&__from-dropdown {
|
&__from-dropdown {
|
||||||
height: 73px;
|
height: 73px;
|
||||||
width: 240px;
|
width: 100%;
|
||||||
border: 1px solid $alto;
|
border: 1px solid $alto;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
background-color: $white;
|
background-color: $white;
|
||||||
@ -570,7 +596,7 @@
|
|||||||
&__to-autocomplete, &__memo-text-area {
|
&__to-autocomplete, &__memo-text-area {
|
||||||
&__input {
|
&__input {
|
||||||
height: 54px;
|
height: 54px;
|
||||||
width: 240px;
|
width: 100%;
|
||||||
border: 1px solid $alto;
|
border: 1px solid $alto;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
background-color: $white;
|
background-color: $white;
|
||||||
@ -583,6 +609,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&__gas-fee-display {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
&__sliders-icon-container {
|
&__sliders-icon-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@ -616,7 +646,7 @@
|
|||||||
justify-content: space-evenly;
|
justify-content: space-evenly;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
border-top: 1px solid $alto;
|
border-top: 1px solid $alto;
|
||||||
margin-top: 29px;
|
background: $white;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__next-btn,
|
&__next-btn,
|
||||||
|
@ -103,7 +103,7 @@ SendTransactionScreen.prototype.renderCopy = function () {
|
|||||||
|
|
||||||
const tokenText = selectedToken ? 'tokens' : 'ETH'
|
const tokenText = selectedToken ? 'tokens' : 'ETH'
|
||||||
|
|
||||||
return h('div', [
|
return h('div.send-v2__form-header-copy', [
|
||||||
|
|
||||||
h('div.send-v2__copy', `Only send ${tokenText} to an Ethereum address.`),
|
h('div.send-v2__copy', `Only send ${tokenText} to an Ethereum address.`),
|
||||||
|
|
||||||
@ -126,9 +126,6 @@ SendTransactionScreen.prototype.renderHeader = function () {
|
|||||||
|
|
||||||
]),
|
]),
|
||||||
|
|
||||||
this.renderTitle(),
|
|
||||||
|
|
||||||
this.renderCopy(),
|
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -157,15 +154,17 @@ SendTransactionScreen.prototype.renderFromRow = function () {
|
|||||||
|
|
||||||
h('div.send-v2__form-label', 'From:'),
|
h('div.send-v2__form-label', 'From:'),
|
||||||
|
|
||||||
h(FromDropdown, {
|
h('div.send-v2__form-field', [
|
||||||
dropdownOpen,
|
h(FromDropdown, {
|
||||||
accounts: fromAccounts,
|
dropdownOpen,
|
||||||
selectedAccount: from,
|
accounts: fromAccounts,
|
||||||
onSelect: updateSendFrom,
|
selectedAccount: from,
|
||||||
openDropdown: () => this.setState({ dropdownOpen: true }),
|
onSelect: updateSendFrom,
|
||||||
closeDropdown: () => this.setState({ dropdownOpen: false }),
|
openDropdown: () => this.setState({ dropdownOpen: true }),
|
||||||
conversionRate,
|
closeDropdown: () => this.setState({ dropdownOpen: false }),
|
||||||
}),
|
conversionRate,
|
||||||
|
}),
|
||||||
|
]),
|
||||||
|
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
@ -199,12 +198,14 @@ SendTransactionScreen.prototype.renderToRow = function () {
|
|||||||
|
|
||||||
]),
|
]),
|
||||||
|
|
||||||
h(ToAutoComplete, {
|
h('div.send-v2__form-field', [
|
||||||
to,
|
h(ToAutoComplete, {
|
||||||
accounts: toAccounts,
|
to,
|
||||||
onChange: this.handleToChange,
|
accounts: toAccounts,
|
||||||
inError: Boolean(errors.to),
|
onChange: this.handleToChange,
|
||||||
}),
|
inError: Boolean(errors.to),
|
||||||
|
}),
|
||||||
|
]),
|
||||||
|
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
@ -245,7 +246,7 @@ SendTransactionScreen.prototype.validateAmount = function (value) {
|
|||||||
conversionRate: amountConversionRate,
|
conversionRate: amountConversionRate,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
console.log(`sufficientBalance`, sufficientBalance);
|
|
||||||
const amountLessThanZero = conversionGreaterThan(
|
const amountLessThanZero = conversionGreaterThan(
|
||||||
{ value: 0, fromNumericBase: 'dec' },
|
{ value: 0, fromNumericBase: 'dec' },
|
||||||
{ value: amount, fromNumericBase: 'hex' },
|
{ value: amount, fromNumericBase: 'hex' },
|
||||||
@ -277,16 +278,18 @@ SendTransactionScreen.prototype.renderAmountRow = function () {
|
|||||||
this.renderErrorMessage('amount'),
|
this.renderErrorMessage('amount'),
|
||||||
]),
|
]),
|
||||||
|
|
||||||
h(CurrencyDisplay, {
|
h('div.send-v2__form-field', [
|
||||||
inError: Boolean(errors.amount),
|
h(CurrencyDisplay, {
|
||||||
primaryCurrency,
|
inError: Boolean(errors.amount),
|
||||||
convertedCurrency: 'USD',
|
primaryCurrency,
|
||||||
value: amount,
|
convertedCurrency: 'USD',
|
||||||
conversionRate: amountConversionRate,
|
value: amount,
|
||||||
convertedPrefix: '$',
|
conversionRate: amountConversionRate,
|
||||||
handleChange: this.handleAmountChange,
|
convertedPrefix: '$',
|
||||||
validate: this.validateAmount,
|
handleChange: this.handleAmountChange,
|
||||||
}),
|
validate: this.validateAmount,
|
||||||
|
}),
|
||||||
|
]),
|
||||||
|
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
@ -302,17 +305,21 @@ SendTransactionScreen.prototype.renderGasRow = function () {
|
|||||||
|
|
||||||
h('div.send-v2__form-label', 'Gas fee:'),
|
h('div.send-v2__form-label', 'Gas fee:'),
|
||||||
|
|
||||||
h(GasFeeDisplay, {
|
h('div.send-v2__form-field', [
|
||||||
gasTotal,
|
|
||||||
conversionRate,
|
|
||||||
onClick: showCustomizeGasModal,
|
|
||||||
}),
|
|
||||||
|
|
||||||
h('div.send-v2__sliders-icon-container', {
|
h(GasFeeDisplay, {
|
||||||
onClick: showCustomizeGasModal,
|
gasTotal,
|
||||||
}, [
|
conversionRate,
|
||||||
h('i.fa.fa-sliders.send-v2__sliders-icon'),
|
onClick: showCustomizeGasModal,
|
||||||
])
|
}),
|
||||||
|
|
||||||
|
h('div.send-v2__sliders-icon-container', {
|
||||||
|
onClick: showCustomizeGasModal,
|
||||||
|
}, [
|
||||||
|
h('i.fa.fa-sliders.send-v2__sliders-icon'),
|
||||||
|
]),
|
||||||
|
|
||||||
|
]),
|
||||||
|
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
@ -325,10 +332,12 @@ SendTransactionScreen.prototype.renderMemoRow = function () {
|
|||||||
|
|
||||||
h('div.send-v2__form-label', 'Transaction Memo:'),
|
h('div.send-v2__form-label', 'Transaction Memo:'),
|
||||||
|
|
||||||
h(MemoTextArea, {
|
h('div.send-v2__form-field', [
|
||||||
memo,
|
h(MemoTextArea, {
|
||||||
onChange: (event) => updateSendMemo(event.target.value),
|
memo,
|
||||||
}),
|
onChange: (event) => updateSendMemo(event.target.value),
|
||||||
|
})
|
||||||
|
]),
|
||||||
|
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
@ -336,6 +345,14 @@ SendTransactionScreen.prototype.renderMemoRow = function () {
|
|||||||
SendTransactionScreen.prototype.renderForm = function () {
|
SendTransactionScreen.prototype.renderForm = function () {
|
||||||
return h('div.send-v2__form', {}, [
|
return h('div.send-v2__form', {}, [
|
||||||
|
|
||||||
|
h('div.sendV2__form-header', [
|
||||||
|
|
||||||
|
this.renderTitle(),
|
||||||
|
|
||||||
|
this.renderCopy(),
|
||||||
|
|
||||||
|
]),
|
||||||
|
|
||||||
this.renderFromRow(),
|
this.renderFromRow(),
|
||||||
|
|
||||||
this.renderToRow(),
|
this.renderToRow(),
|
||||||
|
Loading…
Reference in New Issue
Block a user