From dcd56f6b41cf9ed0b7c0345d5e7f51a232a152c1 Mon Sep 17 00:00:00 2001 From: Gabriel Harris-Rouquette Date: Wed, 9 Oct 2024 22:46:52 -0700 Subject: [PATCH] feat: add spongeneo to downloads index --- src/assets/_variables.scss | 1 + src/components/PlatformLogo.vue | 6 +++++- src/platforms.js | 31 +++++++++++++++++++++++++++++++ src/views/Downloads.vue | 2 +- 4 files changed, 38 insertions(+), 2 deletions(-) diff --git a/src/assets/_variables.scss b/src/assets/_variables.scss index 78b1d37..4594226 100644 --- a/src/assets/_variables.scss +++ b/src/assets/_variables.scss @@ -19,6 +19,7 @@ $sponge_very_light_grey: tint($sponge_grey, 98%); $spongevanilla_color: #917300; $spongeforge_color: #910020; +$spongeneo_color: #cc6f2f; $spongeapi_color: #009172; // Bootstrap diff --git a/src/components/PlatformLogo.vue b/src/components/PlatformLogo.vue index 8135ecd..8ad0a00 100644 --- a/src/components/PlatformLogo.vue +++ b/src/components/PlatformLogo.vue @@ -12,7 +12,7 @@ props: ['platform'], computed: { isBadged: function () { - return ["spongevanilla", "spongeforge", "spongeapi"].indexOf(this.platform.id) !== -1 + return ["spongevanilla", "spongeforge", "spongeneo", "spongeapi"].indexOf(this.platform.id) !== -1 } } }; @@ -56,6 +56,10 @@ background-color: $spongeforge_color; } + &.spongeneo { + background-color: $spongeneo_color; + } + &.spongeapi { background-color: $spongeapi_color; } diff --git a/src/platforms.js b/src/platforms.js index 8a1cf9b..f1e2491 100644 --- a/src/platforms.js +++ b/src/platforms.js @@ -144,5 +144,36 @@ export const Platforms = { ], checkIsLegacy: mcIsLegacyCheck, checkExperimental: markExperimental + }, + spongeneo: { + group: 'org.spongepowered', + id: 'spongeneo', + name: "SpongeNeo", + suffix: "Neo", + featured: true, + description: "Using NeoForge mods? Install the SpongeNeo to use mods and plugins together!", + recommendation: "Recommended for running plugins together with NeoForge mods.", + queryModifiers: spongeQueryModifiers, + tags: { + api: { + name: "api" + }, + neo: { + name: "Minimum NeoForge Required", + display: false, + color: 'forge' + }, + minecraft: { + name: "minecraft", + sort: VersionSort.sortVersions + }, + }, + artifactTypes: [ + ArtifactTypes.Main, + ArtifactTypes.Sources, + ArtifactTypes.DevShaded + ], + checkIsLegacy: mcIsLegacyCheck, + checkExperimental: markExperimental } }; diff --git a/src/views/Downloads.vue b/src/views/Downloads.vue index fb1a69f..b3ca602 100644 --- a/src/views/Downloads.vue +++ b/src/views/Downloads.vue @@ -126,7 +126,7 @@ import axios from 'axios'; - import {Platforms} from '../platforms'; + import {Platforms} from '@/platforms'; import Builds from '../components/Builds.vue'; import PlatformLogo from '../components/PlatformLogo.vue';