From 848e26eec61534a829ff26a209f5f78d0b654c1f Mon Sep 17 00:00:00 2001 From: Geometrically <18202329+Geometrically@users.noreply.github.com> Date: Tue, 2 Aug 2022 20:28:43 -0700 Subject: [PATCH] Revert "Additional categories + fix project creation" (#591) This reverts commit 62e86f95076929907c4326a8b8ced482313e9854. --- nuxt.config.js | 13 +---- pages/create/project.vue | 103 ++++++--------------------------- pages/search.vue | 2 +- pages/search/resourcepacks.vue | 34 ----------- 4 files changed, 21 insertions(+), 131 deletions(-) delete mode 100644 pages/search/resourcepacks.vue diff --git a/nuxt.config.js b/nuxt.config.js index 26d3193e4..b5e23236c 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -155,11 +155,6 @@ export default { component: resolve(__dirname, 'pages/search/modpacks.vue'), name: 'modpacks', }, - { - path: '/resourcepacks', - component: resolve(__dirname, 'pages/search/resourcepacks.vue'), - name: 'resourcepacks', - }, ], }) @@ -314,7 +309,7 @@ export default { }, hooks: { render: { - routeDone(url, result, context) { + routeDone(url) { setTimeout(() => { axios .post( @@ -328,12 +323,6 @@ 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 e32e860b8..9950a6a29 100644 --- a/pages/create/project.vue +++ b/pages/create/project.vue @@ -54,18 +54,16 @@ Type* - The type of project your project is. + The type of project of your project. @@ -108,7 +106,11 @@ - - - - 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.id }}/{{ + >https://modrinth.com/{{ projectType.toLowerCase() }}/{{ slug ? slug : 'your-slug' }} @@ -431,7 +402,9 @@ :options=" $tag.loaders .filter((x) => - x.supported_project_types.includes(projectType.id) + x.supported_project_types.includes( + projectType.toLowerCase() + ) ) .map((it) => it.name) " @@ -576,7 +549,10 @@ 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 ( @@ -1320,7 +1256,7 @@ export default { 'data', JSON.stringify({ title: this.name, - project_type: this.projectType.id, + project_type: this.projectType.toLowerCase(), slug: this.slug, description: this.description, body: this.body, @@ -1333,7 +1269,6 @@ 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 8d13352d1..0d94b19af 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.display_categories" + :categories="result.categories" /> No results found for your query! diff --git a/pages/search/resourcepacks.vue b/pages/search/resourcepacks.vue deleted file mode 100644 index 8bdafa6eb..000000000 --- a/pages/search/resourcepacks.vue +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - -
+
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 ( @@ -1320,7 +1256,7 @@ export default { 'data', JSON.stringify({ title: this.name, - project_type: this.projectType.id, + project_type: this.projectType.toLowerCase(), slug: this.slug, description: this.description, body: this.body, @@ -1333,7 +1269,6 @@ 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 8d13352d1..0d94b19af 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.display_categories" + :categories="result.categories" /> No results found for your query! diff --git a/pages/search/resourcepacks.vue b/pages/search/resourcepacks.vue deleted file mode 100644 index 8bdafa6eb..000000000 --- a/pages/search/resourcepacks.vue +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - -
No results found for your query!