explorer: Add a download button to the clone popover

The Download tab only offered a curl command. Add a button that links
to the same archive URL so people without a terminal can download the
source.
This commit is contained in:
Brandon Oxendine
2026-11-03 14:39:33 +01:00
committed by Rūdolfs Ošiņš
parent 9c790a7d1c
commit ede901bc4f
2 changed files with 32 additions and 7 deletions
@@ -40,7 +40,7 @@
baseUrl.port === config.nodes.defaultHttpdPort
? ""
: `:${baseUrl.port}`;
$: archiveUrl = `curl -OJ ${baseUrl.scheme}://${baseUrl.hostname}${portFragment}/raw/${alias ?? id}/archive/${currentRefname}`;
$: archiveUrl = `${baseUrl.scheme}://${baseUrl.hostname}${portFragment}/raw/${alias ?? id}/archive/${currentRefname}`;
$: gitCloneUrl = `git clone ${baseUrl.scheme}://${
baseUrl.hostname
}${portFragment}/${alias ?? parseRepositoryId(id)?.pubkey ?? id}.git ${name}`;
@@ -127,7 +127,9 @@
If you don’t have Radicle installed, you can still download an
archive of the repository.
</label>
<Command command={archiveUrl} />
<Command
command={`curl -OJ ${archiveUrl}`}
downloadHref={archiveUrl} />
<div style:margin-top="1.5rem">
Note that a compressed archive of the source code does not include
any of the social artifacts such as issues or patches nor the git