chore: rename worlds -> instances

This commit is contained in:
Calum H. (IMB11)
2026-06-26 17:09:22 +01:00
parent f799e6f67e
commit f097409b92
33 changed files with 227 additions and 172 deletions
@@ -65,7 +65,7 @@ const messages = defineMessages({
},
noServerWorld: {
id: 'discover.install.error.no-server-world',
defaultMessage: 'No server world is available for install.',
defaultMessage: 'No server instance is available for install.',
},
backToSetup: {
id: 'discover.install.back-to-setup',
@@ -662,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(getServerWorldContentPath(currentServerId.value, currentWorldId.value ?? null))
navigateTo(getServerInstanceContentPath(currentServerId.value, currentWorldId.value ?? null))
} else {
navigateTo(`/hosting/manage/${currentServerId.value}?openSettings=installation`)
}
@@ -678,11 +678,11 @@ 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 getServerWorldContentPath(id, currentWorldId.value)
return getServerInstanceContentPath(id, currentWorldId.value)
})
function getServerWorldContentPath(serverId: string, worldId: string | null) {
const base = `/hosting/manage/${encodeURIComponent(serverId)}/worlds`
function getServerInstanceContentPath(serverId: string, worldId: string | null) {
const base = `/hosting/manage/${encodeURIComponent(serverId)}/instances`
return worldId ? `${base}/${encodeURIComponent(worldId)}` : base
}
+3 -3
View File
@@ -1956,7 +1956,7 @@
"message": "Cancel reset"
},
"discover.install.error.no-server-world": {
"message": "No server world is available for install."
"message": "No server instance is available for install."
},
"discover.install.error.unsupported-content-type": {
"message": "This content type cannot be installed to a server from Discover."
@@ -3938,8 +3938,8 @@
"servers.manage.content.title": {
"message": "Content - {serverName} - Modrinth"
},
"servers.manage.worlds.meta.title": {
"message": "Worlds - {server} - Modrinth"
"servers.manage.instances.meta.title": {
"message": "Instances - {server} - Modrinth"
},
"servers.notice.actions": {
"message": "Actions"
@@ -6,7 +6,7 @@ export default defineNuxtRouteMiddleware(async (to) => {
const serverId = decodeURIComponent(match[1])
const tab = match[2]
const worldsPath = `/hosting/manage/${encodeURIComponent(serverId)}/worlds`
const instancesPath = `/hosting/manage/${encodeURIComponent(serverId)}/instances`
const tabPath = tab === 'content' ? '' : `/${tab}`
const auth = await useAuth()
@@ -24,7 +24,7 @@ export default defineNuxtRouteMiddleware(async (to) => {
if (world) {
return navigateTo(
{
path: `${worldsPath}/${encodeURIComponent(world.id)}${tabPath}`,
path: `${instancesPath}/${encodeURIComponent(world.id)}${tabPath}`,
query: to.query,
hash: to.hash,
},
@@ -32,9 +32,9 @@ export default defineNuxtRouteMiddleware(async (to) => {
)
}
} catch {
return navigateTo({ path: worldsPath, query: to.query, hash: to.hash }, { replace: true })
return navigateTo({ path: instancesPath, query: to.query, hash: to.hash }, { replace: true })
}
}
return navigateTo({ path: worldsPath, query: to.query, hash: to.hash }, { replace: true })
return navigateTo({ path: instancesPath, query: to.query, hash: to.hash }, { replace: true })
})
@@ -0,0 +1,11 @@
<script setup lang="ts">
import { ServersManageInstanceRootLayout } from '@modrinth/ui'
const route = useNativeRoute()
</script>
<template>
<ServersManageInstanceRootLayout>
<NuxtPage :route="route" />
</ServersManageInstanceRootLayout>
</template>
@@ -3,7 +3,7 @@ import {
commonMessages,
defineMessages,
injectModrinthServerContext,
ServersManageWorldsPage,
ServersManageInstancesPage,
useVIntl,
} from '@modrinth/ui'
@@ -12,8 +12,8 @@ const { formatMessage } = useVIntl()
const messages = defineMessages({
title: {
id: 'servers.manage.worlds.meta.title',
defaultMessage: 'Worlds - {server} - Modrinth',
id: 'servers.manage.instances.meta.title',
defaultMessage: 'Instances - {server} - Modrinth',
},
})
@@ -26,5 +26,5 @@ useHead({
</script>
<template>
<ServersManageWorldsPage />
<ServersManageInstancesPage />
</template>
@@ -1,11 +0,0 @@
<script setup lang="ts">
import { ServersManageWorldRootLayout } from '@modrinth/ui'
const route = useNativeRoute()
</script>
<template>
<ServersManageWorldRootLayout>
<NuxtPage :route="route" />
</ServersManageWorldRootLayout>
</template>