{% extends "layout.html" %}
{% set active_page = "commands" %}
{% import 'macros/text.html' as m_text %}

{% block body %}
<br>
<div class="card">
    <div class="card-header">
        <h1>Commands</h1>
    </div>
    <div class="card-body">
        <button route="{{ url_for('commands', cmd='restart') }}" type="button" class="btn btn-warning waves-effect">Restart Octobot</button>
        <button route="{{ url_for('commands', cmd='stop') }}" type="button" class="btn btn-danger waves-effect">Stop Octobot</button>
    </div>
</div>
<br>
<div class="card">
    <div class="card-header">
        <h1>Help us to improve OctoBot</h1>
    </div>
    <div class="card-body">
        <div class="custom-control custom-switch">
            <input type="checkbox" class="custom-control-input" id="metricsCheckbox" update-url="{{ url_for('metrics_settings') }}" {{ 'checked' if metrics_enabled else ''}}>
            <label class="custom-control-label" for="metricsCheckbox">Send</label> anonymous data to help the OctoBot Community
            <p>This will grant you access to the <a href="{{ url_for('community') }}"> OctoBot Community</a> and greatly help the OctoBot team to figure out the best ways to improve OctoBot.
                <i class="fa fa-question" data-toggle="tooltip" data-placement="top"
                    title="Sent data are: bot running time, whether simulator or real trader are activated and the name of used exchanges, tentacles, traded pairs, notification systems and finally if the current bot is running using python or the binary version and current platform type. Nothing else, no personal data.">
                </i>
                It won't slow your OctoBot down.
            </p>
        </div>
        <hr>
        <div>
            <p>
                In order to improve OctoBot, your user feedback is extremely helpful. The best way to make this project better and better is by telling us about your experience
                (positive and negative) when using OctoBot.
            </p>
            <a update-url="{{ url_for('api.user_feedback') }}" href="" id=feedbackButton class="button btn btn-primary waves-effect disabled" target="_blank" rel="noopener noreferrer">
                Tell us what you think about OctoBot
            </a>
        </div>
    </div>
    <div class="card-footer">
        <p>
            We are two developers working on the project on our free time. If you enjoy the OctoBot, tips are much appreciated <i class="far fa-smile"></i>
        </p>
        <div><i class="fab fa-bitcoin"></i> 1DHfjxD3C4e2Xi37FsoTbVJ6e4zNtesiwf</div>
        <div> <i class="fab fa-ethereum"></i> 0xF154aA84B66e2bCacd74e201496D9ac3f81234D5</div>
    </div>
</div>
<br>

<div class="card">
    <div class="card-header"><h1>Disclaimer</h1></div>
    <div class="card-body">
        {{ m_text.text_lines(disclaimer) }}
        <p>
            <a href="{{ url_for('terms') }}">
                Terms and conditions
            </a>
        </p>
    </div>
</div>
<br>
{% endblock %}

{% block additional_scripts %}
<script src="{{ url_for('static', filename='js/components/commands.js') }}"></script>
{% endblock additional_scripts %}
