Make visibility in the repoSchema required

This commit is contained in:
Sebastian Martinez
2024-08-22 09:43:06 +02:00
parent b84cace48f
commit cca65a0b89
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -41,7 +41,7 @@ const repoSchema = object({
visibility: union([
object({ type: literal("public") }),
object({ type: literal("private"), allow: optional(array(string())) }),
]).optional(),
]),
patches: object({
open: number(),
draft: number(),
+1 -1
View File
@@ -19,7 +19,7 @@
$: repo = repoInfo.repo;
$: project = repoInfo.repo["xyz.radicle.project"];
$: baseUrl = repoInfo.baseUrl;
$: isPrivate = repo.visibility?.type === "private";
$: isPrivate = repo.visibility.type === "private";
</script>
<style>
@@ -77,7 +77,7 @@
</span>
</Link>
</span>
{#if repo.visibility && repo.visibility.type === "private"}
{#if repo.visibility.type === "private"}
<Badge variant="yellow" size="tiny">
<Icon name="lock" />
Private