Radish alpha
r
rad:z4D5UCArafTzTQpDZNQRuqswh3ury
Radicle desktop app
Radicle
Git
Fix `RepoInfo` delegate type
Merged did:key:z6MkkfM3...sVz5 opened 1 year ago
3 files changed +4 -3 8a417404 43ad446d
modified src-tauri/bindings/RepoInfo.ts
@@ -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;
modified src-tauri/src/types/repo.rs
@@ -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[] }")]
modified src/components/RepoCard.svelte
@@ -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" />