Show build versions in downloads
This commit is contained in:
@@ -75,6 +75,6 @@ const defaultDownload = downloads[0];
|
|||||||
$downloadButton
|
$downloadButton
|
||||||
.attr("href", download.href)
|
.attr("href", download.href)
|
||||||
.attr("aria-label", `Download TenWholeYears for ${download.label}`)
|
.attr("aria-label", `Download TenWholeYears for ${download.label}`)
|
||||||
.text(`Download for ${download.label}`);
|
.text(`Download for ${download.label} (${download.version})`);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import { TWY_CDN_URL } from "astro:env/server";
|
|||||||
|
|
||||||
import { api } from "$lib/api";
|
import { api } from "$lib/api";
|
||||||
|
|
||||||
import { ApiResult } from "$lib/types/api";
|
|
||||||
import type { LatestBuildsResponse } from "$lib/types/api/builds";
|
import type { LatestBuildsResponse } from "$lib/types/api/builds";
|
||||||
|
|
||||||
import windowsIcon from "$assets/images/platforms/platform-windows.png";
|
import windowsIcon from "$assets/images/platforms/platform-windows.png";
|
||||||
@@ -52,8 +51,10 @@ export const downloadPlatforms: DownloadPlatformConfig[] = [
|
|||||||
export const buildDownloadOptions = (
|
export const buildDownloadOptions = (
|
||||||
latestVersions: LatestBuildsResponse,
|
latestVersions: LatestBuildsResponse,
|
||||||
): DownloadOption[] =>
|
): DownloadOption[] =>
|
||||||
downloadPlatforms.map(({ platform, label, icon, versionKey, fileNameOverride }) => {
|
downloadPlatforms
|
||||||
const version = latestVersions[versionKey];
|
.filter(({ versionKey }) => latestVersions[versionKey] != null)
|
||||||
|
.map(({ platform, label, icon, versionKey, fileNameOverride }) => {
|
||||||
|
const version = latestVersions[versionKey]!;
|
||||||
|
|
||||||
const fileName = fileNameOverride ? fileNameOverride : `${platform}.zip`;
|
const fileName = fileNameOverride ? fileNameOverride : `${platform}.zip`;
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
export interface LatestBuildsResponse {
|
export interface LatestBuildsResponse {
|
||||||
latestWindowsVersion: string;
|
latestWindowsVersion: string | null;
|
||||||
latestLinuxVersion: string;
|
latestLinuxVersion: string | null;
|
||||||
latestMetaVersion: string;
|
latestMetaVersion: string | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface PatchNote {
|
export interface PatchNote {
|
||||||
|
|||||||
Reference in New Issue
Block a user