chore: update project changes

This commit is contained in:
2026-09-21 15:33:47 +03:30
parent f7366a1985
commit 810448b6e7
8 changed files with 1459 additions and 810 deletions
+44
View File
@@ -72,6 +72,7 @@ templ Page(title string, active string, locale Locale, englishURL string, persia
.pill { display:inline-flex; padding:6px 9px; border-radius:999px; background:var(--surface); font:750 10px/1 ui-monospace,SFMono-Regular,monospace; text-transform:uppercase; }
.holder-id { max-width:330px; overflow-wrap:anywhere; font-weight:750; }
.holder-id small { display:block; margin-top:5px; color:var(--muted); font:650 10px/1 ui-monospace,SFMono-Regular,monospace; }
td small { display:block; margin-top:5px; color:var(--muted); font:600 10px/1.35 ui-monospace,SFMono-Regular,monospace; overflow-wrap:anywhere; }
.empty { padding:45px 24px; text-align:center; color:var(--muted); }
.notice + .transaction-list { margin-top:46px; }
.pagination { display:flex; align-items:center; justify-content:center; gap:8px; margin-top:18px; direction:ltr; }
@@ -200,6 +201,16 @@ templ DashboardContent(data explorer.Dashboard, locale Locale) {
<div class="stat"><span class="stat-label">{ tr(locale, "tracked_accounts") }</span><strong>{ count(data.Stats.AccountCount) }</strong></div>
<div class="stat"><span class="stat-label">{ tr(locale, "last_recorded") }</span><time>{ formatTime(data.Stats.LastRecordedAt) }</time></div>
</section>
<section class="dashboard-section">
<div class="section-head"><h2>{ tr(locale, "blockchain_settlements") }</h2><span>{ tr(locale, "settlement_summary") }</span></div>
<section class="stats" aria-label={ tr(locale, "blockchain_settlements") }>
<div class="stat"><span class="stat-label">{ tr(locale, "confirmed_on_chain") }</span><strong>{ count(data.SettlementStats.Confirmed) }</strong></div>
<div class="stat"><span class="stat-label">{ tr(locale, "pending_submission") }</span><strong>{ count(data.SettlementStats.Pending) }</strong></div>
<div class="stat"><span class="stat-label">{ tr(locale, "retryable") }</span><strong>{ count(data.SettlementStats.Retryable) }</strong></div>
<div class="stat"><span class="stat-label">{ tr(locale, "manual_review") }</span><strong>{ count(data.SettlementStats.ManualReview) }</strong></div>
</section>
@SettlementTable(data.Settlements, locale)
</section>
<section>
<div class="section-head"><h2>{ tr(locale, "latest_activity") }</h2><span>{ tr(locale, "newest_first") }</span></div>
@JournalTable(data.Journals, locale)
@@ -207,6 +218,39 @@ templ DashboardContent(data explorer.Dashboard, locale Locale) {
</main>
}
templ SettlementTable(settlements []explorer.Settlement, locale Locale) {
<div class="panel">
if len(settlements) == 0 {
<div class="empty">{ tr(locale, "no_settlements") }</div>
} else {
<table>
<thead><tr><th>{ tr(locale, "blockchain_transaction") }</th><th>{ tr(locale, "status") }</th><th>{ tr(locale, "network") }</th><th>{ tr(locale, "source") }</th><th>{ tr(locale, "attempts") }</th><th>{ tr(locale, "updated") }</th></tr></thead>
<tbody>
for _, settlement := range settlements {
<tr>
<td class="mono">
if settlement.TransactionHash != "" {
<a class="hash-link" href={ templ.URL(transactionURL(settlement.TransactionHash)) } title={ settlement.TransactionHash }>{ short(settlement.TransactionHash, 22) }</a>
} else {
<span title={ settlement.ID }>{ tr(locale, "not_submitted") } · { short(settlement.ID, 14) }</span>
}
if settlement.LastError != "" {
<small>{ short(settlement.LastError, 70) }</small>
}
</td>
<td><span class="pill">{ string(settlement.Status) }</span></td>
<td>{ settlement.Network }</td>
<td>{ settlement.SourceService }<small class="mono">{ short(settlement.SourceTransactionID, 18) }</small></td>
<td class="mono">{ strconv.Itoa(settlement.Attempts) }</td>
<td class="mono">{ formatTime(settlement.UpdatedAt) }</td>
</tr>
}
</tbody>
</table>
}
</div>
}
templ AssetsContent(data explorer.Assets, locale Locale) {
<main id="explorer-content" class="shell">
<div class="breadcrumb"><a href="/">{ tr(locale, "network") }</a> / { tr(locale, "assets") }</div>