Fix plugin URLs, display, redirects (#619)

* Fix plugin URLs, display, redirects

* Fix user profile + some redirects not working
This commit is contained in:
Geometrically
2022-08-20 11:08:21 -07:00
committed by GitHub
parent 7c166d85e1
commit 20c4f0dc10
7 changed files with 102 additions and 31 deletions

View File

@@ -2,7 +2,7 @@
<article class="project-card card" :aria-label="name" role="listitem">
<div class="columns">
<div class="icon">
<nuxt-link :to="`/${type}/${id}`">
<nuxt-link :to="`/${$getProjectTypeForUrl(type, categories)}/${id}`">
<img
:src="iconUrl || 'https://cdn.modrinth.com/placeholder.svg?inline'"
:alt="name"
@@ -19,7 +19,10 @@
<div class="info">
<div class="top">
<h2 class="title">
<nuxt-link :to="`/${type}/${id}`">{{ name }}</nuxt-link>
<nuxt-link
:to="`/${$getProjectTypeForUrl(type, categories)}/${id}`"
>{{ name }}</nuxt-link
>
</h2>
<p v-if="author" class="author">
by
@@ -29,7 +32,10 @@
</p>
</div>
<div
v-if="type !== 'resourcepack' && projectTypeDisplay !== 'plugin'"
v-if="
type !== 'resourcepack' &&
!(projectTypeDisplay === 'plugin' && search)
"
class="side-type"
>
<div
@@ -233,6 +239,11 @@ export default {
required: false,
default: false,
},
search: {
type: Boolean,
required: false,
default: false,
},
},
computed: {
projectTypeDisplay() {