refactor(app): externalize watch page assets and modularize player scripts #19

Merged
wandabastyle merged 6 commits from cache into main 2026-04-29 00:24:59 +02:00
wandabastyle commented 2026-04-29 00:10:16 +02:00 (Migrated from github.com)

Summary

  • Move watch page rendering out of the giant inline src/app.rs string into src/templates/watch.html plus static watch.css/JS assets.
  • Introduce window.__WATCH_CONFIG__ bootstrap so Rust remains the SSR source of runtime values (channel, manifestUrl, relay) while static scripts handle UI logic.
  • Split the former monolithic web/static/watch.js into focused modules (watch-core.js, watch-player.js, watch-emotes.js, watch-chat.js, watch-init.js) and update template script ordering.

Verification

  • cargo check
## Summary - Move watch page rendering out of the giant inline `src/app.rs` string into `src/templates/watch.html` plus static `watch.css`/JS assets. - Introduce `window.__WATCH_CONFIG__` bootstrap so Rust remains the SSR source of runtime values (`channel`, `manifestUrl`, `relay`) while static scripts handle UI logic. - Split the former monolithic `web/static/watch.js` into focused modules (`watch-core.js`, `watch-player.js`, `watch-emotes.js`, `watch-chat.js`, `watch-init.js`) and update template script ordering. ## Verification - `cargo check`
Sign in to join this conversation.
No description provided.