mirror of
https://github.com/Corfirean/coa-server-manager.git
synced 2026-11-23 03:25:56 +00:00
feat: start Wildcard and Warcraft Reborn together with Conquest of Azeroth
Settings gets two options, one per extra realm; turning on both runs all three realms. Each extra world keeps its own folder, configs, logs and ports (multiworld now handles a set of worlds instead of one second world), and Warcraft Reborn gets its own status card, realm list entry and firewall rule. Starting a server also sets CoA.ClassModel of the realm chosen on Overview to exactly that realm's model, so the shipped "coa wcr" default no longer shows two class models on a Conquest of Azeroth realm. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
925a81f4f2
commit
321ac597ce
24 files changed
+697
-173
No files matched your search
@@ -72,15 +72,15 @@ export function Overview({ server, companions = true, onForget, onOpenUpdates, o
|
||||
const human = useHuman();
|
||||
const [status, setStatus] = useState<StatusView | null>(null);
|
||||
// With both worlds started together, each realm gets its own card; the first realm owns the database and auth.
|
||||
const [realms, setRealms] = useState<{ first: string; second: string } | null>(null);
|
||||
const bothWorlds = !!status?.observed.secondary_world;
|
||||
const [realms, setRealms] = useState<{ first: string; second: string; reborn: string } | null>(null);
|
||||
const bothWorlds = !!status?.observed.secondary_world || !!status?.observed.reborn_world;
|
||||
useEffect(() => {
|
||||
if (!bothWorlds) { setRealms(null); return; }
|
||||
let alive = true;
|
||||
void api.realmProfiles(server.id).then((r) => {
|
||||
if (!alive) return;
|
||||
const name = (m: "coa" | "wildcard" | "reborn") => (m === "coa" ? "Conquest of Azeroth" : m === "reborn" ? "Warcraft Reborn" : "Wildcard");
|
||||
setRealms({ first: name(r.active), second: name(r.active === "coa" ? "wildcard" : "coa") });
|
||||
setRealms({ first: name(r.active), second: name(r.active === "coa" ? "wildcard" : "coa"), reborn: name("reborn") });
|
||||
}).catch(() => { if (alive) setRealms(null); });
|
||||
return () => { alive = false; };
|
||||
}, [bothWorlds, server.id]);
|
||||
@@ -292,8 +292,8 @@ export function Overview({ server, companions = true, onForget, onOpenUpdates, o
|
||||
);
|
||||
}
|
||||
|
||||
const { mysql, auth, world, secondary_world } = status.observed;
|
||||
const all = [mysql, auth, world, ...(secondary_world ? [secondary_world] : [])];
|
||||
const { mysql, auth, world, secondary_world, reborn_world } = status.observed;
|
||||
const all = [mysql, auth, world, ...(secondary_world ? [secondary_world] : []), ...(reborn_world ? [reborn_world] : [])];
|
||||
const running = all.every((s) => s.state === "running");
|
||||
const anyUp = all.some((s) => s.state !== "stopped");
|
||||
const transitioning = action !== null || status.busy || realmBusy;
|
||||
@@ -585,6 +585,28 @@ export function Overview({ server, companions = true, onForget, onOpenUpdates, o
|
||||
</Card>
|
||||
)}
|
||||
|
||||
{reborn_world && (
|
||||
<Card className="mt-4 p-7">
|
||||
<div className="mb-1 text-xs font-medium uppercase tracking-[0.14em] text-muted">{realms ? `${realms.reborn} · ${t("overview.server")}` : t("realm.rebornWorld")}</div>
|
||||
<div
|
||||
className={cn("flex items-center gap-3 text-3xl font-semibold", reborn_world.state === "running" ? "text-ok" : reborn_world.state === "starting" || transitioning ? "text-warn" : "text-muted")}
|
||||
role="status"
|
||||
aria-live="polite"
|
||||
>
|
||||
<span aria-hidden className={cn("h-3 w-3 rounded-full", reborn_world.state === "running" ? "bg-ok" : reborn_world.state === "starting" || transitioning ? "bg-warn" : "bg-muted/50")} />
|
||||
{reborn_world.state === "running" ? t("status.online") : reborn_world.state === "starting" ? t("status.starting") : t("status.offline")}
|
||||
</div>
|
||||
<div className="mt-5 divide-y divide-line border-y border-line">
|
||||
<Row label={t("overview.world")} s={reborn_world} />
|
||||
</div>
|
||||
<dl className="mt-4 text-sm">
|
||||
<dt className="text-muted">{t("overview.uptime")}</dt>
|
||||
<dd className="mt-0.5 text-lg">{reborn_world.state === "running" ? formatUptime(reborn_world.uptime_secs) : "—"}</dd>
|
||||
</dl>
|
||||
<p className="mt-3 text-xs text-muted">{t("realm.bothRunning")}</p>
|
||||
</Card>
|
||||
)}
|
||||
|
||||
{conflict && !anyUp && (
|
||||
<Card className="mt-4 border-warn/40 p-4" role="alert">
|
||||
<p className="font-medium text-warn">{t("overview.portTitle")}</p>
|
||||
|
||||
Reference in new issue
Block a user