feat: enhance theme management and customization options

- Added support for multiple themes (dracula, monokai, nord, gruvbox, tokyo_night, catppuccin, rose_pine, one_dark, material, solarized) in the application.
- Updated `setTheme` function to accept the new `Theme` type, allowing for more flexible theme selection.
- Introduced `ThemeSelector` component in GeneralSettingsPage for user-friendly theme selection.
- Modified `ThemeProvider` to handle user preferred themes and improved theme toggling logic.
- Updated CSS variables in `globals.css` to support new themes, enhancing visual consistency across the app.
This commit is contained in:
Julien Froidefond
2025-09-28 20:47:26 +02:00
parent 7acb2d7e4e
commit 9ef23dbddc
8 changed files with 469 additions and 17 deletions

View File

@@ -1,7 +1,7 @@
'use server';
import { userPreferencesService } from '@/services/core/user-preferences';
import { KanbanFilters, ViewPreferences, ColumnVisibility, TaskStatus } from '@/lib/types';
import { KanbanFilters, ViewPreferences, ColumnVisibility, TaskStatus, Theme } from '@/lib/types';
import { revalidatePath } from 'next/cache';
/**
@@ -117,9 +117,9 @@ export async function toggleObjectivesCollapse(): Promise<{
}
/**
* Change le thème (light/dark)
* Change le thème (light/dark/dracula/monokai/nord)
*/
export async function setTheme(theme: 'light' | 'dark'): Promise<{
export async function setTheme(theme: Theme): Promise<{
success: boolean;
error?: string;
}> {