@@ -211,7 +211,10 @@ function syncHiddenInstalledProjectIds() {
211211 hiddenInstalledProjectIdsInitialized .value = true
212212}
213213
214- const contentQueryKey = computed (() => [' content' , ' list' , currentServerId .value ?? ' ' ] as const )
214+ const contentQueryKey = computed (
215+ () =>
216+ [' content' , ' list' , ' v1' , currentServerId .value ?? ' ' , currentWorldId .value ?? null ] as const ,
217+ )
215218const { data : serverContentData, error : serverContentError } = useQuery ({
216219 queryKey: contentQueryKey ,
217220 queryFn : () => client .archon .content_v1 .getAddons (currentServerId .value ! , currentWorldId .value ! ),
@@ -252,7 +255,7 @@ const installContentMutation = useMutation({
252255 }),
253256 onSuccess : () => {
254257 if (currentServerId .value ) {
255- queryClient .refetchQueries ({ queryKey: [ ' content ' , ' list ' , currentServerId .value ] })
258+ queryClient .refetchQueries ({ queryKey: contentQueryKey .value })
256259 }
257260 },
258261})
@@ -551,7 +554,7 @@ async function onModpackFlowCreate(config: CreationFlowContextValue) {
551554 if (fromContext .value === ' onboarding' ) {
552555 await client .archon .servers_v1 .endIntro (currentServerId .value )
553556 queryClient .invalidateQueries ({ queryKey: [' servers' , ' detail' , currentServerId .value ] })
554- navigateTo (` /hosting/manage/${ currentServerId .value }/content ` )
557+ navigateTo (getServerWorldContentPath ( currentServerId .value , currentWorldId . value ?? null ) )
555558 } else {
556559 navigateTo (` /hosting/manage/${currentServerId .value }?openSettings=installation ` )
557560 }
@@ -566,9 +569,14 @@ const serverBackUrl = computed(() => {
566569 const id = serverData .value .server_id
567570 if (fromContext .value === ' onboarding' ) return ` /hosting/manage/${id }?resumeModal=setup-type `
568571 if (fromContext .value === ' reset-server' ) return ` /hosting/manage/${id }?openSettings=installation `
569- return ` /hosting/manage/${ id }/content `
572+ return getServerWorldContentPath ( id , currentWorldId . value ?? null )
570573})
571574
575+ function getServerWorldContentPath(serverId : string , worldId : string | null ) {
576+ const base = ` /hosting/manage/${encodeURIComponent (serverId )}/worlds `
577+ return worldId ? ` ${base }/${encodeURIComponent (worldId )} ` : base
578+ }
579+
572580const serverBackLabel = computed (() => {
573581 if (fromContext .value === ' onboarding' ) return ' Back to setup'
574582 if (fromContext .value === ' reset-server' ) return ' Cancel reset'
0 commit comments