A vibe coded tangled fork which supports pijul.
1{{ define "repo/issues/fragments/replyComment" }}
2 <form
3 class="p-2 group w-full border-t border-gray-200 dark:border-gray-700 flex flex-col gap-2"
4 id="reply-form-{{ .Comment.Id }}"
5 hx-post="/{{ .RepoInfo.FullName }}/issues/{{ .Issue.IssueId }}/comment"
6 hx-on::after-request="if(event.detail.successful) this.reset()"
7 >
8 {{ template "user/fragments/picHandleLink" .LoggedInUser.Did }}
9 <textarea
10 id="reply-{{.Comment.Id}}-textarea"
11 name="body"
12 class="w-full p-2"
13 placeholder="Leave a reply..."
14 autofocus
15 rows="3"></textarea>
16
17 <input
18 type="text"
19 id="reply-to"
20 name="reply-to"
21 required
22 value="{{ .Comment.AtUri }}"
23 class="hidden"
24 />
25 {{ template "replyActions" . }}
26 </form>
27{{ end }}
28
29{{ define "replyActions" }}
30 <div class="flex flex-wrap items-stretch justify-end gap-2 text-gray-500 dark:text-gray-400 text-sm">
31 {{ template "cancel" . }}
32 {{ template "reply" . }}
33 </div>
34{{ end }}
35
36{{ define "cancel" }}
37 <button
38 class="btn text-red-500 dark:text-red-400 flex gap-2 items-center group"
39 hx-get="/{{ .RepoInfo.FullName }}/issues/{{ .Issue.IssueId }}/comment/{{ .Comment.Id }}/replyPlaceholder"
40 hx-target="#reply-form-{{ .Comment.Id }}"
41 hx-swap="outerHTML">
42 {{ i "x" "size-4" }}
43 cancel
44 </button>
45{{ end }}
46
47{{ define "reply" }}
48 <button
49 id="reply-{{ .Comment.Id }}"
50 type="submit"
51 hx-disabled-elt="#reply-{{ .Comment.Id }}"
52 class="btn-create flex items-center gap-2 no-underline hover:no-underline">
53 {{ i "reply" "w-4 h-4 inline group-[.htmx-request]:hidden" }}
54 {{ i "loader-circle" "w-4 h-4 animate-spin hidden group-[.htmx-request]:inline" }}
55 reply
56 </button>
57{{ end }}