mirror of
https://github.com/Corfirean/coa-server-manager.git
synced 2026-11-19 03:25:56 +00:00
Fix the dashboard tab: large answers, damaged history files, browser link and realm drop-down
The dashboard now runs through a small launcher that avoids the immediate socket shutdown that cut answers above 64 KB on Windows, supplies the missing level-builds file, removes history files zeroed by a crash, is addressed as 127.0.0.1 and opens in the browser through its own command. The realm drop-down is hidden while both worlds start together. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
838cc07e73
commit
1acbcc2bb5
6 files changed
+121
-7
No files matched your search
@@ -68,7 +68,7 @@ export function DashboardPage({ serverId }: { serverId: string }) {
|
||||
{busy === "stop" && <Loader2 className="h-4 w-4 animate-spin" aria-hidden />}
|
||||
{t("dash.stop")}
|
||||
</Button>
|
||||
<Button size="sm" variant="ghost" onClick={() => void api.openLink(status.url)}>{t("dash.openBrowser")}</Button>
|
||||
<Button size="sm" variant="ghost" onClick={() => void api.dashboardOpen(serverId).catch((e) => setError(asUiError(e)))}>{t("dash.openBrowser")}</Button>
|
||||
</>
|
||||
) : (
|
||||
<Button size="sm" variant="primary" disabled={!!busy} onClick={() => void run("start", () => api.dashboardStart(serverId))}>
|
||||
|
||||
@@ -34,15 +34,15 @@ export function RealmPicker({ serverId, running, disabled, onChanged, onBusy }:
|
||||
<div className="flex flex-wrap items-center gap-3">
|
||||
<Layers className="h-5 w-5 text-gold" aria-hidden />
|
||||
<label htmlFor="realm-profile" className="font-medium">{t("realm.profileLabel")}</label>
|
||||
<select id="realm-profile" value={selected} disabled={!view || disabled || busy} onChange={e => setSelected(e.target.value as RealmMode)} className="min-w-52 rounded-md border border-line bg-card-2 px-3 py-2 text-ink">
|
||||
{view?.simultaneous ? <span className="text-sm text-muted">Conquest of Azeroth + Wildcard</span> : <select id="realm-profile" value={selected} disabled={!view || disabled || busy} onChange={e => setSelected(e.target.value as RealmMode)} className="min-w-52 rounded-md border border-line bg-card-2 px-3 py-2 text-ink">
|
||||
<option value="coa">Conquest of Azeroth</option>
|
||||
<option value="wildcard" disabled={!view?.supported && !view?.wildcard_created}>Wildcard · Darkmoon</option>
|
||||
</select>
|
||||
{view && (selected !== view.active || view.recovery_pending) && <Button size="sm" disabled={disabled || busy} onClick={() => void select()}>
|
||||
</select>}
|
||||
{view && !view.simultaneous && (selected !== view.active || view.recovery_pending) && <Button size="sm" disabled={disabled || busy} onClick={() => void select()}>
|
||||
{busy && <Loader2 className="h-4 w-4 animate-spin" aria-hidden />}
|
||||
{busy ? t("realm.switching") : selected === "wildcard" && !view.wildcard_created ? t("realm.create") : running ? t("realm.restart") : t("realm.select")}
|
||||
</Button>}
|
||||
{view && <span className="ml-auto text-xs text-muted">{t("realm.active", { name: view.active === "coa" ? "CoA" : "Wildcard" })}</span>}
|
||||
{view && !view.simultaneous && <span className="ml-auto text-xs text-muted">{t("realm.active", { name: view.active === "coa" ? "CoA" : "Wildcard" })}</span>}
|
||||
</div>
|
||||
<p className="mt-3 text-sm text-muted">{t(view?.simultaneous ? "realm.bothRunning" : "realm.separate")}</p>
|
||||
{selected === "wildcard" && <p className="mt-2 text-sm text-warn">{t("realm.modules")}</p>}
|
||||
|
||||
Reference in new issue
Block a user