You've already forked AstralRinth
forked from didirus/AstralRinth
Fix duplicate version nums + etc (#831)
* Fix duplicate version nums + etc * Update link info * Remove useless loading conditions * Update pages/legal/privacy.vue Co-authored-by: triphora <emmaffle@modrinth.com> * Update plugins/xss.js Co-authored-by: triphora <emmaffle@modrinth.com> Co-authored-by: triphora <emmaffle@modrinth.com>
This commit is contained in:
@@ -165,11 +165,19 @@
|
||||
</button>
|
||||
</template>
|
||||
<template v-else>
|
||||
<a class="iconified-button" :href="authUrl">
|
||||
<a
|
||||
class="iconified-button"
|
||||
:href="authUrl"
|
||||
rel="noopener noreferrer nofollow"
|
||||
>
|
||||
<ReportIcon aria-hidden="true" />
|
||||
Report
|
||||
</a>
|
||||
<a class="iconified-button" :href="authUrl">
|
||||
<a
|
||||
class="iconified-button"
|
||||
:href="authUrl"
|
||||
rel="noopener noreferrer nofollow"
|
||||
>
|
||||
<HeartIcon aria-hidden="true" />
|
||||
Follow
|
||||
</a>
|
||||
@@ -307,6 +315,7 @@
|
||||
:href="project.issues_url"
|
||||
class="title"
|
||||
:target="$external()"
|
||||
rel="noopener noreferrer nofollow ugc"
|
||||
>
|
||||
<IssuesIcon aria-hidden="true" />
|
||||
<span>Issues</span>
|
||||
@@ -316,6 +325,7 @@
|
||||
:href="project.source_url"
|
||||
class="title"
|
||||
:target="$external()"
|
||||
rel="noopener noreferrer nofollow ugc"
|
||||
>
|
||||
<CodeIcon aria-hidden="true" />
|
||||
<span>Source</span>
|
||||
@@ -325,6 +335,7 @@
|
||||
:href="project.wiki_url"
|
||||
class="title"
|
||||
:target="$external()"
|
||||
rel="noopener noreferrer nofollow ugc"
|
||||
>
|
||||
<WikiIcon aria-hidden="true" />
|
||||
<span>Wiki</span>
|
||||
@@ -333,6 +344,7 @@
|
||||
v-if="project.discord_url"
|
||||
:href="project.discord_url"
|
||||
:target="$external()"
|
||||
rel="noopener noreferrer nofollow ugc"
|
||||
>
|
||||
<DiscordIcon class="shrink" aria-hidden="true" />
|
||||
<span>Discord</span>
|
||||
@@ -342,6 +354,7 @@
|
||||
:key="index"
|
||||
:href="donation.url"
|
||||
:target="$external()"
|
||||
rel="noopener noreferrer nofollow ugc"
|
||||
>
|
||||
<BuyMeACoffeeLogo
|
||||
v-if="donation.id === 'bmac'"
|
||||
@@ -579,11 +592,24 @@
|
||||
>our documentation</a
|
||||
>
|
||||
which provides instructions on using
|
||||
<a href="https://atlauncher.com/about" :target="$external()">
|
||||
<a
|
||||
href="https://atlauncher.com/about"
|
||||
:target="$external()"
|
||||
rel="noopener noreferrer nofollow"
|
||||
>
|
||||
ATLauncher</a
|
||||
>, <a href="https://multimc.org/" :target="$external()">MultiMC</a>,
|
||||
and
|
||||
<a href="https://prismlauncher.org" :target="$external()">
|
||||
>,
|
||||
<a
|
||||
href="https://multimc.org/"
|
||||
:target="$external()"
|
||||
rel="noopener noreferrer nofollow"
|
||||
>MultiMC</a
|
||||
>, and
|
||||
<a
|
||||
href="https://prismlauncher.org"
|
||||
:target="$external()"
|
||||
rel="noopener noreferrer nofollow"
|
||||
>
|
||||
Prism Launcher</a
|
||||
>.
|
||||
</div>
|
||||
|
||||
@@ -105,19 +105,6 @@ export default {
|
||||
fetch() {
|
||||
if (this.$route.query.page)
|
||||
this.currentPage = parseInt(this.$route.query.page)
|
||||
|
||||
this.filteredVersions = this.versions.map((version, index) => {
|
||||
const nextVersion = this.versions[index + 1]
|
||||
if (
|
||||
nextVersion &&
|
||||
version.changelog &&
|
||||
nextVersion.changelog === version.changelog
|
||||
) {
|
||||
return { duplicate: true, ...version }
|
||||
} else {
|
||||
return { duplicate: false, ...version }
|
||||
}
|
||||
})
|
||||
},
|
||||
head() {
|
||||
const title = `${this.project.title} - Changelog`
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
<button
|
||||
title="Save"
|
||||
class="iconified-button brand-button column"
|
||||
:disabled="!$nuxt.$loading"
|
||||
@click="saveProject"
|
||||
>
|
||||
<SaveIcon />
|
||||
@@ -275,7 +274,7 @@
|
||||
class="text-link"
|
||||
href="https://guides.github.com/features/mastering-markdown/"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
rel="noopener noreferrer nofollow"
|
||||
>Markdown</a
|
||||
>. HTML can also be used inside your description, not including styles,
|
||||
scripts, and iframes (though YouTube iframes are allowed).
|
||||
@@ -385,7 +384,7 @@
|
||||
<a
|
||||
href="https://spdx.org/licenses/"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
rel="noopener noreferrer nofollow"
|
||||
class="text-link"
|
||||
>SPDX license identifier</a
|
||||
>
|
||||
@@ -399,7 +398,7 @@
|
||||
<a
|
||||
href="https://blog.modrinth.com/licensing-guide/"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
rel="noopener noreferrer nofollow"
|
||||
class="text-link"
|
||||
>
|
||||
licensing guide</a
|
||||
|
||||
@@ -104,7 +104,6 @@
|
||||
<button
|
||||
v-if="editIndex === -1"
|
||||
class="iconified-button brand-button"
|
||||
:disabled="!$nuxt.$loading"
|
||||
@click="createGalleryItem"
|
||||
>
|
||||
<PlusIcon />
|
||||
@@ -113,7 +112,6 @@
|
||||
<button
|
||||
v-else
|
||||
class="iconified-button brand-button"
|
||||
:disabled="!$nuxt.$loading"
|
||||
@click="editGalleryItem"
|
||||
>
|
||||
<SaveIcon />
|
||||
|
||||
@@ -58,7 +58,6 @@
|
||||
</button>
|
||||
<button
|
||||
class="iconified-button brand-button"
|
||||
:disabled="!$nuxt.$loading"
|
||||
@click="createDataPackVersion"
|
||||
>
|
||||
<RightArrowIcon />
|
||||
@@ -120,11 +119,7 @@
|
||||
</ul>
|
||||
</div>
|
||||
<div v-if="isCreating" class="input-group">
|
||||
<button
|
||||
class="iconified-button brand-button"
|
||||
:disabled="!$nuxt.$loading"
|
||||
@click="createVersion"
|
||||
>
|
||||
<button class="iconified-button brand-button" @click="createVersion">
|
||||
<PlusIcon aria-hidden="true" />
|
||||
Create
|
||||
</button>
|
||||
@@ -142,7 +137,6 @@
|
||||
<div v-else-if="isEditing" class="input-group">
|
||||
<button
|
||||
class="iconified-button brand-button"
|
||||
:disabled="!$nuxt.$loading"
|
||||
@click="saveEditedVersion"
|
||||
>
|
||||
<SaveIcon aria-hidden="true" />
|
||||
@@ -249,7 +243,7 @@
|
||||
class="text-link"
|
||||
href="https://guides.github.com/features/mastering-markdown/"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
rel="noopener noreferrer nofollow"
|
||||
>Markdown</a
|
||||
>. HTML can also be used inside your changelog, not including styles,
|
||||
scripts, and iframes.
|
||||
@@ -1081,6 +1075,22 @@ export default {
|
||||
(x) => x.displayUrlEnding === this.$route.params.version
|
||||
)
|
||||
|
||||
// LEGACY- to support old duplicate version URLs
|
||||
const dashIndex = this.$route.params.version.indexOf('-')
|
||||
if (!this.version && dashIndex !== -1) {
|
||||
const version = this.versions.find(
|
||||
(x) =>
|
||||
x.displayUrlEnding ===
|
||||
this.$route.params.version.substring(0, dashIndex)
|
||||
)
|
||||
|
||||
this.$nuxt.context.redirect(
|
||||
301,
|
||||
`/${this.project.project_type}/${this.project.slug}/version/${version.version_number}`
|
||||
)
|
||||
return
|
||||
}
|
||||
|
||||
if (!this.version) {
|
||||
this.$nuxt.context.error({
|
||||
statusCode: 404,
|
||||
|
||||
@@ -12,12 +12,18 @@
|
||||
<h1>Discover, Play, and Create Minecraft content</h1>
|
||||
<h3>
|
||||
Find enjoyable, quality content through our
|
||||
<a href="https://github.com/modrinth" :target="$external()"
|
||||
<a
|
||||
href="https://github.com/modrinth"
|
||||
:target="$external()"
|
||||
rel="noopener noreferrer nofollow"
|
||||
>open-source</a
|
||||
>
|
||||
modding platform built for the community. Create stuff, get paid, and
|
||||
deploy your project with our
|
||||
<a href="https://docs.modrinth.com" :target="$external()"
|
||||
<a
|
||||
href="https://docs.modrinth.com"
|
||||
:target="$external()"
|
||||
rel="noopener noreferrer nofollow"
|
||||
>fully documented</a
|
||||
>
|
||||
API!
|
||||
@@ -82,7 +88,11 @@
|
||||
working on giving creators more analytics, adding new types of
|
||||
projects, our launcher, and much more! If you have any more
|
||||
feature ideas, feel free to join our
|
||||
<a href="https://discord.gg/EUHuJHt" :target="$external()">
|
||||
<a
|
||||
rel="noopener noreferrer nofollow"
|
||||
href="https://discord.gg/EUHuJHt"
|
||||
:target="$external()"
|
||||
>
|
||||
Discord</a
|
||||
>!
|
||||
</p>
|
||||
@@ -90,7 +100,11 @@
|
||||
<div class="feature completed">
|
||||
<CheckIcon />
|
||||
<p>
|
||||
<a href="https://github.com/modrinth" :target="$external()">
|
||||
<a
|
||||
rel="noopener noreferrer nofollow"
|
||||
href="https://github.com/modrinth"
|
||||
:target="$external()"
|
||||
>
|
||||
100% open source
|
||||
</a>
|
||||
</p>
|
||||
|
||||
@@ -44,7 +44,9 @@
|
||||
certain data protection rights. If you wish to be informed what Personal
|
||||
Information we hold about you and if you want it to be removed from our
|
||||
systems, please contact us by email at
|
||||
<a href="mailto:gdpr@modrinth.com">gdpr@modrinth.com</a>.
|
||||
<a href="mailto:gdpr@modrinth.com" rel="noopener noreferrer nofollow">
|
||||
gdpr@modrinth.com</a
|
||||
>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
|
||||
@@ -240,10 +240,23 @@
|
||||
>playing modpacks</a
|
||||
>
|
||||
with
|
||||
<a href="https://atlauncher.com/about" :target="$external()"
|
||||
<a
|
||||
rel="noopener noreferrer nofollow"
|
||||
href="https://atlauncher.com/about"
|
||||
:target="$external()"
|
||||
>ATLauncher</a
|
||||
>, <a href="https://multimc.org/" :target="$external()">MultiMC</a>, and
|
||||
<a href="https://prismlauncher.org" :target="$external()">
|
||||
>,
|
||||
<a
|
||||
rel="noopener noreferrer nofollow"
|
||||
href="https://multimc.org/"
|
||||
:target="$external()"
|
||||
>MultiMC</a
|
||||
>, and
|
||||
<a
|
||||
rel="noopener noreferrer nofollow"
|
||||
href="https://prismlauncher.org"
|
||||
:target="$external()"
|
||||
>
|
||||
Prism Launcher</a
|
||||
>. Pack creators can reference our documentation on
|
||||
<a
|
||||
@@ -251,7 +264,12 @@
|
||||
:target="$external()"
|
||||
>creating modpacks</a
|
||||
>. Join us on
|
||||
<a href="https://discord.gg/EUHuJHt" :target="$external()">Discord</a>
|
||||
<a
|
||||
rel="noopener noreferrer nofollow"
|
||||
href="https://discord.gg/EUHuJHt"
|
||||
:target="$external()"
|
||||
>Discord</a
|
||||
>
|
||||
for support.
|
||||
</div>
|
||||
<Advertisement type="banner" small-screen="square" />
|
||||
@@ -365,7 +383,7 @@
|
||||
:id="result.slug ? result.slug : result.project_id"
|
||||
:key="result.project_id"
|
||||
:display="$cosmetics.searchDisplayMode[projectType.id]"
|
||||
:gallery-images="
|
||||
:featured-image="
|
||||
result.featured_gallery
|
||||
? result.featured_gallery
|
||||
: result.gallery[0]
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
<a
|
||||
href="https://github.com/settings/connections/applications/3acffb2e808d16d4b226"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer nofollow"
|
||||
>
|
||||
Head to the Modrinth Application page on GitHub.
|
||||
</a>
|
||||
|
||||
@@ -45,7 +45,12 @@
|
||||
<ReportIcon aria-hidden="true" />
|
||||
Report
|
||||
</button>
|
||||
<a v-else class="iconified-button" :href="authUrl">
|
||||
<a
|
||||
v-else
|
||||
class="iconified-button"
|
||||
:href="authUrl"
|
||||
rel="noopener noreferrer nofollow"
|
||||
>
|
||||
<ReportIcon aria-hidden="true" />
|
||||
Report
|
||||
</a>
|
||||
@@ -140,6 +145,7 @@
|
||||
v-if="githubUrl"
|
||||
:href="githubUrl"
|
||||
:target="$external()"
|
||||
rel="noopener noreferrer nofollow"
|
||||
class="sidebar__item github-button iconified-button"
|
||||
>
|
||||
<GitHubIcon aria-hidden="true" />
|
||||
@@ -209,7 +215,7 @@
|
||||
:key="project.id"
|
||||
:name="project.title"
|
||||
:display="$cosmetics.searchDisplayMode.user"
|
||||
:gallery-images="
|
||||
:featured-image="
|
||||
project.gallery
|
||||
.slice()
|
||||
.sort((a, b) => b.featured - a.featured)
|
||||
|
||||
Reference in New Issue
Block a user