From 911a49108c8d0861d14f76e6cdc1924b965ce2ef Mon Sep 17 00:00:00 2001 From: Julius Volz Date: Sat, 24 May 2025 18:06:21 +0200 Subject: [PATCH] Add scroll boxes around too wide downloads tables Signed-off-by: Julius Volz --- src/app/download/downloads-selector.tsx | 165 ++++++++++++------------ 1 file changed, 84 insertions(+), 81 deletions(-) diff --git a/src/app/download/downloads-selector.tsx b/src/app/download/downloads-selector.tsx index 8d70b0a4..da9b89ff 100644 --- a/src/app/download/downloads-selector.tsx +++ b/src/app/download/downloads-selector.tsx @@ -4,6 +4,7 @@ import { downloadsMetadata } from "@/downloads-metadata"; import { Anchor, Badge, + Box, Card, Group, Select, @@ -85,91 +86,93 @@ export default function DownloadsSelector() { - - {repo.releases.map((release) => ( - - - - - - - {release.name} - {release.prerelease ? ( - - Pre-release - - ) : release.ltsRelease ? ( - - LTS - - ) : ( - - Latest - - )} - - - Release notes - - - - - - File name - OS - Arch - Size - SHA256 Checksum - - - - {release.binaries - .filter((b) => { - if ( - osList.includes(b.os) && - arch === "popular" && - (b.arch === "amd64" || - (b.os === "darwin" && b.arch === "arm64")) - ) { - return true; - } else if ( - osList.includes(b.os) && - (arch === "all" || b.arch === arch) - ) { - return true; - } else { - return false; - } - }) - .map((binary) => ( - - + +
+ {repo.releases.map((release) => ( + + + + + + + {release.name} + {release.prerelease ? ( + + Pre-release + + ) : release.ltsRelease ? ( + + LTS + + ) : ( + + Latest + + )} + - {binary.name} + Release notes - - {binary.os} - {binary.arch} - - {(binary.sizeBytes / 1024 / 1024).toFixed(2)} MiB - - {binary.checksum} - - ))} - - - ))} -
+ + + + + File name + OS + Arch + Size + SHA256 Checksum + + + + {release.binaries + .filter((b) => { + if ( + osList.includes(b.os) && + arch === "popular" && + (b.arch === "amd64" || + (b.os === "darwin" && b.arch === "arm64")) + ) { + return true; + } else if ( + osList.includes(b.os) && + (arch === "all" || b.arch === arch) + ) { + return true; + } else { + return false; + } + }) + .map((binary) => ( + + + + {binary.name} + + + {binary.os} + {binary.arch} + + {(binary.sizeBytes / 1024 / 1024).toFixed(2)} MiB + + {binary.checksum} + + ))} + + + ))} + + ))}