Fix loaders not showing (#622)

* Fix loaders not showing

* p

Co-authored-by: wafflecoffee <emmaffle@modrinth.com>
This commit is contained in:
Geometrically
2022-08-22 15:25:42 -07:00
committed by GitHub
parent 20c4f0dc10
commit 27d6b855b8
3 changed files with 16 additions and 11 deletions

View File

@@ -37,7 +37,7 @@
<div
v-if="
project.project_type !== 'resourcepack' &&
projectTypeDisplay !== 'plugin'
project.project_type !== 'plugin'
"
>
<div
@@ -81,7 +81,7 @@
</p>
<Categories
:categories="project.categories"
:type="project.project_type"
:type="project.actualProjectType"
class="categories"
/>
<hr class="card-divider" />
@@ -417,7 +417,7 @@
<div
v-if="
project.project_type !== 'resourcepack' &&
projectTypeDisplay !== 'plugin'
project.project_type !== 'plugin'
"
class="info"
>
@@ -429,7 +429,7 @@
<div
v-if="
project.project_type !== 'resourcepack' &&
projectTypeDisplay !== 'plugin'
project.project_type !== 'plugin'
"
class="info"
>
@@ -663,6 +663,10 @@ export default {
}
}
project.actualProjectType = JSON.parse(
JSON.stringify(project.project_type)
)
project.project_type = data.$getProjectTypeForUrl(
project.project_type,
Object.keys(projectLoaders)

View File

@@ -135,8 +135,9 @@
<span>
<h3>Additional Categories</h3>
<span class="no-padding">
Select up to 3 categories that will help others <br />
find your project.
Select more categories that will help others <br />
find your project. These are searchable, but not <br />
displayed in search.
</span>
</span>
<Multiselect
@@ -625,7 +626,7 @@ export default {
this.selectableCategories = this.$tag.categories
.filter(
(x) =>
x.project_type === this.project.project_type &&
x.project_type === this.project.actualProjectType &&
!this.newProject.additional_categories.includes(x.name)
)
.map((it) => it.name)
@@ -633,7 +634,7 @@ export default {
this.selectableAdditionalCategories = this.$tag.categories
.filter(
(x) =>
x.project_type === this.project.project_type &&
x.project_type === this.project.actualProjectType &&
!this.newProject.categories.includes(x.name)
)
.map((it) => it.name)

View File

@@ -218,7 +218,7 @@
$tag.loaders
.filter((x) =>
x.supported_project_types.includes(
project.project_type.toLowerCase()
project.actualProjectType.toLowerCase()
)
)
.map((it) => it.name)
@@ -528,10 +528,10 @@
multiple
class="choose-files"
:accept="
project.project_type.toLowerCase() === 'modpack'
project.actualProjectType.toLowerCase() === 'modpack'
? '.mrpack,application/x-modrinth-modpack+zip'
: project.project_type.toLowerCase() === 'mod'
? '.jar,application/java-archive'
? '.jar,actualProjectType/java-archive'
: '*'
"
prompt="Choose files or drag them here"