Distinguish local repos from seeded ones

A repository can sit in storage without being seeded, which `rad ls`
hides and `rad ls --all` shows as "local". A new Settings preference
picks the `Show` passed to `list_repos_summary`, defaulting to seeded.
This commit is contained in:
Rūdolfs Ošiņš
2026-09-09 14:51:21 +02:00
parent 4c899537ab
commit 092f3354ee
14 changed files with 250 additions and 31 deletions
+10
View File
@@ -81,6 +81,7 @@ pub fn router(ctx: Context) -> Router {
"/seeded_not_replicated",
post(seeded_not_replicated_handler),
)
.route("/seed", post(seed_handler))
.route("/unseed", post(unseed_handler))
.route("/clean", post(clean_handler))
.route("/repo_by_id", post(repo_handler))
@@ -178,6 +179,15 @@ async fn seeded_not_replicated_handler(State(ctx): State<Context>) -> impl IntoR
Ok::<_, Error>(Json(rids))
}
async fn seed_handler(
State(ctx): State<Context>,
Json(RepoBody { rid }): Json<RepoBody>,
) -> impl IntoResponse {
ctx.seed(rid)?;
Ok::<_, Error>(Json(()))
}
async fn unseed_handler(
State(ctx): State<Context>,
Json(RepoBody { rid }): Json<RepoBody>,