feat: update settings page and theme context for user preferences

- Replaced `SettingsPageClient` with `SettingsIndexPageClient` to fetch and display user preferences on the settings page.
- Integrated `userPreferencesService` to retrieve all preferences asynchronously, enhancing data handling.
- Refactored theme management in `ThemeContext` to use `updateViewPreferences` for saving theme changes, improving error handling and user feedback.
- Marked the task for creating dedicated config sub-pages as complete in TODO.md.
This commit is contained in:
Julien Froidefond
2025-09-18 13:50:49 +02:00
parent 93e72013f9
commit 8ce1eef6ae
10 changed files with 720 additions and 9 deletions

View File

@@ -0,0 +1,12 @@
import { userPreferencesService } from '@/services/user-preferences';
import { GeneralSettingsPageClient } from '@/components/settings/GeneralSettingsPageClient';
// Force dynamic rendering for real-time data
export const dynamic = 'force-dynamic';
export default async function GeneralSettingsPage() {
// Fetch data server-side
const preferences = await userPreferencesService.getAllPreferences();
return <GeneralSettingsPageClient initialPreferences={preferences} />;
}