Skip to content

Commit ebc2ebe

Browse files
committed
feat: deactivate alpha pre-release and update UI for unavailable downloads
1 parent be617ca commit ebc2ebe

File tree

3 files changed

+18
-31
lines changed

3 files changed

+18
-31
lines changed

src/assets/data/audacityReleases.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ export type PreReleaseEntry = {
156156
export const alphaPreRelease: PreReleaseEntry = {
157157
id: "alpha",
158158
label: "Alpha",
159-
isActive: true,
159+
isActive: false,
160160
summary:
161161
"Get an early look at the next major release. Expect unfinished features and potential bugs.",
162162
pageHref: "/next",

src/assets/data/promotions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export type PromoData = {
2222

2323
const promoData: Record<string, PromoData> = {
2424
audacity4Alpha: {
25-
isActive: true,
25+
isActive: false,
2626
priority: 50,
2727
suppressOnPaths: ["/next", "/download"],
2828
message: "Want a peek at our next big release?",

src/pages/next.astro

Lines changed: 16 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ const windowsDownloads = releaseDownloads?.win ?? [];
3636
const macDownloads = releaseDownloads?.mac ?? [];
3737
const linuxDownloads = releaseDownloads?.lin ?? [];
3838
const isAlphaRelease = activeRelease?.id === "alpha";
39+
const mainSectionClasses = activeRelease
40+
? "col-start-2 col-span-10 sm:col-start-2 sm:col-span-5"
41+
: "col-start-2 col-span-10 sm:col-start-2 sm:col-span-10";
3942
4043
const downloadSections = activeRelease
4144
? [
@@ -68,7 +71,7 @@ const downloadSections = activeRelease
6871
>
6972
<main id="main" class="max-w-screen-xl mx-auto text-gray-700">
7073
<div class="grid grid-cols-12 pt-8 pb-32 gap-y-12">
71-
<section class="col-start-2 col-span-10 sm:col-start-2 sm:col-span-5">
74+
<section class={mainSectionClasses}>
7275
{
7376
activeRelease ? (
7477
<>
@@ -87,11 +90,11 @@ const downloadSections = activeRelease
8790
)}
8891
</>
8992
) : (
90-
<div class="border border-yellow-300 bg-yellow-50 text-yellow-900 rounded-md p-6">
91-
<h1 class="text-3xl font-semibold text-yellow-900">
93+
<div class="border border-gray-200 bg-white rounded-md p-6 shadow-sm">
94+
<h1 class="text-3xl font-semibold text-gray-900">
9295
Pre-release downloads are currently unavailable.
9396
</h1>
94-
<p class="mt-4">
97+
<p class="mt-4 text-gray-700">
9598
Check back soon or download the latest stable version of Audacity.
9699
</p>
97100
<a
@@ -105,12 +108,12 @@ const downloadSections = activeRelease
105108
)
106109
}
107110
</section>
108-
<aside
109-
class="row-start-2 sm:row-start-1 col-start-2 col-span-10 sm:col-start-8 sm:col-span-4"
110-
>
111-
<h2 class="text-sm uppercase font-normal">Download links</h2>
112-
{
113-
activeRelease ? (
111+
{activeRelease && (
112+
<aside
113+
class="row-start-2 sm:row-start-1 col-start-2 col-span-10 sm:col-start-8 sm:col-span-4"
114+
>
115+
<h2 class="text-sm uppercase font-normal">Download links</h2>
116+
{
114117
downloadSections.length > 0 ? (
115118
<div class="flex flex-col gap-6 mt-2">
116119
{downloadSections.map((section) => (
@@ -142,25 +145,9 @@ const downloadSections = activeRelease
142145
</a>
143146
</div>
144147
)
145-
) : (
146-
<div class="mt-4 p-4 border border-gray-200 rounded-md bg-gray-50">
147-
<p class="text-sm text-gray-700">
148-
Pre-release downloads are currently unavailable.
149-
</p>
150-
<p class="text-sm text-gray-700 mt-1">
151-
You can still download the latest stable version of Audacity.
152-
</p>
153-
<a
154-
class="hyperlink text-sm inline-flex items-center gap-1 mt-3"
155-
href="/download"
156-
>
157-
Browse stable downloads
158-
<span class="align-middle icon icon-share text-blue-600" />
159-
</a>
160-
</div>
161-
)
162-
}
163-
</aside>
148+
}
149+
</aside>
150+
)}
164151
</div>
165152
</main>
166153
</BaseLayout>

0 commit comments

Comments
 (0)