private structures
This commit is contained in:
parent
1f7dbf21e0
commit
e179814859
6 changed files with 243 additions and 18 deletions
28
views/workshop/members.eta
Normal file
28
views/workshop/members.eta
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
<div id="members" class="flex flex-col gap-1">
|
||||
<label>Members</label>
|
||||
<% if (!it.members.length) { %>
|
||||
<div class="text-xs italic">no members yet — only you can see this while private</div>
|
||||
<% } %>
|
||||
<% it.members.forEach((v) => { %>
|
||||
<div class="flex flex-row items-center gap-2 text-sm">
|
||||
<span class="flex-grow"><%~ v.username %></span>
|
||||
<button
|
||||
hx-delete="/workshop/<%= it.structure.id %>/members/<%= v.user_id %>"
|
||||
hx-target="#members"
|
||||
hx-swap="outerHTML"
|
||||
>remove</button>
|
||||
</div>
|
||||
<% }) %>
|
||||
<% if (it.notFound) { %>
|
||||
<div class="text-xs text-red-600">no user named "<%~ it.notFound %>"</div>
|
||||
<% } %>
|
||||
<form
|
||||
hx-post="/workshop/<%= it.structure.id %>/members"
|
||||
hx-target="#members"
|
||||
hx-swap="outerHTML"
|
||||
class="flex flex-row gap-1"
|
||||
>
|
||||
<input name="username" placeholder="username" class="flex-grow">
|
||||
<button type="submit">invite</button>
|
||||
</form>
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue