From ba6949db433427767cc8bf2d0a2e3d3c41d4cebe Mon Sep 17 00:00:00 2001 From: powercas_gamer Date: Thu, 2 May 2024 22:21:18 +0200 Subject: [PATCH] chore: Don't mark all versions as legacy versions (#98) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Better downloads overview --------- Co-authored-by: Matouš Kučera --- src/pages/community/guidelines.tsx | 20 ++++++++++---------- src/pages/downloads/all.tsx | 25 +++++++++++++++++++++---- 2 files changed, 31 insertions(+), 14 deletions(-) diff --git a/src/pages/community/guidelines.tsx b/src/pages/community/guidelines.tsx index 6d847bf8..49a39d66 100644 --- a/src/pages/community/guidelines.tsx +++ b/src/pages/community/guidelines.tsx @@ -50,12 +50,12 @@ const CommunityGuidelines: NextPage = () => (
(

Support Channels

Our support channels #paper-help,{" "} - #velocity-help and #waterfall-help are there - for people who need support using our software. While we are very happy - that so many members of the community actively support there and answer - questions, please make sure to follow our guidelines there as well. Many - people that go there to ask questions are new to Minecraft Servers and - to the community itself. We should be welcoming towards newcomers, - especially since we all started somewhere. In general, "Rule 1: - Don't be a jerk" applies here as well, but we would like to - add the following points: + #velocity-help, #waterfall-help and{" "} + #folia-help are there for people who need support using our + software. While we are very happy that so many members of the community + actively support there and answer questions, please make sure to follow + our guidelines there as well. Many people that go there to ask questions + are new to Minecraft servers and to the community itself. We should be + welcoming towards newcomers, especially since we all started somewhere. + In general, "Rule 1: Don't be a jerk" applies here as + well, but we would like to add the following points:

  1. diff --git a/src/pages/downloads/all.tsx b/src/pages/downloads/all.tsx index 752a8125..5d3e56a9 100644 --- a/src/pages/downloads/all.tsx +++ b/src/pages/downloads/all.tsx @@ -5,7 +5,7 @@ import SoftwareBuildsTable from "@/components/data/SoftwareBuildsTable"; import DownloadsTree from "@/components/layout/DownloadsTree"; import SEO from "@/components/util/SEO"; import type { Project } from "@/lib/service/types"; -import { useVersionBuilds, getProject } from "@/lib/service/v2"; +import { useVersionBuilds, getProject, useProject } from "@/lib/service/v2"; const INITIAL_PROJECT = "paper"; @@ -32,8 +32,13 @@ const LegacyDownloads: NextPage = ({ const [selectedProject, setSelectedProject] = useState(initialProjectId); const [selectedVersion, setSelectedVersion] = useState(initialProjectVersion); const { data: builds } = useVersionBuilds(selectedProject, selectedVersion); + const { data: versions } = useProject(selectedProject); const eol = selectedProject === "waterfall"; + const latestVersion = versions?.versions[versions?.versions.length - 1]; + const legacy = selectedVersion !== latestVersion; + const experimental = + builds?.builds[builds?.builds.length - 1].channel === "experimental"; return ( <> @@ -44,9 +49,6 @@ const LegacyDownloads: NextPage = ({ />
    -
    - Legacy builds are not supported. Proceed at your own risk! -
    = ({ }} />
    + {legacy && ( + <> +
    + Legacy builds are not supported. Proceed at your own risk! +
    + + )} + {experimental && ( + <> +
    + Experimental builds are not ready for production servers. + Proceed at your own risk! +
    + + )} {eol && (
    EOL builds are not supported. Proceed at your own risk!