|
3 | 3 | <html lang="en"> |
4 | 4 | {{template "html-head" headData .CommonPageData "Decred Decentralized Treasury"}} |
5 | 5 | {{template "navbar" . }} |
| 6 | + {{- $mempool := .Mempool -}} |
6 | 7 | {{- with .Data}} |
7 | 8 | {{- $bal := .Balance -}} |
8 | 9 | {{- $TxnCount := $bal.TxCount}} |
9 | 10 | {{- $txType := .TxnType -}} |
10 | 11 | <div class="container main" |
11 | | - data-controller="address" |
| 12 | + data-controller="address time" |
12 | 13 | data-address-dcraddress="treasury" |
13 | 14 | data-address-offset="{{.Offset}}" |
14 | 15 | data-address-txn-count="{{ $bal.TxCount}}" |
|
144 | 145 | </div> |
145 | 146 | </div> |
146 | 147 | </div> |
147 | | - |
| 148 | + <div class="position-relative"> |
| 149 | + <div class="row"> |
| 150 | + <div class="col-sm-24"> |
| 151 | + <div class="me-auto h4 col-24">Unconfirmed Treasury Spends</div> |
| 152 | + <table class="table"> |
| 153 | + <thead> |
| 154 | + <tr> |
| 155 | + <th>Transaction ID</th> |
| 156 | + <th class="text-end">Amount</th> |
| 157 | + <th class="text-end">Time in Mempool</th> |
| 158 | + </tr> |
| 159 | + </thead> |
| 160 | + <tbody> |
| 161 | + {{if gt $mempool.NumTSpends 0 -}} |
| 162 | + {{- range $mempool.TSpends -}} |
| 163 | + <tr> |
| 164 | + <td class="break-word clipboard"> |
| 165 | + <a class="hash lh1rem" href="/tx/{{.Hash}}" title="{{.Hash}}">{{.Hash}}</a> |
| 166 | + {{template "copyTextIcon"}} |
| 167 | + </td> |
| 168 | + <td class="mono fs15 text-end"> |
| 169 | + {{template "decimalParts" (float64AsDecimalParts .TotalOut 8 false)}} |
| 170 | + </td> |
| 171 | + <td class="mono fs15 text-end" data-time-target="age" data-age="{{.Time}}"></td> |
| 172 | + </tr> |
| 173 | + {{- end -}} |
| 174 | + {{- else -}} |
| 175 | + <tr class="no-tx-tr"> |
| 176 | + <td colspan="4">No treasury spends in mempool.</td> |
| 177 | + </tr> |
| 178 | + {{- end}} |
| 179 | + </tbody> |
| 180 | + </table> |
| 181 | + </div> |
| 182 | + </div> |
| 183 | + {{if gt $mempool.NumTAdds 0 -}}{{- /* this will be rare, so only show the section header and table if needed */ -}} |
| 184 | + <div class="row"> |
| 185 | + <div class="col-sm-24"> |
| 186 | + <div class="me-auto h4 col-24">Unconfirmed Treasury Adds</div> |
| 187 | + <table class="table"> |
| 188 | + <thead> |
| 189 | + <tr> |
| 190 | + <th>Transaction ID</th> |
| 191 | + <th class="text-end">Amount</th> |
| 192 | + <th class="text-end">Time in Mempool</th> |
| 193 | + </tr> |
| 194 | + </thead> |
| 195 | + <tbody> |
| 196 | + {{range $mempool.TAdds -}} |
| 197 | + <tr> |
| 198 | + <td class="break-word clipboard"> |
| 199 | + <a class="hash lh1rem" href="/tx/{{.Hash}}">{{.Hash}}</a> |
| 200 | + {{template "copyTextIcon"}} |
| 201 | + </td> |
| 202 | + <td class="mono fs15 text-end"> |
| 203 | + {{template "decimalParts" (float64AsDecimalParts .TotalOut 8 false)}} |
| 204 | + </td> |
| 205 | + <td class="mono fs15 text-end" data-time-target="age" data-age="{{.Time}}"></td> |
| 206 | + </tr> |
| 207 | + {{- end}} |
| 208 | + </tbody> |
| 209 | + </table> |
| 210 | + </div> |
| 211 | + </div> |
| 212 | + {{- end}} |
| 213 | + </div> |
148 | 214 | <div class="position-relative" data-address-target="listbox"> |
149 | 215 | <div class="row align-items-center"> |
150 | 216 | <div class="me-auto mb-0 h4 col-24 col-sm-6">Transactions</div> |
|
182 | 248 | </div> |
183 | 249 | </div> |
184 | 250 | <div class="position-relative"> |
185 | | - {{- /* TODO: unconfirmed tadd and tspend txns */}} |
186 | 251 | <div class="loader-v2" data-address-target="listLoader"></div> |
187 | 252 | <div class="position-relative" data-address-target="table"> |
188 | 253 | {{template "treasuryTable" .}} |
|
0 commit comments