{% extends "app.html" %}
{% comment %}
# SPDX-License-Identifier: AGPL-3.0-or-later
{% endcomment %}

{% load bootstrap %}
{% load i18n %}
{% load static %}

{% block page_js %}
  <script src="{% static 'tor/tor.js' %}" defer></script>
{% endblock %}

{% block status %}
  {{ block.super }}

  {% if status.hs_enabled %}
    <div class="table-responsive">
      <table class="table tor-hs">
        <thead>
          <tr>
            <th>{% trans "Onion Service" %}</th>
            <th>{% trans "Status" %}</th>
            <th>{% trans "Ports" %}</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td class="tor-hs-hostname">{{ status.hs_hostname }}</td>
            <td class="tor-hs-status">{{ status.hs_status }}</td>
            <td class="tor-hs-services">
              {{ status.hs_services|join:', ' }}
            </td>
          </tr>
        </tbody>
      </table>
    </div>
  {% endif %}
{% endblock %}

{% block internal_zone %}
  {{ block.super }}
{% endblock %}
