Files
ViciBoxWebsite/src/components/Downloads.astro
T
jamesp 66a15a4a0d Mark ViciBox 13.0.0 Beta 3 as the release candidate, planned for release on 2026-10-31
release.json: beta gets releaseCandidate and plannedRelease; the slideshow,
download boxes and release history read them. Beta 3 post: RC wording replaces
the not-for-production line.
2026-10-19 16:49:06 -04:00

50 lines
1.8 KiB
Plaintext

---
import release from '../data/release.json';
interface Props {
// Show the beta ISOs under the stable ones.
showBeta?: boolean;
}
const { showBeta = true } = Astro.props;
const gb = (bytes: number) => `${(bytes / 1024 ** 3).toFixed(1)} GB`;
const fmtDate = (d: string) =>
new Date(`${d}T12:00:00Z`).toLocaleDateString('en-US', { year: 'numeric', month: 'long', day: 'numeric' });
const sections = [
{ heading: `ViciBox v.${release.stable.version}`, note: `Current stable release, ${fmtDate(release.stable.date)}`, rel: release.stable, beta: false },
...(showBeta
? [{ heading: `ViciBox v.${release.beta.version}`, note: release.beta.releaseCandidate
? `Release candidate, ${fmtDate(release.beta.date)} — planned to become the official release on ${fmtDate(release.beta.plannedRelease)}`
: `Beta, ${fmtDate(release.beta.date)} — for testing only, not for production`, rel: release.beta, beta: true }]
: []),
];
---
<div class="vb-downloads">
{sections.map((s) => (
<div class={s.beta ? 'vb-download vb-download-beta' : 'vb-download'}>
<h3>{s.heading}</h3>
<p class="vb-download-note">{s.note}</p>
<table>
<thead>
<tr><th>Installer</th><th>Size</th><th>MD5</th></tr>
</thead>
<tbody>
{s.rel.isos.map((iso) => (
<tr>
<td><a class="vb-download-link" href={`${release.isoBase}${iso.file}`}>{iso.label}</a><br /><span class="vb-filename">{iso.file}</span></td>
<td>{gb(iso.size)}</td>
<td><code>{iso.md5}</code></td>
</tr>
))}
</tbody>
</table>
</div>
))}
<p class="vb-download-more">
Older releases are in the <a href={`${release.isoBase}archive/`}>download archive</a>. See the <a href="https://docs.vicibox.com/">Installation Manual</a> before installing.
</p>
</div>