From faca1cdce60fcd6fcdaa267faa7d95af9f96fd84 Mon Sep 17 00:00:00 2001 From: Julien Froidefond Date: Fri, 17 Oct 2025 11:09:07 +0200 Subject: [PATCH] feat: enhance UI components with backdrop blur effects and improved background styles for better visual aesthetics --- src/components/LanguageSelector.tsx | 4 ++-- src/components/admin/DeleteUserDialog.tsx | 2 +- src/components/auth/LoginForm.tsx | 6 ++--- src/components/auth/RegisterForm.tsx | 8 +++---- src/components/common/CompactModeButton.tsx | 2 +- src/components/common/UnreadFilterButton.tsx | 2 +- src/components/debug/DebugInfo.tsx | 14 ++++++------ src/components/downloads/DownloadManager.tsx | 2 +- src/components/home/HeroSection.tsx | 4 ++-- src/components/home/MediaRow.tsx | 2 +- src/components/layout/ClientLayout.tsx | 2 +- src/components/layout/Header.tsx | 2 +- src/components/layout/Sidebar.tsx | 2 +- .../library/PaginatedSeriesGrid.tsx | 2 +- src/components/reader/BookReader.tsx | 4 ++-- .../reader/components/ControlButtons.tsx | 16 +++++++------- .../reader/components/NavigationBar.tsx | 4 ++-- .../reader/components/PageInput.tsx | 4 ++-- src/components/series/PaginatedBookGrid.tsx | 2 +- src/components/series/SeriesHeader.tsx | 2 +- .../settings/BackgroundSettings.tsx | 2 +- src/components/settings/CacheSettings.tsx | 22 +++++++++---------- src/components/settings/DisplaySettings.tsx | 2 +- src/components/settings/KomgaSettings.tsx | 12 +++++----- src/components/skeletons/BookSkeleton.tsx | 8 +++---- src/components/ui/ErrorMessage.tsx | 2 +- src/components/ui/InstallPWA.tsx | 6 ++--- src/components/ui/NetworkStatus.tsx | 2 +- src/components/ui/Pagination.tsx | 8 +++---- src/components/ui/alert-dialog.tsx | 2 +- src/components/ui/badge.tsx | 6 ++--- src/components/ui/button.tsx | 10 ++++----- src/components/ui/card.tsx | 2 +- src/components/ui/cover-client.tsx | 2 +- src/components/ui/dialog.tsx | 2 +- src/components/ui/dropdown-menu.tsx | 4 ++-- src/components/ui/input.tsx | 2 +- src/components/ui/progress-bar.tsx | 2 +- src/components/ui/progress.tsx | 2 +- src/components/ui/select.tsx | 4 ++-- src/components/ui/table.tsx | 4 ++-- src/components/ui/tabs.tsx | 4 ++-- src/components/ui/toast.tsx | 4 ++-- src/styles/globals.css | 13 ++++++++++- 44 files changed, 112 insertions(+), 101 deletions(-) diff --git a/src/components/LanguageSelector.tsx b/src/components/LanguageSelector.tsx index eb7a239..911e78d 100644 --- a/src/components/LanguageSelector.tsx +++ b/src/components/LanguageSelector.tsx @@ -27,13 +27,13 @@ export default function LanguageSelector() { handleLanguageChange("fr")} - className={i18n.language === "fr" ? "bg-accent" : ""} + className={i18n.language === "fr" ? "bg-accent/80 backdrop-blur-md" : ""} > {t("language.fr")} handleLanguageChange("en")} - className={i18n.language === "en" ? "bg-accent" : ""} + className={i18n.language === "en" ? "bg-accent/80 backdrop-blur-md" : ""} > {t("language.en")} diff --git a/src/components/admin/DeleteUserDialog.tsx b/src/components/admin/DeleteUserDialog.tsx index 4d0374a..9be1c40 100644 --- a/src/components/admin/DeleteUserDialog.tsx +++ b/src/components/admin/DeleteUserDialog.tsx @@ -80,7 +80,7 @@ export function DeleteUserDialog({ {isLoading ? "Suppression..." : "Supprimer"} diff --git a/src/components/auth/LoginForm.tsx b/src/components/auth/LoginForm.tsx index 2825d1f..096d359 100644 --- a/src/components/auth/LoginForm.tsx +++ b/src/components/auth/LoginForm.tsx @@ -62,7 +62,7 @@ export function LoginForm({ from }: LoginFormProps) { autoComplete="email" required defaultValue="demo@stripstream.local" - className="flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50" + className="flex h-10 w-full rounded-md border border-input bg-background/70 backdrop-blur-md px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50" />
@@ -79,7 +79,7 @@ export function LoginForm({ from }: LoginFormProps) { autoComplete="current-password" required defaultValue="fft$VSD96dis" - className="flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50" + className="flex h-10 w-full rounded-md border border-input bg-background/70 backdrop-blur-md px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50" />
@@ -105,7 +105,7 @@ export function LoginForm({ from }: LoginFormProps) { diff --git a/src/components/auth/RegisterForm.tsx b/src/components/auth/RegisterForm.tsx index 346859f..576a2d5 100644 --- a/src/components/auth/RegisterForm.tsx +++ b/src/components/auth/RegisterForm.tsx @@ -100,7 +100,7 @@ export function RegisterForm({ from: _from }: RegisterFormProps) { type="email" autoComplete="email" required - className="flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50" + className="flex h-10 w-full rounded-md border border-input bg-background/70 backdrop-blur-md px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50" />
@@ -116,7 +116,7 @@ export function RegisterForm({ from: _from }: RegisterFormProps) { type="password" autoComplete="new-password" required - className="flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50" + className="flex h-10 w-full rounded-md border border-input bg-background/70 backdrop-blur-md px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50" />
@@ -132,14 +132,14 @@ export function RegisterForm({ from: _from }: RegisterFormProps) { type="password" autoComplete="new-password" required - className="flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50" + className="flex h-10 w-full rounded-md border border-input bg-background/70 backdrop-blur-md px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50" />
{error && } diff --git a/src/components/common/CompactModeButton.tsx b/src/components/common/CompactModeButton.tsx index 0212743..9f68272 100644 --- a/src/components/common/CompactModeButton.tsx +++ b/src/components/common/CompactModeButton.tsx @@ -19,7 +19,7 @@ export function CompactModeButton({ onToggle }: CompactModeButtonProps) { return ( diff --git a/src/components/reader/components/ControlButtons.tsx b/src/components/reader/components/ControlButtons.tsx index 0ce8307..a522fec 100644 --- a/src/components/reader/components/ControlButtons.tsx +++ b/src/components/reader/components/ControlButtons.tsx @@ -53,7 +53,7 @@ export const ControlButtons = ({ e.stopPropagation(); onToggleDoublePage(); }} - className="p-2 rounded-full bg-background/50 hover:bg-background/80 transition-colors" + className="p-2 rounded-full bg-background/70 backdrop-blur-md hover:bg-background/80 transition-colors" aria-label={t( isDoublePage ? "reader.controls.doublePage.disable" @@ -71,7 +71,7 @@ export const ControlButtons = ({ e.stopPropagation(); onToggleDirection(); }} - className="p-2 rounded-full bg-background/50 hover:bg-background/80 transition-colors" + className="p-2 rounded-full bg-background/70 backdrop-blur-md hover:bg-background/80 transition-colors" aria-label={t("reader.controls.direction.current", { direction: t( direction === "ltr" @@ -91,7 +91,7 @@ export const ControlButtons = ({ e.stopPropagation(); onToggleFullscreen(); }} - className="p-2 rounded-full bg-background/50 hover:bg-background/80 transition-colors" + className="p-2 rounded-full bg-background/70 backdrop-blur-md hover:bg-background/80 transition-colors" aria-label={t( isFullscreen ? "reader.controls.fullscreen.exit" : "reader.controls.fullscreen.enter" )} @@ -104,7 +104,7 @@ export const ControlButtons = ({ onToggleThumbnails(); }} className={cn( - "p-2 rounded-full bg-background/50 hover:bg-background/80 transition-colors", + "p-2 rounded-full bg-background/70 backdrop-blur-md hover:bg-background/80 transition-colors", showThumbnails && "ring-2 ring-primary" )} aria-label={t( @@ -113,7 +113,7 @@ export const ControlButtons = ({ > -
e.stopPropagation()}> +
e.stopPropagation()}> @@ -90,7 +90,7 @@ export const NavigationBar = ({
{showControls && ( -
+
Page {currentPage} / {pages.length}
)} diff --git a/src/components/reader/components/PageInput.tsx b/src/components/reader/components/PageInput.tsx index 9606ea8..2b6ab0b 100644 --- a/src/components/reader/components/PageInput.tsx +++ b/src/components/reader/components/PageInput.tsx @@ -69,7 +69,7 @@ export const PageInput = ({ currentPage, totalPages, onPageChange }: PageInputPr value={inputValue} onChange={handleChange} className={cn( - "w-12 bg-background/50 text-center rounded-md py-1 px-2", + "w-12 bg-background/70 backdrop-blur-md text-center rounded-md py-1 px-2", "focus:outline-none focus:ring-2 focus:ring-primary", "text-sm text-foreground" )} @@ -80,7 +80,7 @@ export const PageInput = ({ currentPage, totalPages, onPageChange }: PageInputPr @@ -340,7 +340,7 @@ export function CacheSettings({ initialTTLConfig }: CacheSettingsProps) { type="button" onClick={handleClearCache} disabled={isCacheClearing} - className="flex-1 inline-flex items-center justify-center rounded-md bg-destructive px-3 py-2 text-sm font-medium text-destructive-foreground ring-offset-background transition-colors hover:bg-destructive/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50" + className="flex-1 inline-flex items-center justify-center rounded-md bg-destructive/90 backdrop-blur-md px-3 py-2 text-sm font-medium text-destructive-foreground ring-offset-background transition-colors hover:bg-destructive/80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50" > {isCacheClearing ? ( <> @@ -357,7 +357,7 @@ export function CacheSettings({ initialTTLConfig }: CacheSettingsProps) { type="button" onClick={handleClearServiceWorkerCache} disabled={isServiceWorkerClearing} - className="flex-1 inline-flex items-center justify-center rounded-md bg-destructive px-3 py-2 text-sm font-medium text-destructive-foreground ring-offset-background transition-colors hover:bg-destructive/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50" + className="flex-1 inline-flex items-center justify-center rounded-md bg-destructive/90 backdrop-blur-md px-3 py-2 text-sm font-medium text-destructive-foreground ring-offset-background transition-colors hover:bg-destructive/80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50" > {isServiceWorkerClearing ? ( <> diff --git a/src/components/settings/DisplaySettings.tsx b/src/components/settings/DisplaySettings.tsx index 53a3ae6..78eb334 100644 --- a/src/components/settings/DisplaySettings.tsx +++ b/src/components/settings/DisplaySettings.tsx @@ -27,7 +27,7 @@ export function DisplaySettings() { }; return ( -
+

diff --git a/src/components/settings/KomgaSettings.tsx b/src/components/settings/KomgaSettings.tsx index ba623b2..47e7275 100644 --- a/src/components/settings/KomgaSettings.tsx +++ b/src/components/settings/KomgaSettings.tsx @@ -144,7 +144,7 @@ export function KomgaSettings({ initialConfig }: KomgaSettingsProps) { }; return ( -
+

@@ -173,7 +173,7 @@ export function KomgaSettings({ initialConfig }: KomgaSettingsProps) { @@ -192,7 +192,7 @@ export function KomgaSettings({ initialConfig }: KomgaSettingsProps) { required value={config.serverUrl} onChange={handleInputChange} - className="flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50" + className="flex h-9 w-full rounded-md border border-input bg-background/70 backdrop-blur-md px-3 py-1 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50" />

@@ -206,7 +206,7 @@ export function KomgaSettings({ initialConfig }: KomgaSettingsProps) { required value={config.username} onChange={handleInputChange} - className="flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50" + className="flex h-9 w-full rounded-md border border-input bg-background/70 backdrop-blur-md px-3 py-1 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50" />
@@ -220,7 +220,7 @@ export function KomgaSettings({ initialConfig }: KomgaSettingsProps) { required value={config.password} onChange={handleInputChange} - className="flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50" + className="flex h-9 w-full rounded-md border border-input bg-background/70 backdrop-blur-md px-3 py-1 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50" />
@@ -228,7 +228,7 @@ export function KomgaSettings({ initialConfig }: KomgaSettingsProps) { @@ -128,7 +128,7 @@ export function InstallPWA() {