consensus/cmd/web/views/sweeps.qtpl
DataHoarder 55661a12da
All checks were successful
continuous-integration/drone/push Build is passing
WIP: Bootstrap-based responsive interface, CSS only
2024-03-20 13:37:26 +01:00

44 lines
1.2 KiB
Plaintext

{% import "git.gammaspectra.live/P2Pool/p2pool-observer/cmd/index" %}
{% import "git.gammaspectra.live/P2Pool/p2pool-observer/monero/address" %}
{% code
type SweepsPage struct {
// inherit from base page, so its' title is used in error page.
BasePage
Refresh int
Sweeps <-chan *index.MainLikelySweepTransaction
Miner *address.Address
}
func (p *SweepsPage) IsRefresh() (ok, isRefresh bool, interval int, uriRefresh, uriStatic string) {
return true, p.Refresh > 0, p.Refresh,"/sweeps?refresh", "/sweeps"
}
func (p *SweepsPage) Name() string {
return "sweeps"
}
%}
{% func (p *SweepsPage) Title() %}
{% if p.Miner == nil %}
{%= p.BasePage.Title() %} - Recent Likely Sweeps
{% else %}
{%= p.BasePage.Title() %} - Recent Likely Sweeps by {%z= p.Miner.ToBase58() %}
{% endif %}
{% endfunc %}
{% func (p *SweepsPage) Content() %}
<div style="text-align: center">
{% if p.Miner == nil %}
<h2>Recent Likely Sweeps</h2>
{% else %}
<h2>Recent Likely Sweeps by {%z= p.Miner.ToBase58() %}</h2>
{% endif %}
<p>
<a href="/transaction-lookup">[Sweep Transaction Lookup]</a>
</p>
{%= TemplateSweeps(p.Context(), p.Sweeps, p.Miner != nil) %}
</div>
{% endfunc %}