Add user settings UI and API integration
Introduce a full user settings feature: add a SettingsView component and UserSettings type, plus API helpers to fetch, create, and update settings (convertors between API and app shapes). App now loads settings on mount, persists category toggles to the API, exposes a /settings route, and passes itemsPerPage into BrowseView and CastView. Header gains a settings icon/link and BrowseView/CastView update pagination option defaults. This enables centralized library/display/content preferences and syncs them with the backend.
This commit is contained in:
13
src/types.ts
13
src/types.ts
@@ -95,3 +95,16 @@ export interface AdultSpecifics {
|
||||
measurements?: string | null;
|
||||
shoe_size?: number | null;
|
||||
}
|
||||
|
||||
export interface UserSettings {
|
||||
id?: number;
|
||||
enabledCategories: MediaCategory[];
|
||||
itemsPerPage: number;
|
||||
defaultView: 'grid' | 'list';
|
||||
showAdultContent: boolean;
|
||||
autoPlayTrailers: boolean;
|
||||
language: string;
|
||||
theme: 'light' | 'dark' | 'system';
|
||||
createdAt?: string;
|
||||
updatedAt?: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user