Skip to content

Commit

Permalink
fix: Should correctly install curseforge resources
Browse files Browse the repository at this point in the history
  • Loading branch information
ci010 committed Jan 2, 2024
1 parent a8b2e46 commit b37572d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion xmcl-keystone-ui/src/composables/curseforgeInstaller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export function useCurseforgeInstaller(
allFiles: Ref<ProjectFile[]>,
installResource: (resource: Resource[]) => void,
uninstallResource: (files: ProjectFile[]) => void,
type: 'mc-mods' | 'texture-packs' | 'worlds' | 'modpacks',
) {
const { getResourcesByUris } = useService(ResourceServiceKey)
const { installFile } = useService(CurseForgeServiceKey)
Expand All @@ -24,7 +25,7 @@ export function useCurseforgeInstaller(
if (resources.length > 0) {
installResource(resources)
} else {
const { resource } = await installFile({ file: v, icon, type: 'mc-mods' })
const { resource } = await installFile({ file: v, icon, type })
installResource([resource])
}
}
Expand Down
1 change: 1 addition & 0 deletions xmcl-keystone-ui/src/views/Mod.vue
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@ const curseforgeInstaller = useCurseforgeInstaller(
mods,
onInstall,
onUninstall,
'mc-mods',
)
provide(kCurseforgeInstaller, curseforgeInstaller)
Expand Down
1 change: 1 addition & 0 deletions xmcl-keystone-ui/src/views/ResourcePack.vue
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ const curseforgeInstaller = useCurseforgeInstaller(
files,
onInstall,
onUninstall,
'texture-packs',
)
provide(kCurseforgeInstaller, curseforgeInstaller)
Expand Down
1 change: 1 addition & 0 deletions xmcl-keystone-ui/src/views/ShaderPack.vue
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ const curseforgeInstaller = useCurseforgeInstaller(
shaderProjectFiles,
onInstall,
onUninstall,
'mc-mods',
)
provide(kCurseforgeInstaller, curseforgeInstaller)
Expand Down

0 comments on commit b37572d

Please sign in to comment.