mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
last css fixes
This commit is contained in:
parent
76981c2ad9
commit
df19163bf9
@ -420,6 +420,9 @@
|
|||||||
"hardware": {
|
"hardware": {
|
||||||
"message": "hardware"
|
"message": "hardware"
|
||||||
},
|
},
|
||||||
|
"hardwareWalletConnected": {
|
||||||
|
"message": "Hardware wallet connected"
|
||||||
|
},
|
||||||
"hardwareSupport": {
|
"hardwareSupport": {
|
||||||
"message": "Hardware Support"
|
"message": "Hardware Support"
|
||||||
},
|
},
|
||||||
|
@ -59,7 +59,7 @@ class AccountList extends Component {
|
|||||||
renderPagination () {
|
renderPagination () {
|
||||||
return h('div.hw-list-pagination', [
|
return h('div.hw-list-pagination', [
|
||||||
h(
|
h(
|
||||||
'button.btn-primary.hw-list-pagination__button',
|
'button.hw-list-pagination__button',
|
||||||
{
|
{
|
||||||
onClick: () => this.props.getPage(-1),
|
onClick: () => this.props.getPage(-1),
|
||||||
},
|
},
|
||||||
@ -67,7 +67,7 @@ class AccountList extends Component {
|
|||||||
),
|
),
|
||||||
|
|
||||||
h(
|
h(
|
||||||
'button.btn-primary.hw-list-pagination__button',
|
'button.hw-list-pagination__button',
|
||||||
{
|
{
|
||||||
onClick: () => this.props.getPage(1),
|
onClick: () => this.props.getPage(1),
|
||||||
},
|
},
|
||||||
@ -93,7 +93,7 @@ class AccountList extends Component {
|
|||||||
),
|
),
|
||||||
|
|
||||||
h(
|
h(
|
||||||
`button.btn-primary.btn--large.new-account-connect-form__button ${disabled ? '.btn-primary--disabled' : ''}`,
|
`button.btn-primary.btn--large.new-account-connect-form__button.unlock ${disabled ? '.btn-primary--disabled' : ''}`,
|
||||||
{
|
{
|
||||||
onClick: this.props.onUnlockAccount.bind(this),
|
onClick: this.props.onUnlockAccount.bind(this),
|
||||||
...buttonProps,
|
...buttonProps,
|
||||||
@ -112,7 +112,7 @@ class AccountList extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render () {
|
render () {
|
||||||
return h('div.new-account-connect-form', {}, [
|
return h('div.new-account-connect-form.account-list', {}, [
|
||||||
this.renderHeader(),
|
this.renderHeader(),
|
||||||
this.renderAccounts(),
|
this.renderAccounts(),
|
||||||
this.renderPagination(),
|
this.renderPagination(),
|
||||||
|
@ -51,11 +51,26 @@ class ConnectHardwareForm extends Component {
|
|||||||
this.setState({selectedAccount: account.toString(), error: null})
|
this.setState({selectedAccount: account.toString(), error: null})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
showTemporaryAlert () {
|
||||||
|
this.props.showAlert(this.context.t('hardwareWalletConnected'))
|
||||||
|
// Autohide the alert after 5 seconds
|
||||||
|
setTimeout(_ => {
|
||||||
|
this.props.hideAlert()
|
||||||
|
}, 5000)
|
||||||
|
}
|
||||||
|
|
||||||
getPage = (page) => {
|
getPage = (page) => {
|
||||||
this.props
|
this.props
|
||||||
.connectHardware('trezor', page)
|
.connectHardware('trezor', page)
|
||||||
.then(accounts => {
|
.then(accounts => {
|
||||||
if (accounts.length) {
|
if (accounts.length) {
|
||||||
|
|
||||||
|
// If we just loaded the accounts for the first time
|
||||||
|
// show the global alert
|
||||||
|
if (this.state.accounts.length === 0) {
|
||||||
|
this.showTemporaryAlert()
|
||||||
|
}
|
||||||
|
|
||||||
const newState = {}
|
const newState = {}
|
||||||
// Default to the first account
|
// Default to the first account
|
||||||
if (this.state.selectedAccount === null) {
|
if (this.state.selectedAccount === null) {
|
||||||
@ -164,6 +179,8 @@ ConnectHardwareForm.propTypes = {
|
|||||||
connectHardware: PropTypes.func,
|
connectHardware: PropTypes.func,
|
||||||
checkHardwareStatus: PropTypes.func,
|
checkHardwareStatus: PropTypes.func,
|
||||||
forgetDevice: PropTypes.func,
|
forgetDevice: PropTypes.func,
|
||||||
|
showAlert: PropTypes.func,
|
||||||
|
hideAlert: PropTypes.func,
|
||||||
unlockTrezorAccount: PropTypes.func,
|
unlockTrezorAccount: PropTypes.func,
|
||||||
numberOfExistingAccounts: PropTypes.number,
|
numberOfExistingAccounts: PropTypes.number,
|
||||||
history: PropTypes.object,
|
history: PropTypes.object,
|
||||||
@ -203,6 +220,8 @@ const mapDispatchToProps = dispatch => {
|
|||||||
},
|
},
|
||||||
showImportPage: () => dispatch(actions.showImportPage()),
|
showImportPage: () => dispatch(actions.showImportPage()),
|
||||||
showConnectPage: () => dispatch(actions.showConnectPage()),
|
showConnectPage: () => dispatch(actions.showConnectPage()),
|
||||||
|
showAlert: (msg) => dispatch(actions.showAlert(msg)),
|
||||||
|
hideAlert: () => dispatch(actions.hideAlert()),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -299,7 +299,8 @@
|
|||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 10px;
|
padding-left: 10px;
|
||||||
|
padding-right: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__item:nth-of-type(even) {
|
&__item:nth-of-type(even) {
|
||||||
@ -324,14 +325,17 @@
|
|||||||
flex: 1;
|
flex: 1;
|
||||||
|
|
||||||
input {
|
input {
|
||||||
margin-right: 9px;
|
padding: 10px;
|
||||||
|
margin-top: 13px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&__item__label {
|
&__item__label {
|
||||||
margin-left: 10px;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
padding-left: 10px;
|
||||||
|
padding-top: 10px;
|
||||||
|
padding-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__item__balance {
|
&__item__balance {
|
||||||
@ -342,7 +346,7 @@
|
|||||||
|
|
||||||
&__item__link {
|
&__item__link {
|
||||||
display: flex;
|
display: flex;
|
||||||
margin-top: 3px;
|
margin-top: 13px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__item__link img {
|
&__item__link img {
|
||||||
@ -359,7 +363,6 @@
|
|||||||
&__button {
|
&__button {
|
||||||
height: 19px;
|
height: 19px;
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 47px;
|
|
||||||
color: #33a4e7;
|
color: #33a4e7;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
line-height: 19px;
|
line-height: 19px;
|
||||||
@ -368,6 +371,8 @@
|
|||||||
margin-right: 0px;
|
margin-right: 0px;
|
||||||
margin-left: 16px;
|
margin-left: 16px;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
|
text-transform: uppercase;
|
||||||
|
font-family: Roboto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -383,6 +388,10 @@
|
|||||||
height: 210px;
|
height: 210px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.account-list {
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
|
||||||
&__buttons {
|
&__buttons {
|
||||||
margin-top: 39px;
|
margin-top: 39px;
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -405,6 +414,10 @@
|
|||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&__button.unlock {
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
&__button.btn-primary--disabled {
|
&__button.btn-primary--disabled {
|
||||||
cursor: not-allowed;
|
cursor: not-allowed;
|
||||||
opacity: .5;
|
opacity: .5;
|
||||||
@ -415,7 +428,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-flow: column;
|
flex-flow: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 30px 30px 0;
|
padding: 22px;
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: #2f9ae0;
|
color: #2f9ae0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user