File size: 3,076 Bytes
24fb9f5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
<!DOCTYPE html>
<html lang='es'>
<head>
    <meta charset='UTF-8'>
    <title>ROW-PROXY // FRENTE ORIENTAL</title>
    <style>
        body { background: #0d0d0c; color: #d4d4d4; font-family: 'Courier New', monospace; padding: 20px; display: flex; justify-content: center; align-items: center; min-height: 100vh; }
        .monitor { width: 100%; max-width: 900px; background: rgba(26, 18, 0, 0.4); border: 1px solid #3a2a00; padding: 30px; box-shadow: inset 0 0 50px #000; }
        .section-header { color: #7a6228; font-size: 11px; letter-spacing: 4px; text-align: center; margin-bottom: 20px; border-bottom: 1px solid #2a2a1f; padding-bottom: 10px; }
        h2 { color: #ff3333; font-size: 16px; letter-spacing: 3px; margin-bottom: 25px; text-align: center; font-weight: bold; }
        h2::before { content: '★ '; }
        .ranking-row { display: flex; align-items: center; gap: 20px; margin-bottom: 15px; }
        .name { color: #daa520; width: 140px; font-size: 14px; font-weight: bold; flex-shrink: 0; text-transform: uppercase; }
        .bar-container { flex-grow: 1; background: #080808; height: 18px; border: 1px solid #2a2a1f; }
        .bar { background: #cc0000; height: 100%; transition: width 1s ease; }
        .tokens { color: #c8a84b; width: 120px; text-align: right; font-size: 12px; font-weight: bold; }
        .url-box { margin-top: 40px; padding-top: 20px; border-top: 1px solid #2a2a1f; text-align: center; }
        .url-val { color: #e8c86b; font-size: 13px; font-weight: bold; }
    </style>
</head>
<body>
    <div class='monitor'>
        <div class='section-header'>// HOI4 - NO STEP BACK - MONITOREO ESTRATÉGICO</div>
        <h2>ESTADO DE COMANDANTES (TOKENS)</h2>
        <div id='ranking-frente'></div>
        <div class='url-box'>
            <div style='color: #7a6228; font-size: 10px; margin-bottom: 5px;'>PUNTO DE ACCESO SEGURO</div>
            <div class='url-val'>https://moge-row-row-proxy.hf.space/v1</div>
        </div>
    </div>
    <script>
        async function update(){
            try {
                const r = await fetch(window.location.origin + '/stats');
                const d = await r.json();
                const c = document.getElementById('ranking-frente');
                const e = Object.entries(d.keys || {}).map(([n, i]) => ({name: n, tokens: i.tokens || 0})).sort((a, b) => b.tokens - a.tokens);
                if (e.length === 0) { c.innerHTML = '<div style="text-align:center;color:#7a6228">ESPERANDO REPORTE...</div>'; return; }
                const m = Math.max(...e.map(x => x.tokens), 1);
                c.innerHTML = e.map(u => `
                    <div class='ranking-row'>
                        <div class='name'>${u.name}</div>
                        <div class='bar-container'><div class='bar' style='width:${(u.tokens/m)*100}%'></div></div>
                        <div class='tokens'>${u.tokens.toLocaleString()} TKNS</div>
                    </div>`).join('');
            } catch(e) {}
        }
        setInterval(update, 5000); update();
    </script>
</body>
</html>