From 5814f00f3d7de9b1d7a314d4e3a9a080865aa46a Mon Sep 17 00:00:00 2001 From: zhom <2717306+zhom@users.noreply.github.com> Date: Wed, 13 Aug 2025 09:33:56 +0400 Subject: [PATCH] style: toast colors --- src/components/custom-toast.tsx | 80 +++++++++++---------------------- 1 file changed, 27 insertions(+), 53 deletions(-) diff --git a/src/components/custom-toast.tsx b/src/components/custom-toast.tsx index 6c72d07..572526e 100644 --- a/src/components/custom-toast.tsx +++ b/src/components/custom-toast.tsx @@ -127,36 +127,38 @@ type ToastProps = function getToastIcon(type: ToastProps["type"], stage?: string) { switch (type) { case "success": - return ; + return ; case "error": - return ; + return ( + + ); case "download": if (stage === "completed") { return ( - + ); } - return ; + return ; case "version-update": return ( - + ); case "fetching": return ( - + ); case "twilight-update": return ( - + ); case "loading": return ( -
+
); default: return ( -
+
); } } @@ -166,33 +168,11 @@ export function UnifiedToast(props: ToastProps) { const stage = "stage" in props ? props.stage : undefined; const progress = "progress" in props ? props.progress : undefined; - // Check if this is an auto-update toast - const isAutoUpdate = title.includes("update started"); - return ( -
-
- {isAutoUpdate ? ( - - ) : ( - getToastIcon(type, stage) - )} -
+
+
{getToastIcon(type, stage)}
-

+

{title}

@@ -203,15 +183,15 @@ export function UnifiedToast(props: ToastProps) { stage === "downloading" && (
-

+

{progress.percentage.toFixed(1)}% {progress.speed && ` • ${progress.speed} MB/s`} {progress.eta && ` • ${progress.eta} remaining`}

-
+
@@ -223,21 +203,21 @@ export function UnifiedToast(props: ToastProps) { progress && "current_browser" in progress && (
-

+

{progress.current_browser && ( <>Looking for updates for {progress.current_browser} )}

-
+
- + {progress.current}/{progress.total}
@@ -247,13 +227,13 @@ export function UnifiedToast(props: ToastProps) { {/* Twilight update progress */} {type === "twilight-update" && (
-

+

{"hasUpdate" in props && props.hasUpdate ? "New twilight build available for download" : "Checking for twilight updates..."}

{props.browserName && ( -

+

{props.browserName} • Rolling Release

)} @@ -262,13 +242,7 @@ export function UnifiedToast(props: ToastProps) { {/* Description */} {description && ( -

+

{description}

)} @@ -277,17 +251,17 @@ export function UnifiedToast(props: ToastProps) { {type === "download" && !description && ( <> {stage === "extracting" && ( -

+

Extracting browser files...

)} {stage === "verifying" && ( -

+

Verifying browser files...

)} {stage === "downloading (twilight rolling release)" && ( -

+

Downloading rolling release build...

)}