mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 01:39:44 +01:00
Improve tx list style
Tx list no longer enlarges on hover, and failed transactions no longer have hover styles nor direct to an explorer page.
This commit is contained in:
parent
d71ee6927f
commit
2a6d6fcd15
@ -59,38 +59,15 @@ module.exports = function(transactions, network) {
|
|||||||
|
|
||||||
function renderTransaction(transaction, i){
|
function renderTransaction(transaction, i){
|
||||||
|
|
||||||
var panelOpts = {
|
|
||||||
key: `tx-${transaction.id + i}`,
|
|
||||||
identiconKey: transaction.txParams.to,
|
|
||||||
onClick: (event) => {
|
|
||||||
if (!transaction.hash) return
|
|
||||||
var url = explorerLink(transaction.hash, parseInt(network))
|
|
||||||
chrome.tabs.create({ url })
|
|
||||||
},
|
|
||||||
attributes: [
|
|
||||||
{
|
|
||||||
key: 'TIME',
|
|
||||||
value: formatDate(transaction.time),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 'TO',
|
|
||||||
value: addressSummary(transaction.txParams.to),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 'VALUE',
|
|
||||||
value: formatBalance(transaction.txParams.value),
|
|
||||||
},
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
var txParams = transaction.txParams
|
var txParams = transaction.txParams
|
||||||
var date = formatDate(transaction.time)
|
var date = formatDate(transaction.time)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
||||||
h('.transaction-list-item.flex-row.flex-space-between.cursor-pointer', {
|
h(`.transaction-list-item.flex-row.flex-space-between${transaction.hash ? '.pointer' : ''}`, {
|
||||||
key: `tx-${transaction.id + i}`,
|
key: `tx-${transaction.id + i}`,
|
||||||
onClick: (event) => {
|
onClick: (event) => {
|
||||||
|
if (!transaction.hash) return
|
||||||
var url = explorerLink(transaction.hash, parseInt(network))
|
var url = explorerLink(transaction.hash, parseInt(network))
|
||||||
chrome.tabs.create({ url })
|
chrome.tabs.create({ url })
|
||||||
},
|
},
|
||||||
|
@ -107,6 +107,9 @@
|
|||||||
user-select: none;
|
user-select: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.pointer {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
.cursor-pointer {
|
.cursor-pointer {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transform-origin: center center;
|
transform-origin: center center;
|
||||||
|
Loading…
Reference in New Issue
Block a user