Fix RepoInfo delegate type

This commit is contained in:
Sebastian Martinez
2024-09-11 13:35:34 +02:00
parent 8a417404b8
commit 43ad446dc7
3 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -1,4 +1,5 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { Author } from "./Author";
import type { SupportedPayloads } from "./SupportedPayloads";
/**
@@ -6,7 +7,7 @@ import type { SupportedPayloads } from "./SupportedPayloads";
*/
export type RepoInfo = {
payloads: SupportedPayloads;
delegates: ({ id: string } | { id: string; alias?: string })[];
delegates: Array<Author>;
threshold: number;
visibility: { type: "public" } | { type: "private"; allow?: string[] };
rid: string;
+1 -1
View File
@@ -11,7 +11,7 @@ use super::cobs::Author;
#[ts(export)]
pub struct RepoInfo {
pub payloads: SupportedPayloads,
#[ts(type = "({ id: string } | { id: string, alias?: string })[]")]
#[ts(as = "Vec<Author>")]
pub delegates: Vec<Author>,
pub threshold: usize,
#[ts(type = "{ type: 'public' } | { type: 'private', allow?: string[] }")]
+1 -1
View File
@@ -53,7 +53,7 @@
</div>
</Fill>
{/if}
{#if repo.delegates.find(x => x.id === selfDid)}
{#if repo.delegates.find(x => x.did === selfDid)}
<Fill variant="delegate" styleWidth="24px" styleHeight="24px">
<div style:color="var(--color-fill-primary)">
<Icon name="delegate" />