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:
@@ -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 });
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user