diff --git a/src/components/app-update-toast.tsx b/src/components/app-update-toast.tsx index 21b14a3..1606a07 100644 --- a/src/components/app-update-toast.tsx +++ b/src/components/app-update-toast.tsx @@ -144,11 +144,7 @@ export function AppUpdateToast({ {/* Other stage progress (with visual indicators) */} {showOtherStageProgress && ( -
-

- {updateProgress.message} -

- +
{/* Progress indicator for non-downloading stages */}
- - {updateProgress.stage === "extracting" && ( -

- Preparing update files... -

- )} - {updateProgress.stage === "installing" && ( -

- Installing new version... -

- )} - {updateProgress.stage === "completed" && ( -

- Update completed! Restarting application... -

- )}
)} diff --git a/src/components/custom-toast.tsx b/src/components/custom-toast.tsx index 94bcf7c..cf45972 100644 --- a/src/components/custom-toast.tsx +++ b/src/components/custom-toast.tsx @@ -111,16 +111,6 @@ interface TwilightUpdateToastProps extends BaseToastProps { hasUpdate?: boolean; } -interface AppUpdateToastProps extends BaseToastProps { - type: "app-update"; - stage?: "downloading" | "extracting" | "installing" | "completed"; - progress?: { - percentage: number; - speed?: string; - eta?: string; - }; -} - type ToastProps = | LoadingToastProps | SuccessToastProps @@ -128,8 +118,7 @@ type ToastProps = | DownloadToastProps | VersionUpdateToastProps | FetchingToastProps - | TwilightUpdateToastProps - | AppUpdateToastProps; + | TwilightUpdateToastProps; function getToastIcon(type: ToastProps["type"], stage?: string) { switch (type) { @@ -144,21 +133,7 @@ function getToastIcon(type: ToastProps["type"], stage?: string) { ); } return ; - case "app-update": - if (stage === "completed") { - return ( - - ); - } else if (stage === "downloading") { - return ; - } else if (stage === "installing") { - return ( - - ); - } - return ( - - ); + case "version-update": return ( @@ -239,47 +214,6 @@ export function UnifiedToast(props: ToastProps) {
)} - {/* App update progress */} - {type === "app-update" && ( -
- {/* Download progress with percentage */} - {progress && - "percentage" in progress && - stage === "downloading" && ( - <> -
-

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

-
-
-
-
- - )} - - {/* Progress indicator for other stages */} - {(stage === "extracting" || - stage === "installing" || - stage === "completed") && ( -
-
-
- )} -
- )} - {/* Version update progress */} {type === "version-update" && progress && @@ -355,27 +289,6 @@ export function UnifiedToast(props: ToastProps) { )} )} - - {/* Stage-specific descriptions for app updates */} - {type === "app-update" && !description && ( - <> - {stage === "extracting" && ( -

- Preparing update files... -

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

- Installing new version... -

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

- Update completed! Restarting application... -

- )} - - )}
); diff --git a/src/lib/toast-utils.ts b/src/lib/toast-utils.ts index 1285d63..66f5c8a 100644 --- a/src/lib/toast-utils.ts +++ b/src/lib/toast-utils.ts @@ -46,23 +46,12 @@ interface VersionUpdateToastProps extends BaseToastProps { }; } -interface AppUpdateToastProps extends BaseToastProps { - type: "app-update"; - stage?: "downloading" | "extracting" | "installing" | "completed"; - progress?: { - percentage: number; - speed?: string; - eta?: string; - }; -} - type ToastProps = | SuccessToastProps | ErrorToastProps | DownloadToastProps | LoadingToastProps - | VersionUpdateToastProps - | AppUpdateToastProps; + | VersionUpdateToastProps; export function showToast(props: ToastProps & { id?: string }) { const toastId = props.id ?? `toast-${props.type}-${Date.now()}`; @@ -257,27 +246,3 @@ export function showUnifiedVersionUpdateToast( ...options, }); } - -export function showAppUpdateToast( - title: string, - stage: "downloading" | "extracting" | "installing" | "completed", - options?: { - id?: string; - description?: string; - progress?: { - percentage: number; - speed?: string; - eta?: string; - }; - duration?: number; - }, -) { - return showToast({ - type: "app-update", - title, - stage, - id: options?.id ?? "app-update-progress", - duration: stage === "downloading" ? Number.POSITIVE_INFINITY : 5000, - ...options, - }); -}