Detect detached connections and render them differently

This commit is contained in:
Juno Takano 2025-12-09 21:40:06 -03:00
commit f1965f7530
4 changed files with 30 additions and 15 deletions

View file

@ -16,13 +16,20 @@
<h2>Connections</h2>
{% if connections %}
<ul>
{% for connection in connections %}
{% for connection in connections | filter(attribute="detached", value=false) %}
<li>
<strong>{{id}}</strong>
&#x1f86a;
<a href="/node/{{connection.to}}">{{connection.to}}</a>
</li>
{% endfor %}
{% for connection in connections | filter(attribute="detached", value=true) %}
<li>
<strong>{{id}}</strong>
&#x1f86a;
<span style="filter: opacity(70%);">{{connection.to}}</span>
</li>
{% endfor %}
</ul>
{% else %}
<em>No outgoing connections.</em>

View file

@ -60,7 +60,9 @@
<li><strong>Connections</strong>
<ul>
{% for connection in node.connections %}
{% if not connection.detached %}
<li><a href="/node/{{connection.to}}">{{connection.to}}</a></li>
{% endif %}
{% endfor %}
</ul>
</li>