You've already forked AstralRinth
forked from didirus/AstralRinth
Datapack support (#815)
* Shader support PR * Make search page work * Fix env showing * Make moderation look reasonable * Fix search for shaders * Datapack support * Make file types work + datapack inferring * Add editing to file types * Finish datapack file generation * Fix bugs, make forge support work * Fix inconsistent data pack label * Final fixes
This commit is contained in:
@@ -78,7 +78,9 @@
|
||||
</div>
|
||||
</section>
|
||||
<section
|
||||
v-if="projectType.id !== 'resourcepack'"
|
||||
v-if="
|
||||
projectType.id !== 'resourcepack' && projectType.id !== 'datapack'
|
||||
"
|
||||
aria-label="Loader filters"
|
||||
>
|
||||
<h3
|
||||
@@ -101,15 +103,15 @@
|
||||
x.name !== 'quilt'
|
||||
) {
|
||||
return false
|
||||
}
|
||||
|
||||
if (projectType.id === 'mod' && showAllLoaders) {
|
||||
} else if (projectType.id === 'mod' && showAllLoaders) {
|
||||
return $tag.loaderData.modLoaders.includes(x.name)
|
||||
} else if (projectType.id === 'plugin') {
|
||||
return $tag.loaderData.pluginLoaders.includes(x.name)
|
||||
} else if (projectType.id === 'datapack') {
|
||||
return $tag.loaderData.dataPackLoaders.includes(x.name)
|
||||
} else {
|
||||
return x.supported_project_types.includes(projectType.actual)
|
||||
}
|
||||
|
||||
return projectType.id === 'plugin'
|
||||
? $tag.loaderData.pluginLoaders.includes(x.name)
|
||||
: x.supported_project_types.includes(projectType.actual)
|
||||
})"
|
||||
:key="loader.name"
|
||||
ref="loaderFilters"
|
||||
@@ -158,7 +160,9 @@
|
||||
</section>
|
||||
<section
|
||||
v-if="
|
||||
!['resourcepack', 'plugin', 'shader'].includes(projectType.id)
|
||||
!['resourcepack', 'plugin', 'shader', 'datapack'].includes(
|
||||
projectType.id
|
||||
)
|
||||
"
|
||||
aria-label="Environment filters"
|
||||
>
|
||||
@@ -376,6 +380,9 @@
|
||||
:categories="result.display_categories"
|
||||
:search="true"
|
||||
:show-updated-date="sortType.name !== 'newest'"
|
||||
:hide-loaders="
|
||||
['resourcepack', 'datapack'].includes(projectType.id)
|
||||
"
|
||||
/>
|
||||
<div v-if="results && results.length === 0" class="no-results">
|
||||
<p>No results found for your query!</p>
|
||||
@@ -714,6 +721,12 @@ export default {
|
||||
(x) => `categories:'${encodeURIComponent(x)}'`
|
||||
)
|
||||
)
|
||||
} else if (this.projectType.id === 'datapack') {
|
||||
formattedFacets.push(
|
||||
this.$tag.loaderData.dataPackLoaders.map(
|
||||
(x) => `categories:'${encodeURIComponent(x)}'`
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
if (this.selectedVersions.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user