diff --git a/README.es.md b/README.es.md index 2b8cb32..cecabd4 100644 --- a/README.es.md +++ b/README.es.md @@ -168,6 +168,8 @@ En el panel, la página «Fuentes del programa de emisión» lista todas con su | Agradecimientos | `http://127.0.0.1:4500/widget/thanks` | 900×200 | | Entrevista | `http://127.0.0.1:4500/widget/interview` | 1920×1080 | +**Últimos y ticker.** Son dos widgets separados en **Widgets**. «Últimos» muestra el último apoyo de cada tipo marcado (seguidor, sub, bits, raid, Super Chat, miembro o cualquier evento), con una etiqueta opcional (`widgets.latest.label`; vacía no se muestra, clase `.label`). El ticker, en cambio, recorre los eventos más recientes de sus tipos, así que pueden salir varias subs seguidas. Usa los tipos de «Últimos» hasta que eliges los suyos (`widgets.ticker.items`, mismos valores). + **Entrevista.** Capa a pantalla completa para el ítem activo y aprobado de la entrevista activa (ver `docs/entrevista-formato.md`): la pregunta en una tarjeta inferior sobre su imagen, vídeo local, reproductor de YouTube (desde el minuto guardado) o tarjeta de post, con la fuente en cada ítem que lleve media. Sin ítem activo la capa queda vacía. En **Widgets › Se manejan en directo › Entrevista** creas o importas entrevistas, editas y ordenas rondas y preguntas y pulsas **Guardar** para aplicar el borrador. La cabecera del detalle elige o para la entrevista activa y controla la capa; el dock también permite pararla sin borrarla. `POST /api/interviews/stop` hace lo mismo y se puede repetir sin riesgo. En **Capa** están la URL y la vista previa de ejemplo. Las notas privadas nunca salen en la capa. Pruébala con `?demo`. **Agradecimientos sin conexión.** Esta capa muestra un seguidor pendiente cada vez y puede terminar con el recuento anónimo de YouTube. En Widgets › Agradecimientos eliges plataformas, todo el tiempo / desde el último directo archivado / un número de días, máximo de nombres e intervalo. Las fechas desconocidas se incluyen; si no hay directos archivados, la ventana desde el último no tiene corte. Sin pendientes la capa queda transparente. Las acciones individuales y en bloque con confirmación se aplican al momento; el bloque marca solo los nombres y registros anónimos seleccionados con los ajustes guardados, no los demás pendientes. diff --git a/README.md b/README.md index 4af5f4f..e19f8d8 100644 --- a/README.md +++ b/README.md @@ -169,6 +169,8 @@ In the panel, the «Fuentes del programa de emisión» page lists all of them wi | Interview | `http://127.0.0.1:4500/widget/interview` | 1920×1080 | | On-screen messages | `http://127.0.0.1:4500/widget/rotator` | 1200×120 | +**Latest and ticker.** They are separate widgets in **Widgets**. «Latest» shows the last supporter of each selected type (follower, sub, bits, raid, Super Chat, member or any event), with an optional label (`widgets.latest.label`; empty shows none, class `.label`). The ticker scrolls the most recent events of its types instead, so several subs can appear at once. It uses the «Latest» types until you pick its own (`widgets.ticker.items`, same values). + **Preview in your broadcast program:** in **Widgets › Chat**, «Simular mensajes en Meld» makes every real chat source (the default chat, its variants and custom overlay slots) play the same sample messages as the panel preview for 2 minutes, then return to the real chat. A source loaded during the simulation joins it. Nothing is added to the chat, the history or the metrics. API: `POST /api/chat/preview` with `{ "on": true }` (optional `"seconds"`, 1–600) or `{ "on": false }`; `GET /api/chat/preview` returns `{ on, until }`. MCP: `vista_previa_chat`. **Interview.** Fullscreen layer for the active, approved item of the active interview (see `docs/entrevista-formato.md`): the question on a card at the bottom over its image, local video, YouTube player (starting at the saved minute) or social post card, with the source shown on every item that has media. Without an active item the layer is empty. In **Widgets › Se manejan en directo › Entrevista**, create or import interviews, edit and reorder rounds and questions, and press **Guardar** to save the draft. The detail header selects or stops the active interview and controls the live layer; the dock can also stop it without deleting it. `POST /api/interviews/stop` does the same and is safe to repeat. **Capa** has its URL and demo preview. Private notes never appear on the layer. Try it with `?demo`. diff --git a/app/src/panel/Sidebar.tsx b/app/src/panel/Sidebar.tsx index 21f3e7f..431ce01 100644 --- a/app/src/panel/Sidebar.tsx +++ b/app/src/panel/Sidebar.tsx @@ -42,7 +42,7 @@ export function Sidebar({ current }: { current: string }) { const live = (t: string, label?: string) => {t}; const warns = alertWarnings(s).length; const widgetTail = I.vote && I.giveaway?.open ? live('2 activos', 'votación en curso y sorteo abierto') - : I.vote ? live('votando', 'votación en curso') : I.giveaway?.open ? live('sorteo', 'sorteo abierto') : num(12); + : I.vote ? live('votando', 'votación en curso') : I.giveaway?.open ? live('sorteo', 'sorteo abierto') : num(13); const groups: [string, string, Item[]][] = [ ['directo', 'En directo', [ { href: '#/directo', label: 'Directo', tail: s.status?.meld?.streaming ? live('●', 'en directo') : null }, diff --git a/app/src/panel/views/Widgets.tsx b/app/src/panel/views/Widgets.tsx index 3f83783..801f2bf 100644 --- a/app/src/panel/views/Widgets.tsx +++ b/app/src/panel/views/Widgets.tsx @@ -19,13 +19,15 @@ import { InterviewSettings } from './InterviewWidget'; export const origin = () => location.origin; const INFO: Record = { chat: { title: 'Chat en pantalla', path: '/widget/chat', size: '600×900', w: 600, h: 900, desc: 'El chat de Twitch y YouTube juntos, con tu estilo. Ideal para la escena de solo cámara.' }, - latest: { title: 'Últimos y ticker', path: '/widget/latest', size: '1400×200', w: 1400, h: 260, desc: 'Último seguidor, sub, bits… y una banda que recorre los últimos apoyos.' }, + latest: { title: 'Últimos', path: '/widget/latest', size: '1400×200', w: 1400, h: 260, desc: 'El último seguidor, sub, bits… de cada tipo que marques.' }, + ticker: { title: 'Ticker', path: '/widget/ticker', size: '1920×64', w: 1920, h: 120, desc: 'Una banda que recorre los apoyos más recientes de los tipos que elijas.' }, viewers: { title: 'Espectadores', path: '/widget/viewers', size: '900×160', w: 900, h: 160, desc: 'Espectadores a la vez en Twitch y YouTube, por separado y en total. Se actualiza solo mientras emites.' }, rotator: { title: 'Mensajes en pantalla', path: '/widget/rotator', size: '1200×120', w: 1200, h: 120, desc: 'Una lista de mensajes que van rotando en pantalla cada cierto tiempo, en orden o al azar. Son distintos de los mensajes programados del chat.' }, thanks: { title: 'Agradecimientos', path: '/widget/thanks', size: '900×200', w: 900, h: 200, desc: 'Agradece a quienes te siguieron mientras antena estaba cerrada.' }, interview: { title: 'Entrevista', path: '/widget/interview', size: '1920×1080', w: 1920, h: 1080, desc: 'La pregunta de la entrevista a pantalla completa, con su imagen, vídeo, YouTube o post y la fuente.' }, credits: { title: 'Créditos', path: '/widget/credits', size: '1920×1080', w: 1920, h: 1080, desc: 'Créditos finales con todos los que han apoyado en el directo.' }, }; +const SUPPORT_TYPES: [string, string][] = [['follow', 'Seguidor'], ['sub', 'Suscripción'], ['cheer', 'Bits'], ['raid', 'Raid'], ['superchat', 'Super Chat'], ['member', 'Miembro'], ['any', 'Cualquier evento']]; const q = (p: string, mode: string) => `${p}${p.includes('?') ? '&' : '?'}${mode}`; function WField({ w, f, label, type = 'text', ...rest }: { w: string; f: string; label: ReactNode; type?: string; [k: string]: unknown }) { @@ -35,8 +37,13 @@ function WField({ w, f, label, type = 'text', ...rest }: { w: string; f: string; if (type === 'css') return