Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions src/components/data/SoftwareDownload.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,14 @@
}

let builds = $derived(isStable ? stableBuilds : (experimentalBuilds ?? stableBuilds));

let experimentalChannel = $derived(experimentalBuilds?.value?.latest?.channel.toLowerCase() ?? "experimental");

let experimentalChannelButtonClass = $derived.by(() => {
const channel = experimentalBuilds?.value?.latest?.channel?.toLowerCase();
if (!channel) return "btn-alpha";
return `btn-${channel}`;
});
</script>

<header class="mx-auto flex max-w-7xl flex-row flex-wrap gap-16 px-4 pt-32 pb-16 lg:pt-48 lg:pb-26">
Expand Down Expand Up @@ -107,11 +115,11 @@

{#if project.latestExperimentalVersion}
<button
class={`transition-border btn btn-outline rounded-md py-3 transition-colors md:w-100 ${isStable ? "btn-alpha" : "btn-stable"}`}
class={`transition-border btn btn-outline rounded-md py-3 transition-colors md:w-100 ${isStable ? experimentalChannelButtonClass : "btn-stable"}`}
onclick={toggleStable}
>
{#if isStable}
Toggle experimental builds for {project.latestExperimentalVersion}
Toggle {experimentalChannel} builds for {project.latestExperimentalVersion}
{:else}
Back to stable builds for {project.latestStableVersion}
{/if}
Expand Down