mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-21 06:10:44 +08:00
Show git-clone alias in clone button
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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" />
|
||||
|
||||
@@ -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" />
|
||||
|
||||
Reference in New Issue
Block a user