File size: 5,504 Bytes
30a02c3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ServerClass — Admin</title>

<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400;1,700&family=Source+Serif+4:ital,wght@0,400;0,600;1,400&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">

<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
</head>
<body>

<a href="#main" class="skip-link">Skip to content</a>

<!-- Top bar -->
<header class="topbar">
  <div class="topbar__inner">
    <div class="topbar__brand">
      <span class="topbar__mark"></span>
      <span class="topbar__name">ServerClass <em></em> Admin</span>
    </div>
    <div class="topbar__meta">
      <span class="status-dot" id="connDot" data-state="off"></span>
      <span class="mono" id="connLabel">DISCONNECTED</span>
      <span class="topbar__sep">/</span>
      <span class="mono" id="lastSync">— : — : —</span>
    </div>
  </div>
</header>

<!-- Hero -->
<section class="hero">
  <div class="hero__inner">
    <div class="hero__eyebrow mono">VOL. 01 — LIVE DASHBOARD</div>
    <h1 class="hero__title">
      Server<br>
      <span class="italic">Class.</span>
    </h1>
    <div class="hero__rule">
      <span class="hero__rule-line"></span>
      <span class="hero__rule-square"></span>
      <span class="hero__rule-line"></span>
    </div>
    <p class="hero__lede">
      A real-time observatory for distributed authentication.
      Twelve servers, finite capacity, infinite attention to detail.
    </p>
  </div>
</section>

<div class="divider divider--thick"></div>

<!-- Authentication -->
<main id="main">
<section class="section section--auth">
  <div class="section__inner">
    <div class="section__head">
      <span class="section__num mono">§ 01</span>
      <h2 class="section__title">Credentials</h2>
    </div>

    <form id="authForm" class="auth" autocomplete="off">
      <label class="field">
        <span class="field__label mono">Admin Secret</span>
        <input type="password" id="adminSecret" class="field__input" placeholder="X-Admin-Secret" spellcheck="false">
      </label>

      <label class="field">
        <span class="field__label mono">API Key</span>
        <input type="password" id="apiKey" class="field__input" placeholder="X-API-Key" spellcheck="false">
      </label>

      <div class="auth__actions">
        <button type="submit" class="btn btn--primary">
          Authenticate <span class="btn__arrow"></span>
        </button>
        <button type="button" id="refreshBtn" class="btn btn--ghost">
          Refresh now
        </button>
      </div>
    </form>

    <div id="errorBox" class="errors" aria-live="polite"></div>
  </div>
</section>
</main>

<div class="divider divider--thick"></div>

<!-- Stats (inverted section) -->
<section class="section section--stats" aria-label="Statistics">
  <div class="section__inner">
    <div class="section__head section__head--invert">
      <span class="section__num mono">§ 02</span>
      <h2 class="section__title">Figures</h2>
    </div>

    <div class="stats" id="statsGrid">
      <div class="stat stat--placeholder">
        <div class="stat__label mono">Awaiting</div>
        <div class="stat__value"></div>
        <div class="stat__sub mono">Authenticate to populate</div>
      </div>
    </div>
  </div>
</section>

<div class="divider divider--thick"></div>

<!-- Servers -->
<section class="section">
  <div class="section__inner">
    <div class="section__head">
      <span class="section__num mono">§ 03</span>
      <h2 class="section__title">Servers <span class="italic">— Status</span></h2>
    </div>
    <div id="serversContent" class="placeholder mono">
      Enter credentials to load server topology.
    </div>
  </div>
</section>

<div class="divider divider--thick"></div>

<!-- Users -->
<section class="section">
  <div class="section__inner">
    <div class="section__head">
      <span class="section__num mono">§ 04</span>
      <h2 class="section__title">Users <span class="italic">— Index</span></h2>
    </div>

    <div class="search">
      <input type="text" id="userSearch" class="search__input"

             placeholder="Filter by username, telegram ID, or server number…"

             oninput="filterUsers()">
      <span class="search__hint mono" id="userCount">— records</span>
    </div>

    <div id="usersContent" class="placeholder mono">
      Enter credentials to load user registry.
    </div>
  </div>
</section>

<div class="divider divider--ultra"></div>

<footer class="footer">
  <div class="footer__inner">
    <div class="mono footer__line">ServerClass / Admin Console</div>
    <div class="mono footer__line">Auto-refresh every <span id="pollInterval">{{ poll_interval }}</span>s · Socket.IO</div>
    <div class="mono footer__line">MMXXV</div>
  </div>
</footer>

<script src="https://cdn.socket.io/4.7.5/socket.io.min.js"></script>
<script>

  window.__POLL_INTERVAL__ = {{ poll_interval }};

</script>
<script src="{{ url_for('static', filename='js/dashboard.js') }}"></script>
</body>
</html>