diff --git a/crates/radicle-types/bindings/repo/RepoSummary.ts b/crates/radicle-types/bindings/repo/RepoSummary.ts index a74fa9e0c..379ccb093 100644 --- a/crates/radicle-types/bindings/repo/RepoSummary.ts +++ b/crates/radicle-types/bindings/repo/RepoSummary.ts @@ -1,3 +1,3 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type RepoSummary = { rid: string; name: string }; +export type RepoSummary = { rid: string; name: string; private: boolean }; diff --git a/crates/radicle-types/src/repo.rs b/crates/radicle-types/src/repo.rs index 1dd4ac0dc..ce01d11b1 100644 --- a/crates/radicle-types/src/repo.rs +++ b/crates/radicle-types/src/repo.rs @@ -18,6 +18,7 @@ pub struct RepoSummary { #[ts(as = "String")] pub rid: identity::RepoId, pub name: String, + pub private: bool, } #[derive(Serialize, TS)] diff --git a/crates/radicle-types/src/traits/repo.rs b/crates/radicle-types/src/traits/repo.rs index 7dad0582e..fd3e1babb 100644 --- a/crates/radicle-types/src/traits/repo.rs +++ b/crates/radicle-types/src/traits/repo.rs @@ -408,6 +408,7 @@ pub trait Repo: Profile { entries.push(repo::RepoSummary { rid, name: data.name, + private: doc.is_private(), }); } diff --git a/src/components/SidebarRepoList.svelte b/src/components/SidebarRepoList.svelte index 53e20505a..ced04ea21 100644 --- a/src/components/SidebarRepoList.svelte +++ b/src/components/SidebarRepoList.svelte @@ -525,6 +525,11 @@ background-color: var(--color-surface-mid); } + .private-icon { + display: inline-flex; + flex-shrink: 0; + color: var(--color-text-tertiary); + } /* Out of flow: hidden, they still reserved a button's width on every row. They sit over the end of the name instead, on the row's own fill. */ .nav-item .row-actions { @@ -860,6 +865,11 @@ href={router.routeToPath({ resource: "repo.home", rid: repo.rid })}> {repo.name} + {#if repo.private} + + + + {/if}