this repo has no description
1{{ define "fragments/issueComment" }} 2 {{ with .Comment }} 3 <div id="comment-container-{{.CommentId}}"> 4 <div class="flex items-center gap-2 mb-2 text-gray-500 text-sm"> 5 {{ $owner := index $.DidHandleMap .OwnerDid }} 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 <span class="rounded bg-gray-100 text-black font-mono px-2 mx-1/2 inline-flex items-center"> 13 author 14 </span> 15 {{ end }} 16 17 <span class="before:content-['·']"></span> 18 <a 19 href="#{{ .CommentId }}" 20 class="text-gray-500 hover:text-gray-500 hover:underline no-underline" 21 id="{{ .CommentId }}"> 22 {{ .Created | timeFmt }} 23 </a> 24 25 {{ $isCommentOwner := eq $.LoggedInUser.Did .OwnerDid }} 26 {{ if and $isCommentOwner (not .Deleted) }} 27 <button 28 class="btn px-2 py-1 text-sm" 29 hx-get="/{{ $.RepoInfo.FullName }}/issues/{{ .Issue }}/comment/{{ .CommentId }}/edit" 30 hx-swap="outerHTML" 31 hx-target="#comment-container-{{.CommentId}}" 32 > 33 {{ i "pencil" "w-4 h-4" }} 34 </button> 35 <button class="btn px-2 py-1 text-sm text-red-500" hx-delete=""> 36 {{ i "trash-2" "w-4 h-4" }} 37 </button> 38 {{ end }} 39 40 {{ if .Deleted }} 41 <span class="before:content-['·']">deleted {{ .Deleted | timeFmt }}</span> 42 {{ end }} 43 44 </div> 45 {{ if not .Deleted }} 46 <div class="prose"> 47 {{ .Body | markdown }} 48 </div> 49 {{ end }} 50 </div> 51 {{ end }} 52{{ end }}