broke up monolithic structure

This commit is contained in:
Simon
2026-02-09 13:27:08 +00:00
parent f06a7cd3d0
commit ee1cb511df
10 changed files with 1195 additions and 1125 deletions

23
frontend/js/state.js Normal file
View File

@@ -0,0 +1,23 @@
window.App = window.App || {};
// Centralized runtime state for pagination, player, and UI behavior.
App.state = {
currentPage: 1,
perPage: 12,
renderedVideoIds: new Set(),
hasNextPage: true,
isLoading: false,
hlsPlayer: null,
currentLoadController: null,
errorToastTimer: null,
playerMode: 'modal',
playerHome: null,
onFullscreenChange: null,
onWebkitEndFullscreen: null
};
// Local storage keys used across modules.
App.constants = {
FAVORITES_KEY: 'favorites',
FAVORITES_VISIBILITY_KEY: 'favoritesVisible'
};