A vibe coded tangled fork which supports pijul.
1{{ define "repo/issues/fragments/editIssueComment" }}
2 {{ with .Comment }}
3 <div id="comment-container-{{.CommentId}}">
4 <div class="flex items-center gap-2 mb-2 text-gray-500 dark:text-gray-400 text-sm flex-wrap">
5 {{ $owner := didOrHandle $.LoggedInUser.Did $.LoggedInUser.Handle }}
6 <a href="/{{ $owner }}" class="no-underline hover:underline">{{ $owner }}</a>
7
8 <!-- show user "hats" -->
9 {{ $isIssueAuthor := eq .OwnerDid $.Issue.OwnerDid }}
10 {{ if $isIssueAuthor }}
11 <span class="before:content-['·']"></span>
12 author
13 {{ end }}
14
15 <span class="before:content-['·']"></span>
16 <a
17 href="#{{ .CommentId }}"
18 class="text-gray-500 dark:text-gray-400 hover:text-gray-500 dark:hover:text-gray-400 hover:underline no-underline"
19 id="{{ .CommentId }}">
20 {{ template "repo/fragments/time" .Created }}
21 </a>
22
23 <button
24 class="btn px-2 py-1 flex items-center gap-2 text-sm group"
25 hx-post="/{{ $.RepoInfo.FullName }}/issues/{{ .Issue }}/comment/{{ .CommentId }}/edit"
26 hx-include="#edit-textarea-{{ .CommentId }}"
27 hx-target="#comment-container-{{ .CommentId }}"
28 hx-swap="outerHTML">
29 {{ i "check" "w-4 h-4" }}
30 {{ i "loader-circle" "w-4 h-4 animate-spin hidden group-[.htmx-request]:inline" }}
31 </button>
32 <button
33 class="btn px-2 py-1 flex items-center gap-2 text-sm"
34 hx-get="/{{ $.RepoInfo.FullName }}/issues/{{ .Issue }}/comment/{{ .CommentId }}/"
35 hx-target="#comment-container-{{ .CommentId }}"
36 hx-swap="outerHTML">
37 {{ i "x" "w-4 h-4" }}
38 </button>
39 <span id="comment-{{.CommentId}}-status"></span>
40 </div>
41
42 <div>
43 <textarea
44 id="edit-textarea-{{ .CommentId }}"
45 name="body"
46 class="w-full p-2 border rounded min-h-[100px]">{{ .Body }}</textarea>
47 </div>
48 </div>
49 {{ end }}
50{{ end }}
51