A vibe coded tangled fork which supports pijul.
at 19334d2b456fc966ea0b4e58954ba50fcacf5cc5 59 lines 2.2 kB view raw
1{{ define "repo/issues/fragments/issueComment" }} 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 := index $.DidHandleMap .OwnerDid }} 6 {{ template "user/fragments/picHandleLink" $owner }} 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 {{ if .Deleted }} 21 deleted {{ template "repo/fragments/time" .Deleted }} 22 {{ else if .Edited }} 23 edited {{ template "repo/fragments/time" .Edited }} 24 {{ else }} 25 {{ template "repo/fragments/time" .Created }} 26 {{ end }} 27 </a> 28 29 {{ $isCommentOwner := and $.LoggedInUser (eq $.LoggedInUser.Did .OwnerDid) }} 30 {{ if and $isCommentOwner (not .Deleted) }} 31 <button 32 class="btn px-2 py-1 text-sm" 33 hx-get="/{{ $.RepoInfo.FullName }}/issues/{{ .Issue }}/comment/{{ .CommentId }}/edit" 34 hx-swap="outerHTML" 35 hx-target="#comment-container-{{.CommentId}}" 36 > 37 {{ i "pencil" "w-4 h-4" }} 38 </button> 39 <button 40 class="btn px-2 py-1 text-sm text-red-500 flex gap-2 items-center group" 41 hx-delete="/{{ $.RepoInfo.FullName }}/issues/{{ .Issue }}/comment/{{ .CommentId }}/" 42 hx-confirm="Are you sure you want to delete your comment?" 43 hx-swap="outerHTML" 44 hx-target="#comment-container-{{.CommentId}}" 45 > 46 {{ i "trash-2" "w-4 h-4" }} 47 {{ i "loader-circle" "w-4 h-4 animate-spin hidden group-[.htmx-request]:inline" }} 48 </button> 49 {{ end }} 50 51 </div> 52 {{ if not .Deleted }} 53 <div class="prose dark:prose-invert"> 54 {{ .Body | markdown }} 55 </div> 56 {{ end }} 57 </div> 58 {{ end }} 59{{ end }}