/stats (dashboard nav): totals, chat messages and watch hours per day (30 days, single-series bar charts with hover), leaderboards for points (with level), watch time, chat, bits, channel points spent; top emotes (with images) and commands. /stats/viewer?q=: one viewer's points breakdown, watch time, messages, check-ins, emotes, commands, actions, and 'Forget this viewer' (removal requests: stats, watch time, raw chat, activity log). Bots (Hidden chatters) left out of everything shown. src/points.js: the agreed point values in one place, calculated from the stats. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
52 lines
2 KiB
Text
52 lines
2 KiB
Text
<!DOCTYPE html>
|
|
<html lang="en" data-theme="dark">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>HeyStreamer</title>
|
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg">
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.min.css">
|
|
<style>
|
|
nav.container-fluid { padding-block: 0.5rem; }
|
|
.nav-brand { font-weight: 700; font-size: 1.1rem; text-decoration: none; color: inherit; }
|
|
nav ul li a { font-size: 0.9rem; }
|
|
.badge { display: inline-block; padding: 0.15em 0.5em; border-radius: 999px; font-size: 0.75rem; font-weight: 600; }
|
|
.badge-green { background: #1a7a1a; color: #a8f0a8; }
|
|
.badge-red { background: #7a1a1a; color: #f0a8a8; }
|
|
.badge-grey { background: #333; color: #aaa; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<nav class="container-fluid">
|
|
<ul>
|
|
<li><a class="nav-brand" href="/">HeyStreamer</a></li>
|
|
</ul>
|
|
<ul>
|
|
<li><a href="/">Dashboard</a></li>
|
|
<li><a href="/redeems">Redeems</a></li>
|
|
<li><a href="/tts">TTS</a></li>
|
|
<li><a href="/actions">Actions</a></li>
|
|
<li><a href="/media">Media</a></li>
|
|
<li><a href="/stats">Stats</a></li>
|
|
<li><a href="/settings">Settings</a></li>
|
|
<% if (locals.user) { %>
|
|
<li><a href="/auth/logout">Logout (<%= user.login %>)</a></li>
|
|
<% } %>
|
|
</ul>
|
|
</nav>
|
|
<main class="container">
|
|
<%- body %>
|
|
</main>
|
|
<script>
|
|
// Two-click delete instead of a browser confirm() dialog: first click arms the button, second submits.
|
|
document.addEventListener('click', e => {
|
|
const b = e.target.closest('button[data-confirm]');
|
|
if (!b) return;
|
|
if (b.dataset.armed) { b.form.requestSubmit(); return; }
|
|
b.dataset.armed = '1'; b.dataset.label = b.textContent; b.textContent = 'Really delete?';
|
|
b.style.fontWeight = '700';
|
|
setTimeout(() => { delete b.dataset.armed; b.textContent = b.dataset.label; b.style.fontWeight = ''; }, 4000);
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|