Game client: download and update through the Manager

PLAY turns into UPDATE CLIENT when a tracked client is outdated; with no client linked
it offers choosing an existing folder or downloading from the community launcher servers
(resumable, hash-verified, free-space checked, progress and stop). Files the player changed
are kept on request or moved aside, never silently replaced. Existing clients can be adopted
from Settings. Fresh downloads get a realmlist for each installed locale.

Fixes zero-length files in the downloader (found by the live probe).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
ДмитрийandClaude Sonnet 5.5 committed 2026-10-01 07:52:58 +05:00
1 parent 7d447b490f
commit 615b3e938d
21 files changed
+1632 -27

No files matched your search

+10 -2
View File
@@ -14,6 +14,7 @@ import { FriendsPage } from "@/screens/FriendsPage";
import { ConsolePage } from "@/screens/ConsolePage";
import { Button } from "@/components/ui/button";
import { startServerUpdatePolling, useServerUpdate } from "@/lib/serverUpdate";
import { startClientPolling } from "@/lib/clientUpdate";
type Page = "overview" | "bots" | "server" | "players" | "friends" | "backups" | "console" | "settings";
@@ -41,8 +42,15 @@ export function Shell(props: {
const current = NAV.find((n) => n.id === page)!;
const update = useServerUpdate(props.activeId);
// Look for a server update when the app starts and then every five minutes.
useEffect(() => startServerUpdatePolling(props.activeId), [props.activeId]);
// Look for a server and a game client update when the app starts and then every five minutes.
useEffect(() => {
const stopServer = startServerUpdatePolling(props.activeId);
const stopClient = startClientPolling(props.activeId);
return () => {
stopServer();
stopClient();
};
}, [props.activeId]);
return (
<div className="flex h-full">