mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
commit
3559d86681
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
## Current Master
|
## Current Master
|
||||||
|
|
||||||
|
- Implement new account design.
|
||||||
- Added a network indicator mark in dropdown menu
|
- Added a network indicator mark in dropdown menu
|
||||||
- Added network name next to network indicator
|
- Added network name next to network indicator
|
||||||
- Add copy transaction hash button to completed transaction list items.
|
- Add copy transaction hash button to completed transaction list items.
|
||||||
|
@ -44,116 +44,138 @@ AccountDetailScreen.prototype.render = function () {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
||||||
h('.account-detail-section.flex-column.flex-grow', [
|
h('.account-detail-section', [
|
||||||
|
|
||||||
// identicon, label, balance, etc
|
// identicon, label, balance, etc
|
||||||
h('.account-data-subsection.flex-column.flex-grow', {
|
h('.account-data-subsection', {
|
||||||
style: {
|
style: {
|
||||||
margin: '0 20px',
|
margin: '0 20px',
|
||||||
},
|
},
|
||||||
}, [
|
}, [
|
||||||
|
|
||||||
// header - identicon + nav
|
// header - identicon + nav
|
||||||
h('.flex-row.flex-center', {
|
h('div', {
|
||||||
style: {
|
style: {
|
||||||
marginTop: 28,
|
marginTop: '15px',
|
||||||
|
display: 'flex',
|
||||||
|
justifyContent: 'flex-start',
|
||||||
|
alignItems: 'flex-start',
|
||||||
},
|
},
|
||||||
}, [
|
}, [
|
||||||
|
|
||||||
// large identicon
|
// large identicon and addresses
|
||||||
h('.identicon-wrapper.flex-column.flex-center.select-none', [
|
h('.identicon-wrapper.select-none', [
|
||||||
h(Identicon, {
|
h(Identicon, {
|
||||||
diameter: 62,
|
diameter: 62,
|
||||||
address: selected,
|
address: selected,
|
||||||
}),
|
}),
|
||||||
]),
|
]),
|
||||||
]),
|
h('flex-column', {
|
||||||
|
|
||||||
h('.flex-center', {
|
|
||||||
style: {
|
|
||||||
height: '62px',
|
|
||||||
paddingTop: '8px',
|
|
||||||
},
|
|
||||||
}, [
|
|
||||||
h(EditableLabel, {
|
|
||||||
textValue: identity ? identity.name : '',
|
|
||||||
state: {
|
|
||||||
isEditingLabel: false,
|
|
||||||
},
|
|
||||||
saveText: (text) => {
|
|
||||||
props.dispatch(actions.saveAccountLabel(selected, text))
|
|
||||||
},
|
|
||||||
}, [
|
|
||||||
|
|
||||||
// What is shown when not editing + edit text:
|
|
||||||
h('label.editing-label', [h('.edit-text', 'edit')]),
|
|
||||||
h('h2.font-medium.color-forest', {name: 'edit'}, identity && identity.name),
|
|
||||||
]),
|
|
||||||
]),
|
|
||||||
|
|
||||||
// address and getter actions
|
|
||||||
h('.flex-row', {
|
|
||||||
style: {
|
|
||||||
marginBottom: 16,
|
|
||||||
},
|
|
||||||
}, [
|
|
||||||
|
|
||||||
h('div', {
|
|
||||||
style: {
|
style: {
|
||||||
overflow: 'hidden',
|
lineHeight: '10px',
|
||||||
textOverflow: 'ellipsis',
|
marginLeft: '15px',
|
||||||
paddingTop: '3px',
|
|
||||||
},
|
},
|
||||||
}, ethUtil.toChecksumAddress(selected)),
|
|
||||||
|
|
||||||
h(CopyButton, {
|
|
||||||
value: ethUtil.toChecksumAddress(selected),
|
|
||||||
}),
|
|
||||||
|
|
||||||
h(Tooltip, {
|
|
||||||
title: 'Export Private Key',
|
|
||||||
}, [
|
}, [
|
||||||
h('div', {
|
h(EditableLabel, {
|
||||||
style: {
|
textValue: identity ? identity.name : '',
|
||||||
margin: '5px',
|
state: {
|
||||||
|
isEditingLabel: false,
|
||||||
|
},
|
||||||
|
saveText: (text) => {
|
||||||
|
props.dispatch(actions.saveAccountLabel(selected, text))
|
||||||
},
|
},
|
||||||
}, [
|
}, [
|
||||||
h('img.cursor-pointer.color-orange', {
|
|
||||||
src: 'images/key-32.png',
|
// What is shown when not editing + edit text:
|
||||||
onClick: () => this.requestAccountExport(selected),
|
h('label.editing-label', [h('.edit-text', 'edit')]),
|
||||||
|
h('h2.font-medium.color-forest', {name: 'edit'}, identity && identity.name),
|
||||||
|
]),
|
||||||
|
h('.flex-row', {
|
||||||
|
style: {
|
||||||
|
width: '15em',
|
||||||
|
justifyContent: 'space-between',
|
||||||
|
alignItems: 'baseline',
|
||||||
|
},
|
||||||
|
}, [
|
||||||
|
|
||||||
|
// address
|
||||||
|
|
||||||
|
h('div', {
|
||||||
style: {
|
style: {
|
||||||
margin: '0px 5px',
|
overflow: 'hidden',
|
||||||
width: '20px',
|
textOverflow: 'ellipsis',
|
||||||
height: '20px',
|
paddingTop: '3px',
|
||||||
position: 'relative',
|
width: '5em',
|
||||||
top: '3px',
|
fontSize: '13px',
|
||||||
right: '4px',
|
fontFamily: 'Montserrat Thin',
|
||||||
|
textRendering: 'geometricPrecision',
|
||||||
|
marginTop: '10px',
|
||||||
|
marginBottom: '15px',
|
||||||
|
color: '#AEAEAE',
|
||||||
|
},
|
||||||
|
}, ethUtil.toChecksumAddress(selected)),
|
||||||
|
|
||||||
|
// copy and export
|
||||||
|
|
||||||
|
h('.flex-row', {
|
||||||
|
style: {
|
||||||
|
justifyContent: 'flex-end',
|
||||||
|
},
|
||||||
|
}, [
|
||||||
|
h(CopyButton, {
|
||||||
|
value: ethUtil.toChecksumAddress(selected),
|
||||||
|
}),
|
||||||
|
|
||||||
|
h(Tooltip, {
|
||||||
|
title: 'Export Private Key',
|
||||||
|
}, [
|
||||||
|
h('div', {
|
||||||
|
style: {
|
||||||
|
margin: '5px',
|
||||||
|
},
|
||||||
|
}, [
|
||||||
|
h('img.cursor-pointer.color-orange', {
|
||||||
|
src: 'images/key-32.png',
|
||||||
|
onClick: () => this.requestAccountExport(selected),
|
||||||
|
style: {
|
||||||
|
margin: '0px 5px',
|
||||||
|
width: '20px',
|
||||||
|
height: '20px',
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
]),
|
||||||
|
]),
|
||||||
|
]),
|
||||||
|
]),
|
||||||
|
|
||||||
|
// account ballence
|
||||||
|
|
||||||
|
h('.flex-row', {
|
||||||
|
style: {
|
||||||
|
justifyContent: 'space-between',
|
||||||
|
alignItems: 'flex-start',
|
||||||
|
},
|
||||||
|
}, [
|
||||||
|
|
||||||
|
h(EtherBalance, {
|
||||||
|
value: account && account.balance,
|
||||||
|
style: {
|
||||||
|
lineHeight: '7px',
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
|
|
||||||
|
h('button', {
|
||||||
|
onClick: () => props.dispatch(actions.showSendPage()),
|
||||||
|
style: {
|
||||||
|
marginBottom: '20px',
|
||||||
|
marginRight: '8px',
|
||||||
|
},
|
||||||
|
}, 'SEND'),
|
||||||
|
|
||||||
]),
|
]),
|
||||||
|
|
||||||
]),
|
]),
|
||||||
|
|
||||||
]),
|
]),
|
||||||
|
|
||||||
// balance + send
|
|
||||||
h('.flex-row.flex-space-between', [
|
|
||||||
|
|
||||||
h(EtherBalance, {
|
|
||||||
value: account && account.balance,
|
|
||||||
style: {
|
|
||||||
lineHeight: '50px',
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
|
|
||||||
h('button', {
|
|
||||||
onClick: () => props.dispatch(actions.showSendPage()),
|
|
||||||
style: {
|
|
||||||
margin: 10,
|
|
||||||
},
|
|
||||||
}, 'SEND'),
|
|
||||||
|
|
||||||
]),
|
|
||||||
|
|
||||||
]),
|
]),
|
||||||
|
|
||||||
// subview (tx history, pk export confirm)
|
// subview (tx history, pk export confirm)
|
||||||
@ -214,4 +236,3 @@ AccountDetailScreen.prototype.transactionList = function () {
|
|||||||
AccountDetailScreen.prototype.requestAccountExport = function () {
|
AccountDetailScreen.prototype.requestAccountExport = function () {
|
||||||
this.props.dispatch(actions.requestExportAccount())
|
this.props.dispatch(actions.requestExportAccount())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,8 +24,34 @@ EthBalanceComponent.prototype.render = function () {
|
|||||||
style: {
|
style: {
|
||||||
display: 'inline',
|
display: 'inline',
|
||||||
},
|
},
|
||||||
}, value),
|
}, this.renderBalance(value)),
|
||||||
])
|
])
|
||||||
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
EthBalanceComponent.prototype.renderBalance = function (value) {
|
||||||
|
|
||||||
|
if (value === 'None') return value
|
||||||
|
|
||||||
|
var balance = value.split(' ')[0]
|
||||||
|
var label = value.split(' ')[1]
|
||||||
|
|
||||||
|
return (
|
||||||
|
h('.flex-column', {
|
||||||
|
style: {
|
||||||
|
alignItems: 'flex-end',
|
||||||
|
lineHeight: '13px',
|
||||||
|
fontFamily: 'Montserrat Thin',
|
||||||
|
textRendering: 'geometricPrecision',
|
||||||
|
},
|
||||||
|
}, [
|
||||||
|
h('div', balance),
|
||||||
|
h('div', {
|
||||||
|
style: {
|
||||||
|
color: ' #AEAEAE',
|
||||||
|
fontSize: '12px',
|
||||||
|
},
|
||||||
|
}, label),
|
||||||
|
])
|
||||||
|
)
|
||||||
|
}
|
||||||
|
@ -35,6 +35,8 @@ TransactionList.prototype.render = function () {
|
|||||||
style: {
|
style: {
|
||||||
background: '#EBEBEB',
|
background: '#EBEBEB',
|
||||||
color: '#AEAEAE',
|
color: '#AEAEAE',
|
||||||
|
paddingTop: '4px',
|
||||||
|
paddingBottom: '4px',
|
||||||
},
|
},
|
||||||
}, [
|
}, [
|
||||||
'Transactions',
|
'Transactions',
|
||||||
@ -43,7 +45,7 @@ TransactionList.prototype.render = function () {
|
|||||||
h('.tx-list', {
|
h('.tx-list', {
|
||||||
style: {
|
style: {
|
||||||
overflowY: 'auto',
|
overflowY: 'auto',
|
||||||
height: '204px',
|
height: '305px',
|
||||||
padding: '0 20px',
|
padding: '0 20px',
|
||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
},
|
},
|
||||||
@ -67,4 +69,3 @@ TransactionList.prototype.render = function () {
|
|||||||
])
|
])
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
src: url('/fonts/Montserrat/Montserrat-Regular.ttf') format('truetype');
|
src: url('/fonts/Montserrat/Montserrat-Regular.ttf') format('truetype');
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-size: 'small',
|
font-size: 'small';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -18,3 +18,10 @@
|
|||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Montserrat Thin';
|
||||||
|
src: url('/fonts/Montserrat/Montserrat-Regular.woff') format('woff');
|
||||||
|
src: url('/fonts/Montserrat/Montserrat-Regular.ttf') format('truetype');
|
||||||
|
text-rendering: geometricPrecision;
|
||||||
|
}
|
||||||
|
@ -153,6 +153,7 @@ textarea.twelve-word-phrase {
|
|||||||
top: 8px;
|
top: 8px;
|
||||||
width: 5.2em;
|
width: 5.2em;
|
||||||
line-height: 9px;
|
line-height: 9px;
|
||||||
|
text-rendering: geometricPrecision;
|
||||||
}
|
}
|
||||||
|
|
||||||
.check {
|
.check {
|
||||||
@ -248,7 +249,7 @@ app sections
|
|||||||
|
|
||||||
.sizing-input{
|
.sizing-input{
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
height: 31px;
|
height: 30px;
|
||||||
}
|
}
|
||||||
.editable-label{
|
.editable-label{
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -387,19 +388,19 @@ input.large-input {
|
|||||||
|
|
||||||
}
|
}
|
||||||
.name-label{
|
.name-label{
|
||||||
margin-bottom: 14px;
|
|
||||||
}
|
}
|
||||||
.edit-text {
|
.edit-text {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
.editing-label {
|
.editing-label {
|
||||||
cursor: text;
|
display: flex;
|
||||||
width: 100%;
|
justify-content: flex-start;
|
||||||
position: relative;
|
margin-left: 50px;
|
||||||
top: 7px;
|
margin-bottom: 2px;
|
||||||
text-align: right;
|
font-size: 11px;
|
||||||
font-size: small;
|
text-rendering: geometricPrecision;
|
||||||
color: #F7861C;
|
color: #F7861C;
|
||||||
}
|
}
|
||||||
.name-label:hover .edit-text {
|
.name-label:hover .edit-text {
|
||||||
|
Loading…
Reference in New Issue
Block a user