Skip to content

Commit

Permalink
Fix RepoInfo delegate type
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastinez committed Sep 11, 2024
1 parent 8a41740 commit 43ad446
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src-tauri/bindings/RepoInfo.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
// 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";

/**
* Repos info.
*/
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;
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/src/types/repo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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[] }")]
Expand Down
2 changes: 1 addition & 1 deletion src/components/RepoCard.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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" />
Expand Down

0 comments on commit 43ad446

Please sign in to comment.