Stats per stream and period, public stats page, dashboard settings, Card alert style
Statistics - Per day and per stream statistics (src/periodstats.js, one generic stat_day table), backfilled once from the older tables; Stream / Week / Month / Year / All time views, Community and Streams tabs. - Viewer count every 5 minutes and title / category history per stream (EventSub channel.update): viewer graph, games played (donut), games in the streams list. - Twitch sync (src/twitchsync.js): followers with follow dates, current subs, mods, VIPs, all-time bits, channel emotes, past streams from VODs. Twitch analytics CSV import (src/twitchcsv.js). - Public stats page on its own host (Settings -> Stats and data): no message text, no bots, !hideme / !showme opt-out. Viewer page: roles, follow age, sub status, bits, a menu for rarely used actions. - StreamElements watch-time importer removed (already imported minutes stay as a baseline). Dashboard - Settings and Actions with a left sidebar; each settings page saves only its own fields. Connections (Twitch, StreamElements token now set here, HUDFX), OBS links (hidden behind an eye toggle) with a link builder, Chat (sound picked from the media library), TTS, Stats and data, Backup (export / import the whole setup), Advanced. Time zone setting for the stats pages. - Actions -> Alerts: alert style, pictures, sounds, bits tiers and card colours, stored in the database (src/theme.js); an old file-based theme is imported once. Alert preview page (/actions/alerts/preview, tools/preview/export.js for a static copy). - Old /actions page removed; Actions = Redeems / Alerts / TTS voices / Media. Alerts - New plain Card style for everyone (public/alerts/card.js); Polaroid, Cassette and the TTS letter stay as optional looks. Redeem variations can be Card, Cassette, Sound only or Video. Repo - No channel data in git: the channel's art, stickers and sounds stay on disk (gitignored) and are picked in the dashboard; examples for the server config (apache.example.sh, .env.example). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
5bf4bffaa0
commit
c481ca92cb
57 changed files with 3080 additions and 774 deletions
64
views/settings/connections.ejs
Normal file
64
views/settings/connections.ejs
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
<h2 class="set-h">Connections</h2>
|
||||
<p class="set-intro">Services HeyStreamer talks to.</p>
|
||||
<%- include('_flash') %>
|
||||
|
||||
<div class="set-card">
|
||||
<h3>Twitch</h3>
|
||||
<div class="set-row">
|
||||
<div class="lbl">Account</div>
|
||||
<div><%= user ? (user.display_name || user.login) : 'not logged in' %></div>
|
||||
</div>
|
||||
<div class="set-row">
|
||||
<div class="lbl">Events (EventSub)<small>Follows, subs, bits, rewards, raids, chat, stream on / off.</small></div>
|
||||
<div>
|
||||
<% if (eventsub.connected) { %><span class="badge badge-green">connected</span>
|
||||
<% } else if (eventsub.running) { %><span class="badge badge-grey">connecting…</span>
|
||||
<% } else { %><span class="badge badge-red">not running</span><% } %>
|
||||
<% if (eventsub.lastEventAt) { %> <small>last event <%= eventsub.lastEventAt.slice(0, 16).replace('T', ' ') %> UTC</small><% } %>
|
||||
<% if (eventsub.failed.length) { %><p><small style="color:#f88">Not allowed: <%= eventsub.failed.join(', ') %>. Log in again to give HeyStreamer the missing permission.</small></p><% } %>
|
||||
<% if (eventsub.subscribed.length) { %><details style="margin:.4rem 0 0;"><summary><small>Listening to <%= eventsub.subscribed.length %> events</small></summary><small><%= eventsub.subscribed.join(', ') %></small></details><% } %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="set-row">
|
||||
<div class="lbl">Fix it<small>Log in again after new features ask for more permissions, or reconnect if alerts stop.</small></div>
|
||||
<div class="set-inline">
|
||||
<a href="/auth/twitch" role="button" class="btn-auto">Log in again with Twitch</a>
|
||||
<form method="POST" action="/settings/connections/reconnect"><button type="submit" class="outline btn-auto">Reconnect</button></form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="set-card">
|
||||
<h3>StreamElements tips</h3>
|
||||
<div class="set-row">
|
||||
<div class="lbl">Status</div>
|
||||
<div>
|
||||
<% if (!se.enabled) { %><span class="badge badge-grey">off</span> <small>no token</small>
|
||||
<% } else if (se.subscribed) { %><span class="badge badge-green">connected</span><% if (se.lastTipAt) { %> <small>last tip <%= se.lastTipAt %></small><% } %>
|
||||
<% } else { %><span class="badge badge-grey">connecting…</span><% } %>
|
||||
<% if (se.error) { %><br><small style="color:#f88"><%= se.error %></small><% } %>
|
||||
<% if (se.source === 'env') { %><br><small>Token comes from <code>.env</code> (SE_JWT). Saving one here replaces it.</small><% } %>
|
||||
</div>
|
||||
</div>
|
||||
<form method="POST" action="/settings/connections/se" class="set-row">
|
||||
<div class="lbl">JWT token<small>StreamElements → your avatar → Channel settings → Show secrets → JWT Token. Kept secret: it is never shown again here.</small></div>
|
||||
<div class="set-inline">
|
||||
<input type="password" id="se-jwt" name="se_jwt" autocomplete="off" placeholder="<%= settings.se_jwt ? '•••••••• (saved: paste a new one to replace it)' : 'paste the JWT token' %>" style="flex:1; min-width:220px;">
|
||||
<button type="button" class="outline eye" data-reveal="#se-jwt" title="Show what you typed">👁</button>
|
||||
<button type="submit" class="btn-auto">Save and connect</button>
|
||||
<% if (settings.se_jwt) { %><button type="submit" name="clear" value="1" class="outline btn-auto" data-confirm="Really remove?">Remove token</button><% } %>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<form method="POST" action="/settings/hudfx" class="set-card">
|
||||
<h3>HUDFX</h3>
|
||||
<div class="set-row">
|
||||
<div class="lbl">HUDFX overlay URL<small>Then add <code>&ext=hudfx</code> to an OBS source link: HUDFX effects play inside that overlay. Empty = off.</small></div>
|
||||
<div class="set-inline">
|
||||
<input type="password" id="hudfx-url" name="hudfx_overlay_url" value="<%= settings.hudfx_overlay_url || '' %>" placeholder="https://overlays.hudfx.io/overlay/…" autocomplete="off" style="flex:1; min-width:220px;">
|
||||
<button type="button" class="outline eye" data-reveal="#hudfx-url" title="Show">👁</button>
|
||||
<button type="submit" class="btn-auto">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
Loading…
Add table
Add a link
Reference in a new issue