diff --git a/apps/app-frontend/src/App.vue b/apps/app-frontend/src/App.vue index cdd035ef92..44fe596f17 100644 --- a/apps/app-frontend/src/App.vue +++ b/apps/app-frontend/src/App.vue @@ -496,7 +496,7 @@ const sidebarOverlayScrollbarsOptions = Object.freeze({ }) router.beforeEach(async (to) => { - const redirect = await resolveLegacyServerWorldTabRedirect(to) + const redirect = await resolveLegacyServerInstanceTabRedirect(to) if (redirect) return redirect }) @@ -531,7 +531,7 @@ function onSuspensePending() { suspenseToken = loading.begin() } -async function resolveLegacyServerWorldTabRedirect(to) { +async function resolveLegacyServerInstanceTabRedirect(to) { if (!['ServerManageContent', 'ServerManageFiles', 'ServerManageBackups'].includes(to.name)) { return null } @@ -541,14 +541,14 @@ async function resolveLegacyServerWorldTabRedirect(to) { const tabPath = to.name === 'ServerManageFiles' ? '/files' : to.name === 'ServerManageBackups' ? '/backups' : '' - const worldsPath = `/hosting/manage/${encodeURIComponent(serverId)}/worlds` + const instancesPath = `/hosting/manage/${encodeURIComponent(serverId)}/instances` try { const serverFull = await tauriApiClient.archon.servers_v1.get(serverId) const world = serverFull.worlds.find((item) => item.is_active) ?? serverFull.worlds[0] if (world) { return { - path: `${worldsPath}/${encodeURIComponent(world.id)}${tabPath}`, + path: `${instancesPath}/${encodeURIComponent(world.id)}${tabPath}`, query: to.query, hash: to.hash, replace: true, @@ -556,7 +556,7 @@ async function resolveLegacyServerWorldTabRedirect(to) { } } catch { return { - path: worldsPath, + path: instancesPath, query: to.query, hash: to.hash, replace: true, @@ -564,7 +564,7 @@ async function resolveLegacyServerWorldTabRedirect(to) { } return { - path: worldsPath, + path: instancesPath, query: to.query, hash: to.hash, replace: true, diff --git a/apps/app-frontend/src/pages/hosting/manage/Index.vue b/apps/app-frontend/src/pages/hosting/manage/Index.vue index 030f74a7e3..1274afbe3b 100644 --- a/apps/app-frontend/src/pages/hosting/manage/Index.vue +++ b/apps/app-frontend/src/pages/hosting/manage/Index.vue @@ -93,7 +93,7 @@ watch( breadcrumbs.setName('Server', server.name) breadcrumbs.setContext({ name: server.name, - link: `/hosting/manage/${serverId.value}/worlds`, + link: `/hosting/manage/${serverId.value}/instances`, }) } }, diff --git a/apps/app-frontend/src/pages/hosting/manage/World.vue b/apps/app-frontend/src/pages/hosting/manage/Instance.vue similarity index 66% rename from apps/app-frontend/src/pages/hosting/manage/World.vue rename to apps/app-frontend/src/pages/hosting/manage/Instance.vue index fe52492c50..703c5eb42c 100644 --- a/apps/app-frontend/src/pages/hosting/manage/World.vue +++ b/apps/app-frontend/src/pages/hosting/manage/Instance.vue @@ -1,5 +1,5 @@ diff --git a/apps/app-frontend/src/pages/hosting/manage/Instances.vue b/apps/app-frontend/src/pages/hosting/manage/Instances.vue new file mode 100644 index 0000000000..496583f641 --- /dev/null +++ b/apps/app-frontend/src/pages/hosting/manage/Instances.vue @@ -0,0 +1,7 @@ + + + diff --git a/apps/app-frontend/src/pages/hosting/manage/Worlds.vue b/apps/app-frontend/src/pages/hosting/manage/Worlds.vue deleted file mode 100644 index 3df6f264ee..0000000000 --- a/apps/app-frontend/src/pages/hosting/manage/Worlds.vue +++ /dev/null @@ -1,7 +0,0 @@ - - - diff --git a/apps/app-frontend/src/pages/hosting/manage/index.js b/apps/app-frontend/src/pages/hosting/manage/index.js index 635f13efeb..cd94272097 100644 --- a/apps/app-frontend/src/pages/hosting/manage/index.js +++ b/apps/app-frontend/src/pages/hosting/manage/index.js @@ -3,8 +3,8 @@ import Backups from './Backups.vue' import Content from './Content.vue' import Files from './Files.vue' import Index from './Index.vue' +import Instance from './Instance.vue' +import Instances from './Instances.vue' import Overview from './Overview.vue' -import World from './World.vue' -import Worlds from './Worlds.vue' -export { Access, Backups, Content, Files, Index, Overview, World, Worlds } +export { Access, Backups, Content, Files, Index, Instance, Instances, Overview } diff --git a/apps/app-frontend/src/providers/setup/server-install-content.ts b/apps/app-frontend/src/providers/setup/server-install-content.ts index 7b82793a85..000bafb025 100644 --- a/apps/app-frontend/src/providers/setup/server-install-content.ts +++ b/apps/app-frontend/src/providers/setup/server-install-content.ts @@ -252,7 +252,7 @@ export function createServerInstallContent(opts: { if (serverFlowFrom.value === 'reset-server') { return `/hosting/manage/${sid}?openSettings=installation` } - return getServerWorldContentPath(sid, effectiveServerWorldId.value) + return getServerInstanceContentPath(sid, effectiveServerWorldId.value) }) const serverBackLabel = computed(() => { if (serverFlowFrom.value === 'onboarding') return 'Back to setup' @@ -424,7 +424,7 @@ export function createServerInstallContent(opts: { if (isInstallingQueuedServerInstalls.value) return false if (!serverId || !worldId) { - handleError(new Error('No server world is available for install.')) + handleError(new Error('No server instance is available for install.')) return false } @@ -556,7 +556,7 @@ export function createServerInstallContent(opts: { if (serverFlowFrom.value === 'onboarding') { await client.archon.servers_v1.endIntro(sid) - await router.push(getServerWorldContentPath(sid, wid)) + await router.push(getServerInstanceContentPath(sid, wid)) return } @@ -571,8 +571,8 @@ export function createServerInstallContent(opts: { serverContentProjectIds.value = new Set([...serverContentProjectIds.value, id]) } - 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 } diff --git a/apps/app-frontend/src/routes.js b/apps/app-frontend/src/routes.js index 2d133f0079..025c6231f7 100644 --- a/apps/app-frontend/src/routes.js +++ b/apps/app-frontend/src/routes.js @@ -58,24 +58,24 @@ export default new createRouter({ }, }, { - path: 'worlds', - name: 'ServerManageWorlds', - component: Hosting.Worlds, + path: 'instances', + name: 'ServerManageInstances', + component: Hosting.Instances, meta: { breadcrumb: [{ name: '?Server' }], }, }, { - path: 'worlds/:world_id', - name: 'ServerManageWorld', - component: Hosting.World, + path: 'instances/:instance_id', + name: 'ServerManageInstance', + component: Hosting.Instance, meta: { breadcrumb: [{ name: '?Server' }], }, children: [ { path: '', - name: 'ServerManageWorldContent', + name: 'ServerManageInstanceContent', component: Hosting.Content, meta: { breadcrumb: [{ name: '?Server' }], @@ -83,7 +83,7 @@ export default new createRouter({ }, { path: 'files', - name: 'ServerManageWorldFiles', + name: 'ServerManageInstanceFiles', component: Hosting.Files, meta: { breadcrumb: [{ name: '?Server' }], @@ -91,7 +91,7 @@ export default new createRouter({ }, { path: 'backups', - name: 'ServerManageWorldBackups', + name: 'ServerManageInstanceBackups', component: Hosting.Backups, meta: { breadcrumb: [{ name: '?Server' }], diff --git a/apps/frontend/src/composables/use-server-install-content.ts b/apps/frontend/src/composables/use-server-install-content.ts index 3c27837c9c..fc91cbb548 100644 --- a/apps/frontend/src/composables/use-server-install-content.ts +++ b/apps/frontend/src/composables/use-server-install-content.ts @@ -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 } diff --git a/apps/frontend/src/locales/en-US/index.json b/apps/frontend/src/locales/en-US/index.json index 7f8512f105..980001bf39 100644 --- a/apps/frontend/src/locales/en-US/index.json +++ b/apps/frontend/src/locales/en-US/index.json @@ -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" diff --git a/apps/frontend/src/middleware/server-world-tabs.global.ts b/apps/frontend/src/middleware/server-instance-tabs.global.ts similarity index 73% rename from apps/frontend/src/middleware/server-world-tabs.global.ts rename to apps/frontend/src/middleware/server-instance-tabs.global.ts index 2a740b7dea..761373af1f 100644 --- a/apps/frontend/src/middleware/server-world-tabs.global.ts +++ b/apps/frontend/src/middleware/server-instance-tabs.global.ts @@ -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 }) }) diff --git a/apps/frontend/src/pages/hosting/manage/[id]/worlds.vue b/apps/frontend/src/pages/hosting/manage/[id]/instances.vue similarity index 100% rename from apps/frontend/src/pages/hosting/manage/[id]/worlds.vue rename to apps/frontend/src/pages/hosting/manage/[id]/instances.vue diff --git a/apps/frontend/src/pages/hosting/manage/[id]/instances/[instance_id].vue b/apps/frontend/src/pages/hosting/manage/[id]/instances/[instance_id].vue new file mode 100644 index 0000000000..b0f0f867b6 --- /dev/null +++ b/apps/frontend/src/pages/hosting/manage/[id]/instances/[instance_id].vue @@ -0,0 +1,11 @@ + + + diff --git a/apps/frontend/src/pages/hosting/manage/[id]/worlds/[world_id]/backups.vue b/apps/frontend/src/pages/hosting/manage/[id]/instances/[instance_id]/backups.vue similarity index 100% rename from apps/frontend/src/pages/hosting/manage/[id]/worlds/[world_id]/backups.vue rename to apps/frontend/src/pages/hosting/manage/[id]/instances/[instance_id]/backups.vue diff --git a/apps/frontend/src/pages/hosting/manage/[id]/worlds/[world_id]/files.vue b/apps/frontend/src/pages/hosting/manage/[id]/instances/[instance_id]/files.vue similarity index 100% rename from apps/frontend/src/pages/hosting/manage/[id]/worlds/[world_id]/files.vue rename to apps/frontend/src/pages/hosting/manage/[id]/instances/[instance_id]/files.vue diff --git a/apps/frontend/src/pages/hosting/manage/[id]/worlds/[world_id]/index.vue b/apps/frontend/src/pages/hosting/manage/[id]/instances/[instance_id]/index.vue similarity index 100% rename from apps/frontend/src/pages/hosting/manage/[id]/worlds/[world_id]/index.vue rename to apps/frontend/src/pages/hosting/manage/[id]/instances/[instance_id]/index.vue diff --git a/apps/frontend/src/pages/hosting/manage/[id]/worlds/index.vue b/apps/frontend/src/pages/hosting/manage/[id]/instances/index.vue similarity index 73% rename from apps/frontend/src/pages/hosting/manage/[id]/worlds/index.vue rename to apps/frontend/src/pages/hosting/manage/[id]/instances/index.vue index 5305138f0a..4c34cae24b 100644 --- a/apps/frontend/src/pages/hosting/manage/[id]/worlds/index.vue +++ b/apps/frontend/src/pages/hosting/manage/[id]/instances/index.vue @@ -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({ diff --git a/apps/frontend/src/pages/hosting/manage/[id]/worlds/[world_id].vue b/apps/frontend/src/pages/hosting/manage/[id]/worlds/[world_id].vue deleted file mode 100644 index 357dc14f4a..0000000000 --- a/apps/frontend/src/pages/hosting/manage/[id]/worlds/[world_id].vue +++ /dev/null @@ -1,11 +0,0 @@ - - - diff --git a/packages/ui/src/components/servers/ServerManageStats.vue b/packages/ui/src/components/servers/ServerManageStats.vue index 47247646c6..4fac584ef7 100644 --- a/packages/ui/src/components/servers/ServerManageStats.vue +++ b/packages/ui/src/components/servers/ServerManageStats.vue @@ -191,8 +191,8 @@ const metrics = computed(() => { chartOptions: null as ReturnType | null, series: null as { name: string; data: number[] }[] | null, link: worldId.value - ? `/hosting/manage/${encodeURIComponent(serverId)}/worlds/${encodeURIComponent(worldId.value)}/files` - : `/hosting/manage/${encodeURIComponent(serverId)}/worlds`, + ? `/hosting/manage/${encodeURIComponent(serverId)}/instances/${encodeURIComponent(worldId.value)}/files` + : `/hosting/manage/${encodeURIComponent(serverId)}/instances`, } if (props.loading) { diff --git a/packages/ui/src/components/servers/admonitions/ServerPanelAdmonitions.vue b/packages/ui/src/components/servers/admonitions/ServerPanelAdmonitions.vue index 749d77d615..de7e6c210d 100644 --- a/packages/ui/src/components/servers/admonitions/ServerPanelAdmonitions.vue +++ b/packages/ui/src/components/servers/admonitions/ServerPanelAdmonitions.vue @@ -59,7 +59,7 @@ const isOnFilesTab = computed(() => route.path.includes('/files')) const isOnContentTab = computed( () => route.path.includes('/content') || - (!!route.params.world_id && !isOnFilesTab.value && !route.path.includes('/backups')), + (!!route.params.instance_id && !isOnFilesTab.value && !route.path.includes('/backups')), ) const bannerCoversInstalling = computed( diff --git a/packages/ui/src/components/servers/worlds/WorldCard.vue b/packages/ui/src/components/servers/instances/InstanceCard.vue similarity index 90% rename from packages/ui/src/components/servers/worlds/WorldCard.vue rename to packages/ui/src/components/servers/instances/InstanceCard.vue index 9b202ff204..223bad2729 100644 --- a/packages/ui/src/components/servers/worlds/WorldCard.vue +++ b/packages/ui/src/components/servers/instances/InstanceCard.vue @@ -76,7 +76,7 @@

{{ world.name }}

- {{ formatMessage(messages.newWorldInstance) }} + {{ formatMessage(messages.newInstance) }}

@@ -85,7 +85,7 @@ @@ -172,12 +172,12 @@