feat: update background gradients and presets in BackgroundImageSelector

- Adjusted gradient definitions for various themes to enhance visual appeal and consistency.
- Added new gradient presets (sunset, ocean, forest, galaxy) to the BackgroundContext for broader customization options.
- Cleaned up unused console logs in useBackgroundCycle for better performance and readability.
This commit is contained in:
Julien Froidefond
2025-10-02 14:14:06 +02:00
parent 9094aca1ff
commit fbb9311f9e
3 changed files with 27 additions and 47 deletions

View File

@@ -29,11 +29,6 @@ export function useBackgroundCycle() {
// Ajouter l'image personnalisée préservée si elle existe
const preservedCustomUrl = localStorage.getItem('preservedCustomBackground');
console.log('Debug cycle:', {
currentBackground,
preservedCustomUrl,
localStorageKeys: Object.keys(localStorage)
});
if (preservedCustomUrl && !BACKGROUND_CYCLE.includes(preservedCustomUrl)) {
allBackgrounds.push(preservedCustomUrl);
@@ -67,33 +62,10 @@ export function useBackgroundCycle() {
const nextNextBackground = allBackgrounds[nextNextIndex];
const finalBackgroundImage = nextNextBackground === 'none' ? undefined : nextNextBackground;
console.log('Cycle result:', {
allBackgrounds,
currentIndex,
actualCurrentIndex,
nextIndex,
nextBackground,
backgroundImage,
currentBackground,
nextNextIndex,
nextNextBackground,
finalBackgroundImage
});
updateViewPreferences({ backgroundImage: finalBackgroundImage });
return;
}
console.log('Cycle result:', {
allBackgrounds,
currentIndex,
actualCurrentIndex,
nextIndex,
nextBackground,
backgroundImage,
currentBackground
});
updateViewPreferences({ backgroundImage });
};