Show git-clone alias in clone button

This commit is contained in:
Rūdolfs Ošiņš
2026-07-29 13:10:05 +02:00
parent aaffb991ac
commit 8d8339165c
5 changed files with 27 additions and 3 deletions
+3 -2
View File
@@ -22,6 +22,7 @@
export let id: string;
export let name: string;
export let currentRefname: string;
export let alias: string | undefined = undefined;
let activeTab: "radicle" | "git" | "archive" = "radicle";
let archiveProbe: Promise<boolean> | undefined;
@@ -39,10 +40,10 @@
baseUrl.port === config.nodes.defaultHttpdPort
? ""
: `:${baseUrl.port}`;
$: archiveUrl = `curl -OJ ${baseUrl.scheme}://${baseUrl.hostname}${portFragment}/raw/${id}/archive/${currentRefname}`;
$: archiveUrl = `curl -OJ ${baseUrl.scheme}://${baseUrl.hostname}${portFragment}/raw/${alias ?? id}/archive/${currentRefname}`;
$: gitCloneUrl = `git clone ${baseUrl.scheme}://${
baseUrl.hostname
}${portFragment}/${parseRepositoryId(id)?.pubkey ?? id}.git ${name}`;
}${portFragment}/${alias ?? parseRepositoryId(id)?.pubkey ?? id}.git ${name}`;
</script>
<style>
+1
View File
@@ -119,6 +119,7 @@
{baseUrl}
{currentRefname}
id={repo.rid}
alias={repo.alias}
name={repo.payloads["xyz.radicle.project"].data.name} />
</svelte:fragment>
<RepoNameHeader {repo} {baseUrl} {seedingPolicy} slot="header" />
+1
View File
@@ -142,6 +142,7 @@
{baseUrl}
{currentRefname}
id={repo.rid}
alias={repo.alias}
name={repo.payloads["xyz.radicle.project"].data.name} />
</svelte:fragment>
<RepoNameHeader {repo} {baseUrl} {seedingPolicy} slot="header" />