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 <div
v-if=" v-if="
project.project_type !== 'resourcepack' && project.project_type !== 'resourcepack' &&
projectTypeDisplay !== 'plugin' project.project_type !== 'plugin'
" "
> >
<div <div
@@ -81,7 +81,7 @@
</p> </p>
<Categories <Categories
:categories="project.categories" :categories="project.categories"
:type="project.project_type" :type="project.actualProjectType"
class="categories" class="categories"
/> />
<hr class="card-divider" /> <hr class="card-divider" />
@@ -417,7 +417,7 @@
<div <div
v-if=" v-if="
project.project_type !== 'resourcepack' && project.project_type !== 'resourcepack' &&
projectTypeDisplay !== 'plugin' project.project_type !== 'plugin'
" "
class="info" class="info"
> >
@@ -429,7 +429,7 @@
<div <div
v-if=" v-if="
project.project_type !== 'resourcepack' && project.project_type !== 'resourcepack' &&
projectTypeDisplay !== 'plugin' project.project_type !== 'plugin'
" "
class="info" 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 = data.$getProjectTypeForUrl(
project.project_type, project.project_type,
Object.keys(projectLoaders) Object.keys(projectLoaders)

View File

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

View File

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