Skip to content

Commit 75869da

Browse files
committed
fix: update UpdateToast component for dark mode support and adjust toast close button styles
1 parent 898d803 commit 75869da

File tree

3 files changed

+29
-13
lines changed

3 files changed

+29
-13
lines changed

frontend/app/layout.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ export default function RootLayout({
8484
{!performanceMode && (
8585
<div className="absolute inset-0">
8686
<Spline
87-
scene="https://prod.spline.design/fDEn2H4mhzWKkh09/scene.splinecode"
88-
className="absolute blur-sm"
87+
scene="https://prod.spline.design/0zfiWcHYJLJfg6nt/scene.splinecode"
88+
className="absolute"
8989
/>
9090
</div>
9191
)}

frontend/components/UpdateToast.tsx

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"use client";
22
import { Button } from "@heroui/button";
3+
import { useTheme } from "next-themes";
34

45
interface UpdateToastContentProps {
56
version: string;
@@ -10,22 +11,29 @@ export default function UpdateToastContent({
1011
version,
1112
onViewDetails,
1213
}: UpdateToastContentProps) {
14+
const { theme } = useTheme();
15+
const isDark = theme === "dark";
16+
1317
return (
1418
<div className="flex items-start gap-4 p-1">
1519
<span className="text-3xl">🚀</span>
1620
<div className="flex-1">
17-
<h3 className="font-bold text-lg mb-1 text-white">
18-
New version available!
21+
<h3 className={`font-bold text-lg mb-1 ${isDark ? "text-white" : "text-gray-900"}`}>
22+
Nouvelle version disponible !
1923
</h3>
20-
<p className="text-sm text-white/80 mb-4">
21-
Version {version} is now available
24+
<p className={`text-sm mb-4 ${isDark ? "text-white/80" : "text-gray-700"}`}>
25+
Version {version} est maintenant disponible
2226
</p>
2327
<Button
2428
size="sm"
2529
onPress={onViewDetails}
26-
className="bg-green-500 hover:bg-green-600 text-black font-semibold rounded-lg transition-colors"
30+
className={`${
31+
isDark
32+
? "bg-green-500 hover:bg-green-600"
33+
: "bg-purple-500 hover:bg-purple-600"
34+
} text-white font-semibold rounded-lg transition-colors`}
2735
>
28-
View details
36+
Voir les détails
2937
</Button>
3038
</div>
3139
</div>

frontend/styles/globals.css

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,24 @@
22

33
@config "../tailwind.config.js";
44

5-
/* Custom Toastify styles for dark mode close button */
6-
.Toastify__toast-theme--dark .Toastify__close-button,
7-
.Toastify__close-button {
5+
/* Custom Toastify styles for close button */
6+
.Toastify__toast-theme--dark .Toastify__close-button {
87
color: #ffffff !important;
98
opacity: 0.7;
109
transition: opacity 0.2s ease;
1110
}
1211

13-
.Toastify__toast-theme--dark .Toastify__close-button:hover,
14-
.Toastify__close-button:hover {
12+
.Toastify__toast-theme--dark .Toastify__close-button:hover {
13+
opacity: 1;
14+
}
15+
16+
.Toastify__toast-theme--light .Toastify__close-button {
17+
color: #000000 !important;
18+
opacity: 0.7;
19+
transition: opacity 0.2s ease;
20+
}
21+
22+
.Toastify__toast-theme--light .Toastify__close-button:hover {
1523
opacity: 1;
1624
}
1725

0 commit comments

Comments
 (0)