feat: reshuffle layout for worlds

This commit is contained in:
Calum H. (IMB11)
2026-06-26 17:09:22 +01:00
parent 5d49e9fa53
commit f922145230
33 changed files with 591 additions and 131 deletions
@@ -187,7 +187,10 @@ export function useServerInstallContent({
},
}
const contentQueryKey = computed(() => ['content', 'list', currentServerId.value ?? ''] as const)
const contentQueryKey = computed(
() =>
['content', 'list', 'v1', currentServerId.value ?? '', currentWorldId.value ?? null] as const,
)
const { data: serverContentData, error: serverContentError } = useQuery({
queryKey: contentQueryKey,
queryFn: () =>
@@ -659,7 +662,7 @@ export function useServerInstallContent({
if (fromContext.value === 'onboarding') {
await client.archon.servers_v1.endIntro(currentServerId.value)
queryClient.invalidateQueries({ queryKey: ['servers', 'detail', currentServerId.value] })
navigateTo(`/hosting/manage/${currentServerId.value}/content`)
navigateTo(getServerWorldContentPath(currentServerId.value, currentWorldId.value ?? null))
} else {
navigateTo(`/hosting/manage/${currentServerId.value}?openSettings=installation`)
}
@@ -675,9 +678,14 @@ export function useServerInstallContent({
if (fromContext.value === 'onboarding') return `/hosting/manage/${id}?resumeModal=setup-type`
if (fromContext.value === 'reset-server')
return `/hosting/manage/${id}?openSettings=installation`
return `/hosting/manage/${id}/content`
return getServerWorldContentPath(id, currentWorldId.value)
})
function getServerWorldContentPath(serverId: string, worldId: string | null) {
const base = `/hosting/manage/${encodeURIComponent(serverId)}/worlds`
return worldId ? `${base}/${encodeURIComponent(worldId)}` : base
}
const serverBackLabel = computed(() => {
if (fromContext.value === 'onboarding') return formatMessage(messages.backToSetup)
if (fromContext.value === 'reset-server') return formatMessage(messages.cancelReset)