feat(panel): support full server config edit dialog with status prefilling

This commit is contained in:
Lemon-miaow committed 2026-07-02 04:24:48 +08:00
1 parent 3b4298d777
commit c0d333bb98
8 files changed
+356 -3

No files matched your search

+19
View File
@@ -1,6 +1,7 @@
import type {
AccessResult,
ApiError,
AutostartPolicy,
BackupView,
BanlistResult,
CreateServerRequest,
@@ -162,6 +163,24 @@ export const api = {
req,
),
patchServer: (name: string, req: {
displayName?: string;
autostartPolicy?: AutostartPolicy;
image?: string;
memory?: string;
resources?: {
cpu?: string;
cpuRequest?: string;
memory?: string;
memoryRequest?: string;
};
}) =>
request<{ name: string; desiredState: string }>(
"PATCH",
`/servers/${name}`,
req,
),
// World backups (spec §7). listBackups is the app-tier read: an admin sees every
// present backup, a user only the backups of worlds they formerly owned — the
// scope is decided server-side from the principal, not by any client filter, so a
+4
View File
@@ -32,6 +32,10 @@ export interface ServerInfo {
claimable?: boolean;
/** Whether the caller owns it. */
owned?: boolean;
image?: string;
javaMemory?: string;
storageSize?: string;
cpu?: string;
}
/** WhitelistResult projects GET /servers/{name}/access/whitelist (spec §7 access).