feat: automatically update browsers on new versions

This commit is contained in:
zhom
2025-06-14 19:03:02 +04:00
parent 5a3fb7b2b0
commit 95cd2426c3
6 changed files with 148 additions and 259 deletions
+20
View File
@@ -294,6 +294,26 @@ export function showTwilightUpdateToast(
});
}
export function showAutoUpdateToast(
browserName: string,
version: string,
options?: {
id?: string;
description?: string;
duration?: number;
},
) {
return showToast({
type: "loading",
title: `${browserName} update started`,
description:
options?.description ??
`Automatically downloading ${browserName} ${version}. Progress will be shown in download notifications.`,
id: options?.id ?? `auto-update-${browserName.toLowerCase()}-${version}`,
duration: options?.duration ?? 4000,
});
}
// Generic helper for dismissing toasts
export function dismissToast(id: string) {
sonnerToast.dismiss(id);