Get anchors work in user projects

Signed-off-by: Alexis Sellier <self@cloudhead.io>
This commit is contained in:
Alexis Sellier
2021-10-11 16:02:55 +02:00
parent 46a73521c6
commit 398f5c8d09
2 changed files with 8 additions and 6 deletions
+7 -5
View File
@@ -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>
+1 -1
View File
@@ -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}