diff --git a/index.js b/index.js index 20e3b8c..c6612c8 100644 --- a/index.js +++ b/index.js @@ -5,7 +5,7 @@ const fs = require('fs'); const path = require('path'); const app = express(); app.use(express.json()); -const PORT = 3000; +const PORT = 3010; // ─── Persistence ────────────────────────────────────────────────────────────── @@ -584,6 +584,69 @@ app.get('/', async (req, res) => { } .btn-add-url:hover { border-color: #6366f1; color: #a5b4fc; } .modal { max-width: 540px !important; max-height: 90vh; overflow-y: auto; } + + /* ── Last-Hour History Bar ── */ + .history-bar-wrap { + background: #1e293b; + border: 1px solid #334155; + border-radius: 14px; + padding: 1rem 1.5rem; + margin-bottom: 1rem; + } + .history-bar-header { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 0.5rem; + } + .history-bar-title { + font-size: 0.7rem; + font-weight: 600; + text-transform: uppercase; + letter-spacing: 0.07em; + color: #64748b; + } + .history-bar-legend { + display: flex; + gap: 0.85rem; + align-items: center; + font-size: 0.7rem; + color: #64748b; + } + .history-bar-legend span { display: flex; align-items: center; gap: 0.3rem; } + .legend-dot { width: 8px; height: 8px; border-radius: 2px; display: inline-block; } + .history-bar { + width: 100%; + height: 28px; + border-radius: 6px; + overflow: hidden; + display: flex; + background: #334155; + } + .history-bar-seg--up { background: #4ade80; height: 100%; } + .history-bar-seg--down { background: #f87171; height: 100%; } + .history-bar-seg--unknown { background: #334155; height: 100%; } + .history-bar-timestamps { + display: flex; + justify-content: space-between; + margin-top: 0.35rem; + font-size: 0.68rem; + color: #475569; + } + .history-range-btns { display: flex; gap: 0.25rem; } + .history-range-btn { + background: #0f172a; + border: 1px solid #334155; + color: #64748b; + border-radius: 6px; + padding: 0.2rem 0.55rem; + font-size: 0.72rem; + font-weight: 600; + cursor: pointer; + transition: background 0.12s, color 0.12s, border-color 0.12s; + } + .history-range-btn:hover { background: #1e3a5f; color: #93c5fd; } + .history-range-btn.active { background: #1e3a5f; border-color: #3b82f6; color: #3b82f6; }
@@ -607,6 +670,29 @@ app.get('/', async (req, res) => { + + +