A vibe coded tangled fork which supports pijul.
at 4e5083cd4d765a9f727f11c3968d032ca4846edf 58 lines 2.1 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 {{ template "user/fragments/picHandleLink" .OwnerDid }} 6 7 <!-- show user "hats" --> 8 {{ $isIssueAuthor := eq .OwnerDid $.Issue.OwnerDid }} 9 {{ if $isIssueAuthor }} 10 <span class="before:content-['·']"></span> 11 author 12 {{ end }} 13 14 <span class="before:content-['·']"></span> 15 <a 16 href="#{{ .CommentId }}" 17 class="text-gray-500 dark:text-gray-400 hover:text-gray-500 dark:hover:text-gray-400 hover:underline no-underline" 18 id="{{ .CommentId }}"> 19 {{ if .Deleted }} 20 deleted {{ template "repo/fragments/time" .Deleted }} 21 {{ else if .Edited }} 22 edited {{ template "repo/fragments/time" .Edited }} 23 {{ else }} 24 {{ template "repo/fragments/time" .Created }} 25 {{ end }} 26 </a> 27 28 {{ $isCommentOwner := and $.LoggedInUser (eq $.LoggedInUser.Did .OwnerDid) }} 29 {{ if and $isCommentOwner (not .Deleted) }} 30 <button 31 class="btn px-2 py-1 text-sm" 32 hx-get="/{{ $.RepoInfo.FullName }}/issues/{{ .Issue }}/comment/{{ .CommentId }}/edit" 33 hx-swap="outerHTML" 34 hx-target="#comment-container-{{.CommentId}}" 35 > 36 {{ i "pencil" "w-4 h-4" }} 37 </button> 38 <button 39 class="btn px-2 py-1 text-sm text-red-500 flex gap-2 items-center group" 40 hx-delete="/{{ $.RepoInfo.FullName }}/issues/{{ .Issue }}/comment/{{ .CommentId }}/" 41 hx-confirm="Are you sure you want to delete your comment?" 42 hx-swap="outerHTML" 43 hx-target="#comment-container-{{.CommentId}}" 44 > 45 {{ i "trash-2" "w-4 h-4" }} 46 {{ i "loader-circle" "w-4 h-4 animate-spin hidden group-[.htmx-request]:inline" }} 47 </button> 48 {{ end }} 49 50 </div> 51 {{ if not .Deleted }} 52 <div class="prose dark:prose-invert"> 53 {{ .Body | markdown }} 54 </div> 55 {{ end }} 56 </div> 57 {{ end }} 58{{ end }}