TTS redeems, skip button, per-source chat placement

- Redeem variations can have a TTS voice: the viewer's text is cleaned
  (links out, repeats collapsed, max length, blocked words -> not read),
  spoken as "<name> says: ..." and shown as the big paper note; the
  variation's sound is not played when TTS is on (picker greyed out)
- Settings: TTS max length, say-the-name, blocked words (never sent to
  overlay pages: db.getOverlaySettings)
- Dashboard "Skip current alert" -> /alerts/skip -> overlay skips it
- db.migrate()/addColumn: new columns on existing databases
- Chat: ?chat=left,top,width,height and ?chatflow=up per browser source
  (e.g. the Intermission panel); default unchanged

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Bashy 2026-11-21 14:34:41 +02:00
parent b5a81bdb15
commit 4fda6060bf
16 changed files with 228 additions and 28 deletions

View file

@ -2,6 +2,7 @@ const express = require('express');
const router = express.Router();
const alerts = require('../alerts');
const twitch = require('../twitch');
const ws = require('../ws');
// POST /alerts/test/:key: send a sample alert to every connected overlay (dashboard test buttons)
router.post('/test/:key', (req, res) => {
@ -9,6 +10,13 @@ router.post('/test/:key', (req, res) => {
res.status(ok ? 200 : 404).json({ ok });
});
// POST /alerts/skip: stop the alert on screen right now (e.g. a TTS message), the queue carries on
router.post('/skip', (req, res) => {
ws.broadcast({ type: 'alert_skip' });
console.log('[alerts] skip requested from the dashboard');
res.json({ ok: true });
});
// POST /alerts/raid/start {target}: start a raid on Twitch and show the send-off card until it happens
router.post('/raid/start', async (req, res) => {
const me = twitch.getUser();