diff --git a/AGENTS.md b/AGENTS.md index 0939c90b..614fc69f 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -170,6 +170,9 @@ src/ - Do not define svelte event handlers inline, instead name them and put them in the script section of templates - Avoid using `as`, except where necessary. Instead, annotate function parameters, and ensure upstream values are typed correctly. - Instead of `getTag(tagName, event.tags)?.[1] || ""`, use `getTagValue(tagName, event.tags)` +- Do not render a profile's `about` directly (e.g. `profile.about`); use the `ProfileInfo` component instead. +- Use `type Props` instead of interface when defining props for svelte components. +- When a component's value/prop shape mirrors a subset of an existing type, derive it with `Pick`/`Partial` and `export` that type from the component's ` - Add Members - to {displayRelayUrl(url)} + Add to {role.label || "Role"} + Assign members to this role {#snippet label()} @@ -64,7 +75,7 @@ Go back - diff --git a/src/app/components/RoleBadge.svelte b/src/app/components/RoleBadge.svelte new file mode 100644 index 00000000..b561de4a --- /dev/null +++ b/src/app/components/RoleBadge.svelte @@ -0,0 +1,17 @@ + + +
+ {role.label || "Untitled Role"} +
diff --git a/src/app/components/RoleCreate.svelte b/src/app/components/RoleCreate.svelte new file mode 100644 index 00000000..d4ac2472 --- /dev/null +++ b/src/app/components/RoleCreate.svelte @@ -0,0 +1,49 @@ + + + + + + Create Role + in + + + + diff --git a/src/app/components/RoleEdit.svelte b/src/app/components/RoleEdit.svelte new file mode 100644 index 00000000..d32b99a9 --- /dev/null +++ b/src/app/components/RoleEdit.svelte @@ -0,0 +1,49 @@ + + + + + + Edit Role + in + + + + diff --git a/src/app/components/RoleForm.svelte b/src/app/components/RoleForm.svelte new file mode 100644 index 00000000..061fc0d9 --- /dev/null +++ b/src/app/components/RoleForm.svelte @@ -0,0 +1,86 @@ + + + + +
+ + {#snippet label()} +

Name

+ {/snippet} + {#snippet input()} + + {/snippet} +
+ + {#snippet label()} +

Description

+ {/snippet} + {#snippet input()} + + {/snippet} +
+ + {#snippet label()} +

Color

+ {/snippet} + {#snippet input()} +
+
+
+ +
+ {/snippet} +
+
+ + + + diff --git a/src/app/components/RoleItem.svelte b/src/app/components/RoleItem.svelte new file mode 100644 index 00000000..208ecb88 --- /dev/null +++ b/src/app/components/RoleItem.svelte @@ -0,0 +1,17 @@ + + +
+ + {#if role.description} +

{role.description}

+ {/if} +
diff --git a/src/app/components/SpaceBar.svelte b/src/app/components/SpaceBar.svelte index b1db7245..1315bacf 100644 --- a/src/app/components/SpaceBar.svelte +++ b/src/app/components/SpaceBar.svelte @@ -33,7 +33,7 @@
-