{% extends 'base.html' %}
{% block content %}
      <h3>Client Config</h3>
      <div class='form'>
        <form method="get" action="download">
          <div class="buttonrow">
            <button class="button buttonhighlight" type="submit" name="action" value="list" formaction="..">Return to List</button>
          </div>
          <div class="table">
            <div class="table-row">
              <div class="table-cell bordertop">
                {{ peerdata['Description'] }}<br>
                <small>{{ peerdata['Address'] }}</small><br>
              </div>
              <div class="table-cell twobuttoncell bordertop2">
                <button class="button" type="submit" name="id" value="{{ peerdata['Id'] }}" formaction="edit">Edit Client</button>
                <button class="button" type="submit" name="id" value="{{ peerdata['Id'] }}" formaction="download">Download Config</button>
              </div>
            </div>
            <div class="table-row" style="text-align: center;">
              <img class="qrcode" src="/configs/{{ peerdata['Id'] }}.png" alt="QR Code">
            </div>
          </div>
        </form>
      </div>
      <div class='instructions'>
        See the <a href='https://www.wireguard.com/install/' target="_blank">WireGuard client installation instructions</a>.
      </div>      
{% endblock %}
