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
|
|
@ -71,6 +71,7 @@
|
|||
.pick ul.opts li.none { color:var(--pico-muted-color); cursor:default; }
|
||||
[data-show] { display:none !important; }
|
||||
.vcard[data-display="cassette"] [data-show~="cassette"],
|
||||
.vcard[data-display="card"] [data-show~="cassette"],
|
||||
.vcard[data-display="sound"] [data-show~="sound"],
|
||||
.vcard[data-display="video"] [data-show~="video"] { display:flex !important; }
|
||||
</style>
|
||||
|
|
@ -114,7 +115,7 @@
|
|||
</summary>
|
||||
|
||||
<% for (const v of t.variations) {
|
||||
const display = v.video ? 'video' : v.polaroid ? 'cassette' : 'sound'; %>
|
||||
const display = v.video ? 'video' : !v.polaroid ? 'sound' : v.look === 'card' ? 'card' : 'cassette'; %>
|
||||
<div class="vcard<%= v.enabled ? '' : ' off' %>" data-id="<%= v.id %>" data-display="<%= display %>">
|
||||
<div class="vrow">
|
||||
<input type="checkbox" role="switch" data-f="enabled" <%= v.enabled ? 'checked' : '' %> title="On: this variation can play">
|
||||
|
|
@ -129,8 +130,8 @@
|
|||
</div>
|
||||
|
||||
<div class="vrow">
|
||||
<span class="seg" title="Cassette: tape alert with sound. Sound only: just the sound. Video: full-screen video on the ?parts=video overlay">
|
||||
<% for (const [val, lbl] of [['cassette', 'Cassette'], ['sound', 'Sound only'], ['video', 'Video']]) { %>
|
||||
<span class="seg" title="Card: plain alert card with sound. Cassette: tape alert with sound. Sound only: just the sound. Video: full-screen video on the ?parts=video overlay">
|
||||
<% for (const [val, lbl] of [['card', 'Card'], ['cassette', 'Cassette'], ['sound', 'Sound only'], ['video', 'Video']]) { %>
|
||||
<label><input type="radio" name="display-<%= v.id %>" data-f="display" value="<%= val %>" <%= display === val ? 'checked' : '' %>><%= lbl %></label>
|
||||
<% } %>
|
||||
</span>
|
||||
|
|
@ -147,7 +148,7 @@
|
|||
|
||||
<div class="vrow" data-show="cassette">
|
||||
<input type="hidden" data-f="art" value="<%= v.art || '' %>">
|
||||
<span class="pick" data-pick="art" title="Sticker in the cassette's corner"></span>
|
||||
<span class="pick" data-pick="art" title="Picture on the card / sticker in the cassette's corner"></span>
|
||||
<span class="field grow"><input data-f="caption" value="<%= v.caption %>" title="Text after the viewer's name on the paper strip. {reward} = reward name, {variation} = this variation's name. The viewer's typed message is added automatically."></span>
|
||||
<input type="hidden" data-f="tts_voice_id" value="<%= v.tts_voice_id || '' %>">
|
||||
<span class="pick" data-pick="tts_voice_id" title="Read the viewer's typed text aloud (voice from the TTS page), shown as a big paper note. The voice replaces the sound. The reward needs 'Require Viewer to Enter Text' on Twitch."></span>
|
||||
|
|
@ -184,7 +185,8 @@
|
|||
tts_voice_id: <%- JSON.stringify(ttsVoices.map(t => ({ url: String(t.id), label: t.name }))) %>,
|
||||
};
|
||||
const ADD = { sound: '+ sound', video: '+ video', art: '+ sticker', tts_voice_id: '+ TTS voice' };
|
||||
const DEFAULT_STICKER = { url: '', label: 'headset Streamer (default)', img: '/alerts/stickers/default-sticker.png' };
|
||||
const THEME_STICKER = <%- JSON.stringify(theme.defaultSticker || '') %>; // Actions → Alerts → Default redeem sticker
|
||||
const DEFAULT_STICKER = { url: '', label: 'default picture', img: THEME_STICKER || '/alerts/art/placeholder.svg' };
|
||||
const DRAFT_KEY = 'redeemsDraft', OPEN_KEY = 'redeemsOpen';
|
||||
const stateEl = document.getElementById('save-state');
|
||||
const dirty = new Set();
|
||||
|
|
@ -224,7 +226,7 @@
|
|||
c.dataset.display = o.display;
|
||||
c.classList.toggle('off', !o.enabled);
|
||||
c.querySelector('[data-vol]').textContent = Math.round(o.volume * 100) + '%';
|
||||
const ttsOn = !!o.tts_voice_id && o.display === 'cassette';
|
||||
const ttsOn = !!o.tts_voice_id && (o.display === 'cassette' || o.display === 'card');
|
||||
c.querySelector('[data-pick="sound"]').classList.toggle('disabled', ttsOn);
|
||||
c.querySelectorAll('[data-pick]').forEach(renderPick);
|
||||
chances(c.closest('[data-trigger]'));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue