Add grid item size setting and UI
Introduce a persistent gridItemSize user setting (1-10) across the app. Updates include: types (UserSettings.gridItemSize), API mappings (grid_item_size in ApiSettingsItem, CreateSettingsInput, convertApiToSettings, convertSettingsToApi), default setting values, and the App handler (handleGridItemSizeChange) to save changes. UI additions: slider control in SettingsView, slider and value in BrowseView (with syncing to incoming API settings), passing the prop and change callback from App, and a mapping from slider values to responsive Tailwind grid column classes so the grid layout adapts to the chosen size. Also added syncing of itemsPerPage in BrowseView and CastView with API-loaded settings.
This commit is contained in:
@@ -100,6 +100,7 @@ export interface UserSettings {
|
||||
id?: number;
|
||||
enabledCategories: MediaCategory[];
|
||||
itemsPerPage: number;
|
||||
gridItemSize: number; // 1-10 scale
|
||||
defaultView: 'grid' | 'list';
|
||||
showAdultContent: boolean;
|
||||
autoPlayTrailers: boolean;
|
||||
|
||||
Reference in New Issue
Block a user