fix: instance redirects to root page with / making it appear as a sub-page in navigation (#6040)
This commit is contained in:
@@ -149,7 +149,7 @@ const handleOptionsClick = async (args) => {
|
|||||||
break
|
break
|
||||||
case 'edit':
|
case 'edit':
|
||||||
await router.push({
|
await router.push({
|
||||||
path: `/instance/${encodeURIComponent(args.item.path)}/`,
|
path: `/instance/${encodeURIComponent(args.item.path)}`,
|
||||||
})
|
})
|
||||||
break
|
break
|
||||||
case 'duplicate':
|
case 'duplicate':
|
||||||
|
|||||||
@@ -486,7 +486,7 @@ export function createContentInstall(opts: {
|
|||||||
if (!id) return
|
if (!id) return
|
||||||
|
|
||||||
await add_project_from_version(id, version.id, 'standalone')
|
await add_project_from_version(id, version.id, 'standalone')
|
||||||
await opts.router.push(`/instance/${encodeURIComponent(id)}/`)
|
await opts.router.push(`/instance/${encodeURIComponent(id)}`)
|
||||||
|
|
||||||
const instance = await get(id)
|
const instance = await get(id)
|
||||||
await installVersionDependencies(instance, version, 'dependency')
|
await installVersionDependencies(instance, version, 'dependency')
|
||||||
@@ -513,7 +513,7 @@ export function createContentInstall(opts: {
|
|||||||
|
|
||||||
function handleNavigate(instance: ContentInstallInstance) {
|
function handleNavigate(instance: ContentInstallInstance) {
|
||||||
modalRef?.hide()
|
modalRef?.hide()
|
||||||
opts.router.push(`/instance/${encodeURIComponent(instance.id)}/`)
|
opts.router.push(`/instance/${encodeURIComponent(instance.id)}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleCancel() {
|
function handleCancel() {
|
||||||
@@ -666,7 +666,7 @@ export function createContentInstall(opts: {
|
|||||||
},
|
},
|
||||||
handleModpackDuplicateGoToInstance(instancePath: string) {
|
handleModpackDuplicateGoToInstance(instancePath: string) {
|
||||||
pendingModpackInstall = null
|
pendingModpackInstall = null
|
||||||
opts.router.push(`/instance/${encodeURIComponent(instancePath)}/`)
|
opts.router.push(`/instance/${encodeURIComponent(instancePath)}`)
|
||||||
},
|
},
|
||||||
setIncompatibilityWarningModal(ref: IncompatibilityWarningModalRef) {
|
setIncompatibilityWarningModal(ref: IncompatibilityWarningModalRef) {
|
||||||
incompatibilityWarningModalRef = ref
|
incompatibilityWarningModalRef = ref
|
||||||
|
|||||||
Reference in New Issue
Block a user