diff --git a/httpd-client/lib/project.ts b/httpd-client/lib/project.ts index 491c68c4a..51bc417bc 100644 --- a/httpd-client/lib/project.ts +++ b/httpd-client/lib/project.ts @@ -141,12 +141,14 @@ const treeSchema = strictObject({ export interface Remote { id: string; + alias?: string; heads: Record; delegate: boolean; } const remoteSchema = strictObject({ id: string(), + alias: string().optional(), heads: record(string(), string()), delegate: boolean(), }) satisfies ZodSchema; diff --git a/src/components/Dropdown.svelte b/src/components/Dropdown.svelte index 278b07c33..298bd5672 100644 --- a/src/components/Dropdown.svelte +++ b/src/components/Dropdown.svelte @@ -2,6 +2,7 @@ export interface Item { title: string; value: T; + alias?: T; badge: string | null; } diff --git a/src/views/projects/PeerSelector.svelte b/src/views/projects/PeerSelector.svelte index d5313a4d5..a75b3770d 100644 --- a/src/views/projects/PeerSelector.svelte +++ b/src/views/projects/PeerSelector.svelte @@ -32,6 +32,7 @@ items = peers.map(p => { return { value: p.id, + alias: p.alias, title: createTitle(p), badge: p.delegate ? "delegate" : null, }; @@ -81,11 +82,13 @@ background: var(--color-foreground-1); gap: 0.5rem; } - .avatar-id { display: flex; gap: 0.25rem; } + .alias { + color: var(--color-secondary-6); + } @@ -101,6 +104,9 @@ did:key: and the nid due to a newline. --> did:key:{truncateId(meta.id)} + {#if meta.alias} + ({meta.alias}) + {/if} {#if meta.delegate} delegate @@ -130,10 +136,16 @@
did:key:{item.value} + {#if item.alias} + ({item.alias}) + {/if}
did:key:{truncateId(item.value)} + {#if item.alias} + ({item.alias}) + {/if}
{#if item.badge}