Radish alpha
r
Radicle desktop app
Radicle
Git (anonymous pull)
Log in to clone via SSH
Fix `RepoInfo` delegate type
Sebastian Martinez committed 1 year ago
commit 43ad446dc7bec8d2bc20114e2e78a48914ae266d
parent 8a417404b801fbbdbe59baa3baa77e47536950f8
3 files changed +4 -3
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" />