-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
feat: Introduce Downloads Archive page #7794
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
3937420
fa51777
3e9cbeb
8abad4e
924c640
9c375d5
e586292
644882f
4a0fd1c
426f4ed
1f6e3db
dfd47a0
fd09988
0f1ae0a
9c96639
bb5c03c
7f9c14b
107b9f7
b07ba56
5b30781
17cc8a0
a92ad35
c7264ea
199c3e6
8a43b85
968517f
1e6e0f4
52b6cdc
2759b68
7186a9b
2eaa893
31400af
e516c0b
1417339
7358d16
b832299
0fa1f1d
2b17e6b
f533ebc
1c8abdd
d241894
edaf4e1
6099b93
2eb64c7
91b436d
2ebb662
aad1be0
ec457eb
e0f68e8
c794154
2d7da01
7a92ef5
339ad9a
dfcd073
76aaabb
dfcef36
cfea26f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import { useTranslations } from 'next-intl'; | ||
import type { FC } from 'react'; | ||
|
||
import Link from '#site/components/Link'; | ||
import { OperatingSystemLabel } from '#site/util/download'; | ||
import type { NodeDownloadArtifact } from '#site/util/download/archive'; | ||
|
||
type DownloadsTableProps = { | ||
source: Array<NodeDownloadArtifact>; | ||
}; | ||
|
||
const DownloadsTable: FC<DownloadsTableProps> = ({ source }) => { | ||
const t = useTranslations(); | ||
|
||
return ( | ||
<table> | ||
canerakdas marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<thead> | ||
<tr> | ||
<th>{t('components.downloadsTable.fileName')}</th> | ||
<th className="md:w-28"> | ||
{t('components.downloadsTable.operatingSystem')} | ||
</th> | ||
<th className="md:w-28"> | ||
{t('components.downloadsTable.architecture')} | ||
</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{source.map(release => ( | ||
<tr key={`${release.file}-${release.architecture}`}> | ||
<td data-label={t('components.downloadsTable.fileName')}> | ||
<Link href={release.url}>{release.file}</Link> | ||
</td> | ||
<td data-label={t('components.downloadsTable.operatingSystem')}> | ||
{OperatingSystemLabel[release.os]} | ||
</td> | ||
<td data-label={t('components.downloadsTable.architecture')}> | ||
{release.architecture} | ||
</td> | ||
</tr> | ||
))} | ||
</tbody> | ||
</table> | ||
); | ||
}; | ||
|
||
export default DownloadsTable; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,51 @@ | ||
@reference "../../../styles/index.css"; | ||
|
||
.links { | ||
.additionalLinks { | ||
@apply flex | ||
h-4 | ||
items-center | ||
gap-2; | ||
} | ||
|
||
.items { | ||
@apply flex | ||
h-9 | ||
gap-2; | ||
} | ||
|
||
.scrollable { | ||
@apply scrollbar-thin | ||
flex | ||
max-h-[29rem] | ||
overflow-y-auto; | ||
|
||
table { | ||
@apply xs:border-t-0 | ||
border-t; | ||
} | ||
|
||
th { | ||
@apply xs:border-t | ||
border-neutral-200 | ||
dark:border-neutral-800; | ||
} | ||
} | ||
|
||
.information { | ||
@apply md:w-96; | ||
} | ||
|
||
.links { | ||
@apply md:w-44; | ||
} | ||
|
||
.stickyHeader { | ||
@apply top-0 | ||
z-10 | ||
border-t | ||
bg-white | ||
text-left | ||
font-semibold | ||
sm:sticky | ||
dark:bg-neutral-950; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,11 +22,21 @@ const PrebuiltDownloadButtons: FC = () => { | |
const { release, os, platform } = useContext(ReleaseContext); | ||
|
||
const installerUrl = platform | ||
? getNodeDownloadUrl(release.versionWithPrefix, os, platform, 'installer') | ||
? getNodeDownloadUrl({ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OOC, why is this function now taking an object? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Some parameters in this function are optional for example, when generating a getNodeDownloadUrl(version, undefined, undefined, 'source') it feels more readable to use a named parameter approach; getNodeDownloadUrl({ version, kind: 'source' }) |
||
version: release.versionWithPrefix, | ||
os: os, | ||
platform: platform, | ||
avivkeller marked this conversation as resolved.
Show resolved
Hide resolved
|
||
kind: 'installer', | ||
}) | ||
: ''; | ||
|
||
const binaryUrl = platform | ||
? getNodeDownloadUrl(release.versionWithPrefix, os, platform, 'binary') | ||
? getNodeDownloadUrl({ | ||
version: release.versionWithPrefix, | ||
os: os, | ||
platform: platform, | ||
avivkeller marked this conversation as resolved.
Show resolved
Hide resolved
|
||
kind: 'binary', | ||
}) | ||
: ''; | ||
|
||
return ( | ||
|
Uh oh!
There was an error while loading. Please reload this page.