mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-20 22:00:43 +08:00
Add pending projects and anchor signing
Signed-off-by: Sebastian Martinez <sebastinez@me.com>
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
export let config: Config;
|
||||
export let org: string | undefined = undefined;
|
||||
export let user: string | undefined = undefined;
|
||||
export let faded = false;
|
||||
|
||||
let state: State = { status: Status.Loading };
|
||||
let info: proj.Info | null = null;
|
||||
@@ -27,6 +28,7 @@
|
||||
state = { status: Status.Loaded };
|
||||
info = result;
|
||||
} catch (err) {
|
||||
console.error(err.message);
|
||||
state = { status: Status.Error, error: err.message };
|
||||
}
|
||||
});
|
||||
@@ -55,23 +57,38 @@
|
||||
article.has-info {
|
||||
cursor: pointer;
|
||||
}
|
||||
article.project-faded {
|
||||
border: 1px dashed var(--color-foreground-subtle);
|
||||
cursor: not-allowed;
|
||||
}
|
||||
article.has-info:hover {
|
||||
border-color: var(--color-secondary);
|
||||
}
|
||||
article.project-faded.has-info:hover {
|
||||
border-color: var(--color-foreground-faded);
|
||||
}
|
||||
article .id {
|
||||
font-size: 1rem;
|
||||
font-weight: 600;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
article .description {
|
||||
margin-bottom: 0.75rem;
|
||||
margin-bottom: 0.25rem;
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
article .anchor {
|
||||
color: var(--color-secondary);
|
||||
font-size: 0.75rem;
|
||||
min-height: 2rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
article .commit, article .actions {
|
||||
font-family: var(--font-family-monospace);
|
||||
}
|
||||
article.project-faded .anchor {
|
||||
color: var(--color-foreground-faded);
|
||||
}
|
||||
article .id, article .anchor {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
@@ -97,20 +114,22 @@
|
||||
}
|
||||
</style>
|
||||
|
||||
<article on:click={onClick} class:has-info={info}>
|
||||
<article on:click={onClick} class:has-info={info} class:project-faded={faded}>
|
||||
{#if info}
|
||||
<div class="id">
|
||||
<span class="name">{info.meta.name}</span><span class="urn">{project.id}</span>
|
||||
</div>
|
||||
<div class="description">{info.meta.description}</div>
|
||||
<div class="anchor">
|
||||
<span>commit {project.anchor.stateHash}</span>
|
||||
<span>
|
||||
{#each info.meta.maintainers as urn}
|
||||
<span class="avatar">
|
||||
<Blockies address={urn} />
|
||||
</span>
|
||||
{/each}
|
||||
<span class="commit">commit {project.anchor.stateHash}</span>
|
||||
<span class="actions">
|
||||
<slot name="actions">
|
||||
{#each info.meta.maintainers as urn}
|
||||
<span class="avatar">
|
||||
<Blockies address={urn} />
|
||||
</span>
|
||||
{/each}
|
||||
</slot>
|
||||
</span>
|
||||
</div>
|
||||
{:else}
|
||||
@@ -120,6 +139,12 @@
|
||||
<Loading small />
|
||||
{/if}
|
||||
</div>
|
||||
<div class="anchor">commit {project.anchor.stateHash}</div>
|
||||
<div class="anchor">
|
||||
<span class="commit">commit {project.anchor.stateHash}</span>
|
||||
<span class="actions">
|
||||
<slot name="actions">
|
||||
</slot>
|
||||
</span>
|
||||
</div>
|
||||
{/if}
|
||||
</article>
|
||||
|
||||
Reference in New Issue
Block a user