Project wireup (#80)

* Remove unneeded style

* Base modpack wire up

* Run lint

* Thats not supposed to be there

* Remove errant class

* Fix safety

* Username => ID

* fix id missing

* Fix bug with clicking

* remove unnecessary

* Update Versions.vue

* Addressed changes

* Lintttt
This commit is contained in:
Adrian O.V
2023-04-12 22:29:40 -04:00
committed by GitHub
parent 06ace174e6
commit bb126c0545
9 changed files with 111 additions and 52 deletions

View File

@@ -6,7 +6,7 @@
<span v-if="version.featured">Auto-Featured</span>
</div>
<div class="button-group">
<Button color="primary">
<Button color="primary" :action="() => install(version.id)">
<DownloadIcon />
Install
</Button>
@@ -53,7 +53,11 @@
<span v-if="file.primary" class="primary-label"> Primary </span>
</span>
</span>
<Button class="download">
<Button
v-if="project.project_type !== 'modpack' || file.primary"
class="download"
:action="() => install(version.id)"
>
<DownloadIcon />
Install
</Button>
@@ -183,6 +187,10 @@ import { useRoute } from 'vue-router'
const route = useRoute()
const props = defineProps({
project: {
type: Object,
required: true,
},
versions: {
type: Array,
required: true,
@@ -195,6 +203,10 @@ const props = defineProps({
type: Array,
required: true,
},
install: {
type: Function,
required: true,
},
})
const version = ref(props.versions.find((version) => version.id === route.params.version))