File size: 2,901 Bytes
1404692
 
36dde81
1404692
 
36dde81
 
 
 
 
 
 
066105f
36dde81
f697c3b
36dde81
 
 
273ab56
 
36dde81
 
 
273ab56
 
f697c3b
273ab56
36dde81
 
 
 
 
 
 
 
 
 
 
 
 
273ab56
36dde81
 
 
 
066105f
273ab56
1404692
 
 
273ab56
 
36dde81
 
 
 
 
 
 
 
273ab56
066105f
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
{% extends "base.html" %}

{% block title %}Sign in - Telegram Stremio{% endblock %}

{% block content %}
<div class="min-h-[calc(100dvh-4rem)] grid place-items-center">
    <div class="w-full max-w-sm">
        <div class="flex items-center gap-3 mb-8">
            <span class="grid place-items-center w-11 h-11 rounded-[14px] bg-primary text-on-primary"><i class="fa-solid fa-play text-sm"></i></span>
            <div>
                <p class="text-lg font-semibold leading-tight">TG Stremio</p>
                <p class="text-sm text-text-secondary">Admin console</p>
            </div>
        </div>

        <div class="glass-panel p-6 sm:p-7">
            <h1 class="text-xl font-semibold">Sign in</h1>
            <p class="text-sm text-text-secondary mt-1 mb-6">Use the admin account set in Settings.</p>

            {% if error %}
            <div class="flex items-center gap-2.5 text-sm text-danger bg-danger/10 border border-danger/25 px-3.5 py-2.5 rounded-[14px] mb-5" role="alert">
                <i class="fa-solid fa-circle-exclamation"></i>
                <span>{{ error }}</span>
            </div>
            {% endif %}

            <form method="post" class="space-y-4">
                <label class="block">
                    <span class="label-caps block mb-1.5">Username</span>
                    <input type="text" name="username" required autocomplete="username" autocapitalize="none" spellcheck="false"
                        class="field px-4 py-3 text-[15px]" placeholder="admin">
                </label>
                <label class="block">
                    <span class="label-caps block mb-1.5">Password</span>
                    <span class="relative block">
                        <input type="password" id="password" name="password" required autocomplete="current-password"
                            class="field pl-4 pr-12 py-3 text-[15px]" placeholder="••••••••">
                        <button type="button" onclick="togglePassword()" aria-label="Show password"
                            class="icon-btn absolute right-1 top-1/2 -translate-y-1/2 w-10 h-10">
                            <i id="eyeIcon" class="fa-solid fa-eye text-sm"></i>
                        </button>
                    </span>
                </label>
                <button type="submit" class="btn-primary w-full py-3 mt-2 text-[15px]">
                    Sign in <i class="fa-solid fa-arrow-right text-sm"></i>
                </button>
            </form>
        </div>
    </div>
</div>

<script>
function togglePassword() {
    const input = document.getElementById('password');
    const icon = document.getElementById('eyeIcon');
    const show = input.type === 'password';
    input.type = show ? 'text' : 'password';
    icon.classList.toggle('fa-eye', !show);
    icon.classList.toggle('fa-eye-slash', show);
}
</script>
{% endblock %}