style: Do not show inputs or outputs table if empty

This commit is contained in:
Alan Szepieniec 2025-08-13 13:11:48 +02:00
parent 86698687a8
commit d840347b0f

View File

@ -40,6 +40,7 @@
{% match &self.announcement_type { AnnouncementType::TransparentTxInfo(tx_info) => { %} {% match &self.announcement_type { AnnouncementType::TransparentTxInfo(tx_info) => { %}
<details open> <details open>
<summary>Transparent Transaction Info</summary> <summary>Transparent Transaction Info</summary>
{% if !tx_info.inputs.is_empty() { %}
<table class="striped"> <table class="striped">
<tr> <tr>
<th colspan=2 style="font-weight: bold;">inputs</th> <th colspan=2 style="font-weight: bold;">inputs</th>
@ -75,6 +76,8 @@
</tr> </tr>
{% } %} {% } %}
</table> </table>
{% } %}
{% if !tx_info.outputs.is_empty() { %}
<table class="striped"> <table class="striped">
<tr> <tr>
<th colspan="2" style="font-weight: bold;">outputs</th> <th colspan="2" style="font-weight: bold;">outputs</th>
@ -109,6 +112,7 @@
</tr> </tr>
{% } %} {% } %}
</table> </table>
{% } %}
</details> </details>
{% }, AnnouncementType::Unknown(payload) => { %} {% }, AnnouncementType::Unknown(payload) => { %}
<details> <details>