Commit Graph

17 Commits

Author SHA1 Message Date
Matt Walsh
6f97e3d2b9 add volume control slider and overhaul settings close #109 2025-11-10 12:54:54 -06:00
Eddy G
7f7cb96231 Add STATIC environment variable for browser-only deployment mode
Implement STATIC=1 environment variable to enable browser-only deployment
without proxy server infrastructure. Uses WS4KP_SERVER_AVAILABLE flag to
distinguish between server-backed and static deployments for proper URL
rewriting and User-Agent header handling.

- Add STATIC env var to skip proxy route registration at startup
- Inject WS4KP_SERVER_AVAILABLE flag via EJS template based on STATIC mode
- Update fetch.mjs to conditionally send User-Agent headers based on server availability
- Update url-rewrite.mjs to skip proxy rewriting when server is unavailable
- Use renderIndex helper for consistent template data across dev/prod modes
- Improve music playlist logging

Benefits of integrated approach:
- Single environment variable controls both server and client behavior
- Flag injection happens once at render time, not on every request
- No runtime HTML string manipulation overhead
- Clean separation between server-backed and static deployment logic
- Same codebase supports both deployment modes without duplication

Static mode (STATIC=1): Direct API calls to external services, no caching
Server mode (default): Local proxy with caching and API request observability
2025-06-26 20:10:11 -04:00
Eddy G
ebface1749 Add comment about not needing to use safeJson()
- Fix indentation in media.mjs
2025-06-24 23:53:44 -04:00
Matt Walsh
543a8df9a2 Merge branch 'static-docker' of github.com:rmitchellscott/ws4kp into rmitchellscott-static-docker 2025-06-19 21:56:39 -05:00
Mitchell Scott
51bb9696b0 add x-weatherstar header for specific 404 detection 2025-06-13 22:14:14 -06:00
Mitchell Scott
9f94ef83ba human readable song title 2025-06-13 10:24:03 -06:00
Mitchell Scott
2827913d42 add client-side generation for playlist.json for static builds 2025-06-13 08:37:01 -06:00
Matt Walsh
852eff8de6 add basic volume control #109 2025-06-12 20:53:23 -05:00
Matt Walsh
5e3b917023 add music track names to info block close #100 2025-06-03 21:09:55 -05:00
Matt Walsh
0a388cdb83 clean up settings constructor 2025-04-08 10:40:36 -05:00
Alex White
38db5cb6a6 Check currentTrack against availableFiles length 2025-04-05 00:04:37 -04:00
Matt Walsh
64215a117c auto play music 2025-03-24 21:49:41 -05:00
Matt Walsh
e9164d8c36 Updates for default folder 2025-03-24 18:24:49 -05:00
Matt Walsh
2b4aad3c48 playlist implementation 2025-03-23 21:17:08 -05:00
Matt Walsh
f0600d92ed music toggles on and off 2025-03-23 20:28:04 -05:00
Matt Walsh
06b8dbc959 playlist randomized 2025-03-23 18:42:48 +01:00
Matt Walsh
dc9a08bdc5 icon toggles 2025-03-22 15:10:06 +01:00