mirror of
https://github.com/Corfirean/coa-server-manager.git
synced 2026-11-21 11:25:56 +00:00
Add start-after-update options and clarify the always-max-skills setting
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
017b977bfa
commit
0a050a40a2
18 files changed
+72
-6
No files matched your search
@@ -6,6 +6,7 @@ import { ClientDialog, type ClientDialogMode } from "@/screens/ClientDialog";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Card } from "@/components/ui/card";
|
||||
import { useHuman, useT } from "@/i18n";
|
||||
import { useStartAfterUpdate } from "@/lib/updatePrefs";
|
||||
|
||||
export function ClientCard({ serverId, remote = false }: { serverId: string; remote?: boolean }) {
|
||||
const t = useT();
|
||||
@@ -16,6 +17,7 @@ export function ClientCard({ serverId, remote = false }: { serverId: string; rem
|
||||
const [busy, setBusy] = useState(false);
|
||||
const [status, setStatus] = useState<ClientStatus | null>(null);
|
||||
const [dialog, setDialog] = useState<ClientDialogMode | null>(null);
|
||||
const [playAfter, setPlayAfter] = useStartAfterUpdate("client", serverId);
|
||||
|
||||
const refresh = () => {
|
||||
void api.clientStatus(serverId).then(setStatus).catch(() => setStatus(null));
|
||||
@@ -86,6 +88,12 @@ export function ClientCard({ serverId, remote = false }: { serverId: string; rem
|
||||
<dt className="text-muted">{t("client.otherAddons")}</dt>
|
||||
<dd>{t("client.leftAsIs", { n: info.other_addons })}</dd>
|
||||
</dl>
|
||||
{!remote && (
|
||||
<label className="mt-4 flex cursor-pointer items-center gap-2 text-sm">
|
||||
<input type="checkbox" checked={playAfter} onChange={(e) => setPlayAfter(e.target.checked)} className="h-4 w-4 accent-[#c9a24a]" />
|
||||
<span>{t("client.startAfter")}</span>
|
||||
</label>
|
||||
)}
|
||||
<div className="mt-4 flex flex-wrap gap-2">
|
||||
{!remote && !pointsLocal && (
|
||||
<Button size="sm" disabled={busy} onClick={() => void run(async () => { await api.setRealmlist(serverId, "127.0.0.1"); return t("client.pointedNote"); })}>
|
||||
|
||||
@@ -10,6 +10,7 @@ import { ClientCard } from "@/screens/ClientCard";
|
||||
import { DiagnosticsCard } from "@/screens/DiagnosticsCard";
|
||||
import { AboutCard } from "@/screens/AboutCard";
|
||||
import { RemoveServerCard } from "@/screens/RemoveServerCard";
|
||||
import { useStartAfterUpdate } from "@/lib/updatePrefs";
|
||||
import { hasKey, useHuman, useI18n, type Key } from "@/i18n";
|
||||
import { LanguagePicker } from "@/components/LanguagePicker";
|
||||
import { RealmStartupSettings } from "@/screens/RealmStartupSettings";
|
||||
@@ -38,6 +39,7 @@ export function SettingsHome({ serverId, path, onForget }: { serverId: string; p
|
||||
const [choices, setChoices] = useState<Record<string, "keep" | "replace">>({});
|
||||
const [advanced, setAdvanced] = useState(false);
|
||||
const [source, setSource] = useState("");
|
||||
const [startAfter, setStartAfter] = useStartAfterUpdate("server", serverId);
|
||||
|
||||
useEffect(() => {
|
||||
let active = true;
|
||||
@@ -178,6 +180,10 @@ export function SettingsHome({ serverId, path, onForget }: { serverId: string; p
|
||||
<Card className="mt-6 p-6">
|
||||
<h2 className="font-semibold">{t("upd.title")}</h2>
|
||||
<p className="mt-1 text-sm text-muted">{t("upd.text")}</p>
|
||||
<label className="mt-3 flex cursor-pointer items-center gap-2 text-sm">
|
||||
<input type="checkbox" checked={startAfter} onChange={(e) => setStartAfter(e.target.checked)} className="h-4 w-4 accent-[#c9a24a]" />
|
||||
<span>{t("upd.startAfter")}</span>
|
||||
</label>
|
||||
|
||||
<div className="mt-4 flex items-center gap-3">
|
||||
<Button variant="primary" disabled={!!busy} onClick={() => void check()}>
|
||||
|
||||
Reference in new issue
Block a user