diff --git a/nuxt.config.js b/nuxt.config.js index b5e23236..26d3193e 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -155,6 +155,11 @@ export default { component: resolve(__dirname, 'pages/search/modpacks.vue'), name: 'modpacks', }, + { + path: '/resourcepacks', + component: resolve(__dirname, 'pages/search/resourcepacks.vue'), + name: 'resourcepacks', + }, ], }) @@ -309,7 +314,7 @@ export default { }, hooks: { render: { - routeDone(url) { + routeDone(url, result, context) { setTimeout(() => { axios .post( @@ -323,6 +328,12 @@ export default { { headers: { 'Modrinth-Admin': process.env.ARIADNE_ADMIN_KEY || 'feedbeef', + 'User-Agent': + context.req.rawHeaders[ + context.req.rawHeaders.findIndex( + (x) => x === 'User-Agent' + ) + 1 + ], }, } ) diff --git a/pages/create/project.vue b/pages/create/project.vue index 9950a6a2..e32e860b 100644 --- a/pages/create/project.vue +++ b/pages/create/project.vue @@ -54,16 +54,18 @@ Type* - The type of project of your project. + The type of project your project is. @@ -106,11 +108,7 @@ + + + + Additional Categories + + Select more categories that will help others + find your project. These are searchable, but not + displayed in search. + + + Vanity URL (slug)* https://modrinth.com/{{ projectType.toLowerCase() }}/{{ + >https://modrinth.com/{{ projectType.id }}/{{ slug ? slug : 'your-slug' }} @@ -402,9 +431,7 @@ :options=" $tag.loaders .filter((x) => - x.supported_project_types.includes( - projectType.toLowerCase() - ) + x.supported_project_types.includes(projectType.id) ) .map((it) => it.name) " @@ -549,10 +576,7 @@ You may upload multiple files, but this should only be used for cases like sources or Javadocs. - + Modpack support is currently in alpha, and you may encounter issues. Our documentation includes instructions on + x.project_type === this.projectType.id && + !this.additional_categories.includes(x.name) + ) + .map((it) => it.name) + + this.selectableAdditionalCategories = this.$tag.categories + .filter( + (x) => + x.project_type === this.projectType.id && + !this.categories.includes(x.name) + ) + .map((it) => it.name) + }, checkFields() { const reviewConditions = this.body !== '' && this.versions.length > 0 if ( @@ -1256,7 +1320,7 @@ export default { 'data', JSON.stringify({ title: this.name, - project_type: this.projectType.toLowerCase(), + project_type: this.projectType.id, slug: this.slug, description: this.description, body: this.body, @@ -1269,6 +1333,7 @@ export default { }, ], categories: this.categories, + additional_categories: this.additional_categories, issues_url: this.issues_url ? this.issues_url : null, source_url: this.source_url ? this.source_url : null, wiki_url: this.wiki_url ? this.wiki_url : null, diff --git a/pages/search.vue b/pages/search.vue index 0d94b19a..8d13352d 100644 --- a/pages/search.vue +++ b/pages/search.vue @@ -267,7 +267,7 @@ :icon-url="result.icon_url" :client-side="result.client_side" :server-side="result.server_side" - :categories="result.categories" + :categories="result.display_categories" /> No results found for your query! diff --git a/pages/search/resourcepacks.vue b/pages/search/resourcepacks.vue new file mode 100644 index 00000000..8bdafa6e --- /dev/null +++ b/pages/search/resourcepacks.vue @@ -0,0 +1,34 @@ + + + + + + +
+
Modpack support is currently in alpha, and you may encounter issues. Our documentation includes instructions on + x.project_type === this.projectType.id && + !this.additional_categories.includes(x.name) + ) + .map((it) => it.name) + + this.selectableAdditionalCategories = this.$tag.categories + .filter( + (x) => + x.project_type === this.projectType.id && + !this.categories.includes(x.name) + ) + .map((it) => it.name) + }, checkFields() { const reviewConditions = this.body !== '' && this.versions.length > 0 if ( @@ -1256,7 +1320,7 @@ export default { 'data', JSON.stringify({ title: this.name, - project_type: this.projectType.toLowerCase(), + project_type: this.projectType.id, slug: this.slug, description: this.description, body: this.body, @@ -1269,6 +1333,7 @@ export default { }, ], categories: this.categories, + additional_categories: this.additional_categories, issues_url: this.issues_url ? this.issues_url : null, source_url: this.source_url ? this.source_url : null, wiki_url: this.wiki_url ? this.wiki_url : null, diff --git a/pages/search.vue b/pages/search.vue index 0d94b19a..8d13352d 100644 --- a/pages/search.vue +++ b/pages/search.vue @@ -267,7 +267,7 @@ :icon-url="result.icon_url" :client-side="result.client_side" :server-side="result.server_side" - :categories="result.categories" + :categories="result.display_categories" /> No results found for your query! diff --git a/pages/search/resourcepacks.vue b/pages/search/resourcepacks.vue new file mode 100644 index 00000000..8bdafa6e --- /dev/null +++ b/pages/search/resourcepacks.vue @@ -0,0 +1,34 @@ + + + + + + +
No results found for your query!