@@ -20,8 +20,9 @@ import {
2020 desktopLinks ,
2121 type DownloadLink ,
2222 extensionLinks ,
23+ githubNightlyReleasesUrl ,
2324 type GithubRelease ,
24- githubReleasesUrl ,
25+ githubStableReleasesUrl ,
2526 webLinks ,
2627} from "@/app/downloads/config" ;
2728
@@ -52,8 +53,8 @@ function DownloadLink({
5253}
5354
5455function ReleaseRow ( release : GithubRelease ) {
55- // The nightly prefix is a bit superfluous here
56- const name = release . name . replace ( / ^ N i g h t l y / , "" ) ;
56+ // The prefix is a bit superfluous here
57+ const name = release . name . replace ( / ^ N i g h t l y / , "" ) . replace ( / ^ R e l e a s e / , "" ) ;
5758 return (
5859 < TableTr >
5960 < TableTd >
@@ -114,20 +115,55 @@ function ReleaseCompactBox(release: GithubRelease) {
114115 ) ;
115116}
116117
117- export function ReleaseList ( { releases } : { releases : GithubRelease [ ] } ) {
118+ function ReleaseIntro ( { nightly } : { nightly : boolean } ) {
119+ if ( ! nightly ) {
120+ return (
121+ < >
122+ < Title id = "releases" > Stable Releases</ Title >
123+ < Text >
124+ If none of the above are suitable for you, you can manually download
125+ one of the latest stable releases. Older versions are available on{ " " }
126+ < Link href = { githubStableReleasesUrl } target = "_blank" >
127+ GitHub
128+ </ Link >
129+ .
130+ </ Text >
131+ </ >
132+ ) ;
133+ } else {
134+ return (
135+ < >
136+ < Title id = "nightly-releases" > Nightly Releases</ Title >
137+ < Text >
138+ If you want to try out the latest updates and cutting-edge features,
139+ you can download the latest nightly release. These are automatically
140+ built every day (approximately midnight UTC, unless there are no
141+ changes on that day) and they offer early access to new enhancements,
142+ bug fixes, and improvements before they're officially rolled out.
143+ Older nightly releases are available on{ " " }
144+ < Link href = { githubNightlyReleasesUrl } target = "_blank" >
145+ GitHub
146+ </ Link >
147+ .
148+ </ Text >
149+ </ >
150+ ) ;
151+ }
152+ }
153+
154+ export function ReleaseList ( {
155+ releases,
156+ nightly,
157+ } : {
158+ releases : GithubRelease [ ] ;
159+ nightly : boolean ;
160+ } ) {
161+ if ( releases . length == 0 ) {
162+ return < > </ > ;
163+ }
118164 return (
119165 < Stack >
120- < Title id = "nightly-releases" > Nightly Releases</ Title >
121- < Text >
122- If none of the above are suitable for you, you can manually download the
123- latest Nightly release. These are automatically built every day
124- (approximately midnight UTC), unless there are no changes on that day.{ " " }
125- Older nightly releases are available on{ " " }
126- < Link href = { githubReleasesUrl } target = "_blank" >
127- GitHub
128- </ Link >
129- .
130- </ Text >
166+ < ReleaseIntro nightly = { nightly } />
131167 < Table
132168 horizontalSpacing = "md"
133169 verticalSpacing = "md"
0 commit comments