feat: self-updates

This commit is contained in:
zhom
2025-05-30 07:12:07 +04:00
parent 03a3e9fc56
commit 5c23c77896
7 changed files with 829 additions and 6 deletions
+7 -1
View File
@@ -13,6 +13,7 @@ import {
TooltipContent,
TooltipTrigger,
} from "@/components/ui/tooltip";
import { useAppUpdateNotifications } from "@/hooks/use-app-update-notifications";
import { useUpdateNotifications } from "@/hooks/use-update-notifications";
import { showErrorToast } from "@/lib/toast-utils";
import type { BrowserProfile, ProxySettings } from "@/types";
@@ -53,6 +54,9 @@ export default function Home() {
const updateNotifications = useUpdateNotifications();
const { checkForUpdates, isUpdating } = updateNotifications;
// App auto-update functionality
const appUpdateNotifications = useAppUpdateNotifications();
// Ensure we're on the client side to prevent hydration mismatches
useEffect(() => {
setIsClient(true);
@@ -249,7 +253,9 @@ export default function Home() {
await loadProfiles();
} catch (error) {
setError(
`Failed to create profile: ${error instanceof Error ? error.message : String(error)}`,
`Failed to create profile: ${
error instanceof Error ? error.message : String(error)
}`,
);
throw error;
}