From 0a451d9f9acbed390d6fc5fdb5c0d869f3b42f49 Mon Sep 17 00:00:00 2001 From: "Calum H. (IMB11)" Date: Tue, 9 Jun 2026 11:14:38 +0100 Subject: [PATCH] feat: switch world route impl --- .../src/modules/archon/servers/v1.ts | 12 +++ .../servers/instances/InstanceCard.vue | 45 +++++++-- .../server-settings/pages/installation.vue | 3 + .../hosting/manage/[id]/instances/index.vue | 94 ++++++++++++++++++- 4 files changed, 142 insertions(+), 12 deletions(-) diff --git a/packages/api-client/src/modules/archon/servers/v1.ts b/packages/api-client/src/modules/archon/servers/v1.ts index 9435bf11c7..a611f4ca22 100644 --- a/packages/api-client/src/modules/archon/servers/v1.ts +++ b/packages/api-client/src/modules/archon/servers/v1.ts @@ -66,4 +66,16 @@ export class ArchonServersV1Module extends AbstractModule { method: 'POST', }) } + + /** + * Switch the server to a world + * POST /v1/servers/:id/worlds/:wid/active + */ + public async switchWorld(serverId: string, worldId: string): Promise { + await this.client.request(`/servers/${serverId}/worlds/${worldId}/active`, { + api: 'archon', + version: 1, + method: 'POST', + }) + } } diff --git a/packages/ui/src/components/servers/instances/InstanceCard.vue b/packages/ui/src/components/servers/instances/InstanceCard.vue index 42c79a0818..0a1390fcba 100644 --- a/packages/ui/src/components/servers/instances/InstanceCard.vue +++ b/packages/ui/src/components/servers/instances/InstanceCard.vue @@ -177,22 +177,41 @@ {{ formatMessage(messages.editInstance) }} - - - +
+ + + + + + +