From 8e7c46de239c6ce602d25231516c493336237867 Mon Sep 17 00:00:00 2001 From: Julien Froidefond Date: Sat, 28 Feb 2026 22:07:29 +0100 Subject: [PATCH] refactor: unify and enrich default app background styling --- src/components/home/HomeClientWrapper.tsx | 14 -------------- src/components/layout/ClientLayout.tsx | 9 ++++++++- 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/src/components/home/HomeClientWrapper.tsx b/src/components/home/HomeClientWrapper.tsx index 8fd22b8..15c2817 100644 --- a/src/components/home/HomeClientWrapper.tsx +++ b/src/components/home/HomeClientWrapper.tsx @@ -5,7 +5,6 @@ import { useRouter } from "next/navigation"; import { RefreshButton } from "@/components/library/RefreshButton"; import { PullToRefreshIndicator } from "@/components/common/PullToRefreshIndicator"; import { usePullToRefresh } from "@/hooks/usePullToRefresh"; -import { usePreferences } from "@/contexts/PreferencesContext"; interface HomeClientWrapperProps { children: ReactNode; @@ -14,12 +13,6 @@ interface HomeClientWrapperProps { export function HomeClientWrapper({ children }: HomeClientWrapperProps) { const router = useRouter(); const [isRefreshing, setIsRefreshing] = useState(false); - const { preferences } = usePreferences(); - - const hasCustomBackground = - (preferences.background.type === "gradient" && Boolean(preferences.background.gradient)) || - (preferences.background.type === "image" && Boolean(preferences.background.imageUrl)) || - preferences.background.type === "komga-random"; const handleRefresh = async () => { try { @@ -51,13 +44,6 @@ export function HomeClientWrapper({ children }: HomeClientWrapperProps) { isHiding={pullToRefresh.isHiding} />
- {!hasCustomBackground && ( - <> -
-
- - )} -
diff --git a/src/components/layout/ClientLayout.tsx b/src/components/layout/ClientLayout.tsx index 135a696..496d535 100644 --- a/src/components/layout/ClientLayout.tsx +++ b/src/components/layout/ClientLayout.tsx @@ -151,8 +151,15 @@ export default function ClientLayout({ {/* Background fixe pour les images et gradients */} {hasCustomBackground &&
} + {!hasCustomBackground && ( + <> +
+
+
+ + )}