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:
Lars Behrends
2026-04-10 23:31:24 +02:00
parent 444c908449
commit f482807387
6 changed files with 112 additions and 11 deletions

View File

@@ -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;