{% set hwi_bridge = true %}
{% extends "base.jinja" %}

{% block sidebar %}
{% endblock %}

{% block main %}
    <div class="card" style="width: 600px;">
        <form action="." method="POST" role="form">
            <input type="hidden" class="csrf-token" name="csrf_token" value="{{ csrf_token() }}"/>
            <h1>{{ _("HWI Bridge Settings") }}</h1>
            {% if tor_service_id %}
                <img style="width: 28px; padding:3px;float: left;margin-right: 5px;" src="{{ url_for('static', filename='img/tor.svg') }}"/>
                <span style="float: left;">
                    {{ _("HWI Bridge is also accessible over Tor") }}:<br>
                    <span title="Copy Tor address" class="explorer-link" onclick="copyText('{{ tor_service_id }}.onion', '{{ _("Copied Tor hidden service address") }}: {{ tor_service_id }}.onion')">
                        {{ tor_service_id }}.onion
                    </span>
                </span><br><br><br>
            {% endif %}
            <label>{{ _("Whitelisted domains") }}</label>
            <textarea class="form-control" placeholder="e.i. http://127.0.0.1:25441" name="whitelisted_domains">{{ whitelisted_domains }}</textarea>
            <div class="note">
                {{ _("To whitelist multiple domains, just list them one after another, each in a new line, for example") }}:
                <br>http://127.0.0.1:25440<br>http://127.0.0.1:25441<br>http://127.0.0.1:25442
            </div>
            <br>
            <br>
            <div class="row">
                <button type="submit" class="btn" name="action" value="update">{{ _("Update") }}</button>
            </div>
        </form>
    </div>
{% endblock %}
