Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redesign federation page #1181

Merged
merged 3 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 57 additions & 28 deletions templates/page/federation.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,25 @@
{% endblock %}

{% block body %}
<h1>{{ 'federation'|trans }}</h1>
<div id="content" class="section" style="overflow: auto;">

<h1>{{ 'federation'|trans }}</h1>
<div class="section">
<h3 id="toc" style="margin-top: 0">{{ 'table_of_contents'|trans }}</h3>
<ol>
<li>
<a href="#allowed-instances">{{ 'federation_page_allowed_description'|trans }}</a>
</li>
<li>
<a href="#banned-instances">{{ 'federation_page_disallowed_description'|trans }}</a>
</li>
<li>
<a href="#dead-instances">{{ 'federation_page_dead_title'|trans }}</a>
</li>
</ol>
</div>
<div class="section">
<h3 id="allowed-instances" style="margin-top: 0">{{'federation_page_allowed_description'|trans}}</h3>
{% if allowedInstances is not empty %}
<h3>{{'federation_page_allowed_description'|trans}}</h3>
<table>
<thead>
<tr>
Expand Down Expand Up @@ -52,10 +66,15 @@
{% endfor %}
</tbody>
</table>
{% else %}
<aside class="section--muted">
<p>{{ 'empty'|trans }}</p>
</aside>
{% endif %}

</div>
<div class="section">
<h3 id="banned-instances" style="margin-top: 0">{{'federation_page_disallowed_description'|trans}}</h3>
{% if defederatedInstances is not empty %}
<h3>{{'federation_page_disallowed_description'|trans}}</h3>
<table>
<thead>
<tr>
Expand All @@ -65,20 +84,26 @@
</tr>
</thead>
<tbody>
{% for instance in defederatedInstances %}
<tr>
<td><a href="https://{{ instance.domain }}" rel="noopener noreferrer nofollow">{{instance.domain}}</a></td>
<td>{{ instance.software ?? '' }}</td>
<td>{{ instance.version ?? '' }}</td>
</tr>
{% endfor %}
{% for instance in defederatedInstances %}
<tr>
<td><a href="https://{{ instance.domain }}" rel="noopener noreferrer nofollow">{{instance.domain}}</a></td>
<td>{{ instance.software ?? '' }}</td>
<td>{{ instance.version ?? '' }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<aside class="section--muted">
<p>{{ 'empty'|trans }}</p>
</aside>
{% endif %}
</div>
<div class="section">
<h3 id="dead-instances" style="margin-top: 0">{{'federation_page_dead_title'|trans}}</h3>
<p>{{ 'federation_page_dead_description'|trans }}</p>

{% if deadInstances is not empty %}
<h3>{{'federation_page_dead_title'|trans}}</h3>
<p>{{ 'federation_page_dead_description'|trans }}</p>
<table>
<thead>
<tr>
Expand All @@ -91,22 +116,26 @@
</tr>
</thead>
<tbody>
{% for instance in deadInstances %}
<tr>
<td><a href="https://{{ instance.domain }}" rel="noopener noreferrer nofollow">{{instance.domain}}</a></td>
<td>{{ instance.software ?? ''}}</td>
<td>{{ instance.version ?? '' }}</td>
{% if app.user is defined and app.user is not same as null and app.user.admin %}
<td>
{% if instance.lastFailedDeliver is not same as null %}
{{ component('date', { date: instance.lastFailedDeliver }) }}
{% endif %}
</td>
{% endif %}
</tr>
{% endfor %}
{% for instance in deadInstances %}
<tr>
<td><a href="https://{{ instance.domain }}" rel="noopener noreferrer nofollow">{{instance.domain}}</a></td>
<td>{{ instance.software ?? ''}}</td>
<td>{{ instance.version ?? '' }}</td>
{% if app.user is defined and app.user is not same as null and app.user.admin %}
<td>
{% if instance.lastFailedDeliver is not same as null %}
{{ component('date', { date: instance.lastFailedDeliver }) }}
{% endif %}
</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<aside class="section--muted">
<p>{{ 'empty'|trans }}</p>
</aside>
{% endif %}
</div>
{% endblock %}
1 change: 1 addition & 0 deletions translations/messages.en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -897,3 +897,4 @@ admin_users_banned: Banned
user_verify: Activate account
max_image_size: Maximum file size
comment_not_found: Comment not found
table_of_contents: Table of contents
Loading