{% extends "base.html" %}
{% block left_pannel %}settings{% endblock %}

{% block content %}
{%if not current_user.is_authenticated %}
    <button class="unselected" onclick="location.href = '/login';">login</button>
{% else %}
<form method="post" action="/settings/">
    <table>
        <tr>
            <td class="comlumn-name">avatar url :</td>
            <td><input type="text" name="avatarlink" value="{{data['avatarlink']}}"></td>
        </tr>
        <tr>
            <td></td>
            <td>
                <input type="submit"  name="settings" id="submit" value="update" class="button"/>
            </td>
        </tr>
    </table>
</form>

<h2>TODO</h2>
<ul>
    <li>ban button</li>
</ul>
<br><br>
<h2>Backup config files</h2>
<ul>
    <li><a href="/download/configs.json">download account config</a></li>
    <li><a href="/download/discord.json">download discord config</a></li>
    <li><a href="/download/flask.json">download flask config</a></li>
    <li><a href="/download/proxy.json">download proxy config</a></li>
    <li><a href="/download/settings.json">download settings</a></li>
</ul>

<br><br>
<h2>Upload your files</h2>
<form method="POST" action="/upload_file/" enctype=multipart/form-data>
    <table id="table">
        <tr><td><input type="file" id="file1" name="file1" onchange='addline(0)'></td></tr>
        <tr><td><input type="submit"  name="settings" id="submit" value="send file" class="button"/></td></tr>
    </table>
    
</form>

{% endif %}
{%endblock %}