File size: 4,424 Bytes
340cbde
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
{% extends "base.html" %}

{% block content %}
<br>
<div class="ui center aligned text container">
    <h2 class="ui icon header">
        <i class="settings icon"></i>
        <div class="content">
            Settings
            <div class="sub header">Manage your settings.</div>
        </div>
    </h2>
</div>

<h2 class="ui centered header">
    Imports can take up to 2 minutes.
    <div class="sub header">You can still use Yotter.</div>
  </h2>

<div class="ui center aligned text container">
    <div class="ui segments">
        <div class="ui segment">
            <div class="item">
                <i class="large download middle aligned icon"></i>
                <div class="content">
                    <div class="description"><h5 class="ui header">Export data into JSON file</h5></div>
                    <a href="{{ url_for('export') }}" class="header">Export Data</a>
                </div>
            </div>
        </div>
        <div class="ui blue segment">
            <i class="large upload middle aligned icon"></i>
            <div class="content">
                <div class="description"><h5 class="ui header">Import subscription data</h5></div>
                <form action = "{{ url_for('importdata') }}" method = "POST" enctype = "multipart/form-data">
                    <input type = "file" name = "file"/>
                    <input type = "submit"/>
                    <br>
                    <label class="radio-inline">
                        <input type="radio" name="import_format" id="yotter" value="yotter" checked> Yotter
                    </label>
                    <label class="radio-inline" data-tooltip="Includes FreeTube, Invidious and NewPipe.">
                        <input type="radio" name="import_format" id="youtube" value="youtube"> Youtube
                    </label>
                </form>
            </div>
        </div>
    </div>

        <!--<div class="item">

            <i class="large moon middle aligned icon"></i>

            <div class="content">

                <div class="ui slider checkbox">

                    <input type="checkbox" name="newsletter">

                    <label>Dark mode</label>

                </div>

            </div>

        </div>

        <div class="item">

            <i class="large weight middle aligned icon"></i>

            <div class="content">

                <div class="ui slider checkbox">

                    <input type="checkbox" name="newsletter">

                    <label>Disable images</label>

                    <div class="description">Show links instead</div>

                </div>

            </div>

        </div>-->

        <div class="ui segment">
            <label for="toggle">I want to delete my account.</label>
            <input type="checkbox" id="toggle">
            <div class="control-me"><a href="/deleteme"><button class="ui red button">Delete account</button></a></div>   
        </div>

        <!--

        {% if admin %}

        <div class="ui segment">

            <h2 class="ui centered header">

                Admin tools

            </h2>

            <label for="toggle">Delete accounts with last login older than {{config.max_old_user_days}} days.</label> <br>

            <a href="/clear_inactive_users/{{current_user.password_hash}}"><button class="ui red button">Delete</button></a></div>   

        </div>

        {% endif %}-->

        <!-- INSTANCE INFO -->
        <h1 class="ui header">{{config.serverName}} Info</h1>
        <div class="ui segments">
            <div class="ui segment">
                <p><b>Total users:</b> {{info.totalUsers}}</p>
            </div>
            <div class="ui segment">
                <p><b>Active users:</b> {{info.active}}</p>
            </div>
            <div class="ui segment">
                <p><b>Server location:</b> {{config.serverLocation}}</p>
            </div>
            {% if config.donate_url %}
            <div class="ui segment">
                <p><a href="{{config.donate_url}}">Consider making a donation to the instance</a></p>
            </div>
            {% endif %}
            <div class="ui segment">
                <p><a href="https://github.com/pluja/Yotter#donate">Donate to the Yotter developer</a></p>
            </div>
    </div>
</div>
{% endblock %}