fix: improve transaction address and hash link functionality

This commit is contained in:
void-57 2025-08-30 21:44:56 +05:30
parent 7788de63fb
commit 288595e2f8
3 changed files with 21 additions and 21 deletions

View File

@ -1378,6 +1378,7 @@ body {
font-family: "Courier New", monospace;
font-size: 0.8rem;
flex: 1;
cursor: pointer;
}
.tx-hash {
@ -4403,7 +4404,6 @@ sm-popup::part(popup) {
color: var(--primary-color);
}
@media (max-width: 768px) {
.tx-detail-row {
flex-direction: column;
@ -4709,7 +4709,6 @@ sm-popup::part(popup) {
color: var(--text-primary);
}
@media (max-width: 768px) {
.transaction-details-header {
flex-direction: row;
@ -5005,7 +5004,6 @@ sm-popup::part(popup) {
}
}
@media (max-width: 600px) {
.balance-header {
display: flex;
@ -5033,5 +5031,7 @@ sm-popup::part(popup) {
}
.detail-link {
text-decoration: none; color:white; cursor: pointer;
text-decoration: none;
color: white;
cursor: pointer;
}

View File

@ -1141,7 +1141,6 @@
transactionHistory(url, __historyAddress);
});
}
</script>
<div id="notification_drawer" class="notification-drawer"></div>
</body>

View File

@ -33,14 +33,12 @@ async function transactionHistory(url, address) {
from = tronWeb.address.fromHex(v.owner_address);
const contractBase58 = tronWeb.address.fromHex(v.contract_address);
extraContractLine = `
<p><b>Contract:</b> ${contractBase58}
<button onclick="copyToClipboard('${contractBase58}')"><i class="fas fa-copy"></i></button>
</p>`;
const input = (v.data || "").startsWith("0x")
? v.data.slice(2)
: v.data || "";
@ -118,7 +116,6 @@ function copyToClipboard(text) {
});
}
// State for filtering and pagination
let __nextUrl = null;
let __prevUrls = [];
@ -291,11 +288,15 @@ function __renderTransactions() {
</div>
</div>
<div class="tx-addresses">
<div class="tx-address-row"><span class="address-label">From</span><span class="address-value">${from}</span></div>
<div class="tx-address-row"><span class="address-label">To</span><span class="address-value">${
to || "—"
}</span></div>
<div class="tx-hash"><span class="hash-label">Hash</span><span class="hash-value">${hash}</span></div>
<div class="tx-address-row"><span class="address-label">From</span><span class="address-value"
onclick="window.open('index.html?page=transactions&address=${from}','_blank')"
title="View address details">${from}</span></div>
<div class="tx-address-row"><span class="address-label">To</span><span class="address-value"
onclick="window.open('index.html?page=transactions&address=${to}','_blank')"
title="View address details">${to}</span></div>
<div class="tx-hash"><span class="hash-label">Hash</span><span class="hash-value"><span class="detail-link"
onclick="window.open('index.html?page=transactions&tx=${hash}','_blank')"
title="View transaction details">${hash}</span></span></div>
</div>
</div>
</div>`;