Skip to content

Commit

Permalink
fix: Curseforge does not installed to instance
Browse files Browse the repository at this point in the history
  • Loading branch information
ci010 committed Nov 5, 2023
1 parent 0b14812 commit bb26555
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion xmcl-keystone-ui/src/composables/curseforgeInstall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export function useCurseforgeInstall(modId: Ref<number>, files: Ref<Pick<File, '
})
}
} else {
await installFile({ file, type: type.value, icon: project.value?.logo.url })
await installFile({ file, type: type.value, icon: project.value?.logo.url, instancePath: from.value })
}
}
return {
Expand Down
4 changes: 2 additions & 2 deletions xmcl-keystone-ui/src/views/CurseforgeProject.vue
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,10 @@ if (upstream) {
const latestFileIndex = computed(() => project.value?.latestFilesIndexes.find(f => f.gameVersion === upstream.value.minecraft))
const current = useLatestCurseforgeResource(modId, latestFileIndex)
provide(kLatestCurseforgeResource, current)
provide(kCurseforgeInstall, useCurseforgeInstall(modId, allFiles, destination, computed(() => props.type), current.resource))
provide(kCurseforgeInstall, useCurseforgeInstall(modId, allFiles, path, computed(() => props.type), current.resource))
} else {
// Common Curseforge install function
provide(kCurseforgeInstall, useCurseforgeInstall(modId, allFiles, destination, computed(() => props.type), computed(() => undefined)))
provide(kCurseforgeInstall, useCurseforgeInstall(modId, allFiles, path, computed(() => props.type), computed(() => undefined)))
}
const gameVersions = computed(() => {
Expand Down
2 changes: 1 addition & 1 deletion xmcl-keystone-ui/src/views/Mod.vue
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ onMounted(() => {
})
// Reset all filter
onMounted(() => {
onUnmounted(() => {
modrinthCategories.value = []
curseforgeCategory.value = undefined
})
Expand Down
2 changes: 1 addition & 1 deletion xmcl-keystone-ui/src/views/ResourcePack.vue
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ const onDrop = (item: ResourcePackProject, id: string) => {
const toggleCategory = useToggleCategories(modrinthCategories)
// Reset all filter
onMounted(() => {
onUnmounted(() => {
keyword.value = ''
modrinthCategories.value = []
curseforgeCategory.value = undefined
Expand Down
2 changes: 1 addition & 1 deletion xmcl-keystone-ui/src/views/ShaderPack.vue
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ const onEnable = (f: ProjectFile) => {
}
// Reset all filter
onMounted(() => {
onUnmounted(() => {
keyword.value = ''
modrinthCategories.value = []
})
Expand Down

0 comments on commit bb26555

Please sign in to comment.