mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-10-29 08:10:59 +08:00
Get anchors work in user projects
Signed-off-by: Alexis Sellier <self@cloudhead.io>
This commit is contained in:
@@ -26,9 +26,10 @@
|
||||
export let commit: string;
|
||||
export let config: Config;
|
||||
export let path: string;
|
||||
export let org: Profile | null = null;
|
||||
export let profile: Profile | null = null;
|
||||
export let org: string | null = null;
|
||||
|
||||
const orgAddress = org?.address;
|
||||
const orgAddress = org ?? undefined;
|
||||
|
||||
// When the component is loaded the first time, the blob is yet to be loaded.
|
||||
let state: State = { status: Status.Idle };
|
||||
@@ -108,6 +109,7 @@
|
||||
border-radius: 0.25rem;
|
||||
color: var(--color-tertiary);
|
||||
background-color: var(--color-tertiary-background);
|
||||
cursor: help;
|
||||
}
|
||||
.anchor-widget.not-anchored {
|
||||
color: var(--color-foreground-faded);
|
||||
@@ -251,7 +253,7 @@
|
||||
{:then anchor}
|
||||
{#if anchor === commit}
|
||||
<span class="anchor-widget">
|
||||
<span class="anchor-label">anchored 🔒</span>
|
||||
<span class="anchor-label" title="{orgAddress}">anchored 🔒</span>
|
||||
</span>
|
||||
{:else}
|
||||
<span class="anchor-widget not-anchored">
|
||||
@@ -279,8 +281,8 @@
|
||||
{#if config.seed.id}
|
||||
<input readonly name="clone-url" value={utils.formatSeedAddress(config.seed.id, config.seed.host, config)}/>
|
||||
<label for="seed-url">Bootstrap your Radicle node with this seed.</label>
|
||||
{:else if org}
|
||||
<label for="#">Seed ID is not set for {org.name}.</label>
|
||||
{:else if profile}
|
||||
<label for="#">Seed ID is not set for {profile.name}.</label>
|
||||
{/if}
|
||||
</div>
|
||||
</span>
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
<div class="urn">{urn}</div>
|
||||
<div class="description">{result.project.meta.description}</div>
|
||||
</header>
|
||||
<Browser {urn} org={result.org} {path}
|
||||
<Browser {urn} {org} profile={result.org} {path}
|
||||
commit={commit || result.project.head}
|
||||
config={result.config} />
|
||||
{:catch}
|
||||
|
||||
Reference in New Issue
Block a user