Skip to content

Commit

Permalink
chore: Don't mark all versions as legacy versions (#98)
Browse files Browse the repository at this point in the history
Better downloads overview
---------

Co-authored-by: Matouš Kučera <[email protected]>
  • Loading branch information
powercasgamer and zlataovce authored May 2, 2024
1 parent 177ddd9 commit ba6949d
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 14 deletions.
20 changes: 10 additions & 10 deletions src/pages/community/guidelines.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ const CommunityGuidelines: NextPage = () => (
<ul className="list-disc list-inside my-4">
<li>The PaperMC Discord server</li>
<li>The PaperMC IRC channels</li>
<li>The PaperMC forums</li>
<li>The PaperMC GitHub organization</li>
<li>
This includes issues, pull requests, and any discussion inside issues
or pull requests
</li>
<li>The PaperMC forums</li>
</ul>
</section>
<section
Expand Down Expand Up @@ -335,15 +335,15 @@ const CommunityGuidelines: NextPage = () => (
<h2 className="text-2xl font-medium mb-4">Support Channels</h2>
<p>
Our support channels <code>#paper-help</code>,{" "}
<code>#velocity-help</code> and <code>#waterfall-help</code> 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, &quot;Rule 1:
Don&apos;t be a jerk&quot; applies here as well, but we would like to
add the following points:
<code>#velocity-help</code>, <code>#waterfall-help</code> and{" "}
<code>#folia-help</code> 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, &quot;Rule 1: Don&apos;t be a jerk&quot; applies here as
well, but we would like to add the following points:
</p>
<ol className="list-decimal list-inside my-4 ml-4 space-y-2">
<li>
Expand Down
25 changes: 21 additions & 4 deletions src/pages/downloads/all.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand All @@ -32,8 +32,13 @@ const LegacyDownloads: NextPage<LegacyDownloadProps> = ({
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 (
<>
Expand All @@ -44,9 +49,6 @@ const LegacyDownloads: NextPage<LegacyDownloadProps> = ({
/>
<div className="flex flex-col h-screen">
<div className="h-16" />
<div className="text-center px-4 py-2 font-bold bg-red-400 dark:bg-red-500 shadow-md">
Legacy builds are not supported. Proceed at your own risk!
</div>
<div className="flex-1 flex flex-row min-h-0">
<DownloadsTree
selectedProject={selectedProject}
Expand All @@ -57,6 +59,21 @@ const LegacyDownloads: NextPage<LegacyDownloadProps> = ({
}}
/>
<div className="flex-1 overflow-auto">
{legacy && (
<>
<div className="text-center px-4 py-2 font-bold bg-red-400 dark:bg-red-500 shadow-md">
Legacy builds are not supported. Proceed at your own risk!
</div>
</>
)}
{experimental && (
<>
<div className="text-center px-4 py-2 font-bold bg-orange-400 dark:bg-orange-500 shadow-md">
Experimental builds are not ready for production servers.
Proceed at your own risk!
</div>
</>
)}
{eol && (
<div className="text-center px-4 py-2 font-bold bg-yellow-400 dark:bg-yellow-500 shadow-md">
EOL builds are not supported. Proceed at your own risk!
Expand Down

0 comments on commit ba6949d

Please sign in to comment.