mirror of
https://github.com/Corfirean/coa-server-manager.git
synced 2026-11-21 03:25:56 +00:00
feat(client): drop built-in client download, point players to the community launcher
The community moved the game client behind its official launcher (account sign-in, signed manifest, its own CDN), so the public manifest now answers 404 and the Manager must not pose as the launcher. Remove the client download and update path (clientdl, plan/sync/download/cancel commands, update job and progress UI, version tracking) and reduce "Set up the game client" to: open coa-development.org for the launcher, or pick a folder that already has the game. Linking a folder, realmlist switch, companion addon and the custom-race patch are unchanged. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0f0f9e6fe2
commit
7cdf854eb0
22 files changed
+116
-1985
No files matched your search
@@ -1,9 +1,9 @@
|
||||
import { useEffect, useState } from "react";
|
||||
import { Gauge, Globe, Settings, Swords } from "lucide-react";
|
||||
import { api, asUiError, REMOTE_CLIENT_ID } from "@/lib/api";
|
||||
import { checkClient, startClientPolling, useClientStatus } from "@/lib/clientUpdate";
|
||||
import { checkClient, useClientStatus } from "@/lib/clientUpdate";
|
||||
import { ClientCard } from "@/screens/ClientCard";
|
||||
import { ClientDialog, type ClientDialogMode } from "@/screens/ClientDialog";
|
||||
import { ClientDialog } from "@/screens/ClientDialog";
|
||||
import { AboutCard } from "@/screens/AboutCard";
|
||||
import { PortablePage } from "@/screens/PortablePage";
|
||||
import { BrowsePage } from "@/screens/BrowsePage";
|
||||
@@ -25,7 +25,7 @@ export function RemoteClient({ onHost }: { onHost: () => void }) {
|
||||
const [error, setError] = useState<string | null>(null);
|
||||
const [note, setNote] = useState<string | null>(null);
|
||||
const [revision, setRevision] = useState(0);
|
||||
const [dialog, setDialog] = useState<ClientDialogMode | null>(null);
|
||||
const [dialog, setDialog] = useState(false);
|
||||
const { status } = useClientStatus(REMOTE_CLIENT_ID);
|
||||
function fail(e: unknown) {
|
||||
const err = asUiError(e);
|
||||
@@ -33,7 +33,6 @@ export function RemoteClient({ onHost }: { onHost: () => void }) {
|
||||
}
|
||||
useEffect(() => {
|
||||
void api.remoteConnection().then(p => { setHost(p.host); setSavedHost(p.host); }).catch(fail).finally(() => setLoading(false));
|
||||
return startClientPolling(REMOTE_CLIENT_ID);
|
||||
}, []); // eslint-disable-line react-hooks/exhaustive-deps
|
||||
useEffect(() => { void checkClient(REMOTE_CLIENT_ID); }, [revision]);
|
||||
|
||||
@@ -50,8 +49,7 @@ export function RemoteClient({ onHost }: { onHost: () => void }) {
|
||||
try { await api.play(REMOTE_CLIENT_ID); } catch (e) { fail(e); } finally { setBusy(false); }
|
||||
}
|
||||
function play() {
|
||||
if (!status?.linked) setDialog("setup");
|
||||
else if (status.update_available) setDialog("update");
|
||||
if (!status?.linked) setDialog(true);
|
||||
else void launch();
|
||||
}
|
||||
return <div className="flex h-full">
|
||||
@@ -76,13 +74,12 @@ export function RemoteClient({ onHost }: { onHost: () => void }) {
|
||||
</form>
|
||||
<p className="mt-3 text-sm text-muted">{t("remote.accountHint")}</p>
|
||||
<Button variant="primary" className="mt-4" disabled={loading || busy || !savedHost || host.trim() !== savedHost || status === null} onClick={play}>{t("btn.play")}</Button>
|
||||
{status?.linked && status.update_available && <Button variant="secondary" className="mt-4 ml-3" disabled={loading || busy || !savedHost || host.trim() !== savedHost} onClick={() => void launch()}>{t("btn.playWithoutUpdate")}</Button>}
|
||||
{note && <p className="mt-3 text-sm text-ok" role="status">{note}</p>}
|
||||
{error && <p className="mt-3 text-sm text-bad" role="alert">{error}</p>}
|
||||
</Card>
|
||||
<ClientCard key={revision} serverId={REMOTE_CLIENT_ID} remote />
|
||||
</>}
|
||||
</main>
|
||||
{dialog && <ClientDialog serverId={REMOTE_CLIENT_ID} mode={dialog} onClose={() => setDialog(null)} onChanged={() => setRevision(n => n + 1)} onPlayAnyway={() => void launch()} />}
|
||||
{dialog && <ClientDialog serverId={REMOTE_CLIENT_ID} onClose={() => setDialog(false)} onChanged={() => setRevision(n => n + 1)} />}
|
||||
</div>;
|
||||
}
|
||||
Reference in new issue
Block a user