feat: implement personalized background image feature
- Added functionality for users to select and customize background images in settings, including predefined options and URL uploads. - Updated `ViewPreferences` to store background image settings and modified `userPreferencesService` to handle updates. - Enhanced global styles for improved readability with background images, including blur and transparency effects. - Integrated `BackgroundImageSelector` component into settings for intuitive user experience. - Refactored `Card` components across the app to use a new 'glass' variant for better aesthetics.
This commit is contained in:
@@ -32,6 +32,31 @@ export async function updateViewPreferences(updates: Partial<ViewPreferences>):
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Met à jour l'image de fond
|
||||
*/
|
||||
export async function setBackgroundImage(backgroundImage: string | undefined): Promise<{
|
||||
success: boolean;
|
||||
error?: string;
|
||||
}> {
|
||||
try {
|
||||
const session = await getServerSession(authOptions);
|
||||
if (!session?.user?.id) {
|
||||
return { success: false, error: 'Non authentifié' };
|
||||
}
|
||||
|
||||
await userPreferencesService.updateViewPreferences(session.user.id, { backgroundImage });
|
||||
revalidatePath('/');
|
||||
return { success: true };
|
||||
} catch (error) {
|
||||
console.error('Erreur setBackgroundImage:', error);
|
||||
return {
|
||||
success: false,
|
||||
error: error instanceof Error ? error.message : 'Erreur inconnue'
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Met à jour les filtres Kanban
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user