forked from tangled.org/core
Monorepo for Tangled — https://tangled.org
1{{ define "repo/pulls/fragments/pullNewComment" }} 2<div 3 id="pull-comment-card-{{ .RoundNumber }}" 4 class="bg-white dark:bg-gray-800 rounded drop-shadow-sm p-4 relative w-full flex flex-col gap-2"> 5 <div class="text-sm text-gray-500 dark:text-gray-400"> 6 {{ didOrHandle .LoggedInUser.Did .LoggedInUser.Handle }} 7 </div> 8 <form 9 hx-post="/{{ .RepoInfo.FullName }}/pulls/{{ .Pull.PullId }}/round/{{ .RoundNumber }}/comment" 10 hx-indicator="#create-comment-spinner" 11 hx-swap="none" 12 class="w-full flex flex-wrap gap-2" 13 > 14 <textarea 15 name="body" 16 class="w-full p-2 rounded border border-gray-200" 17 placeholder="Add to the discussion..."></textarea 18 > 19 <button type="submit" class="btn flex items-center gap-2"> 20 {{ i "message-square" "w-4 h-4" }} 21 <span>comment</span> 22 <span id="create-comment-spinner" class="group"> 23 {{ i "loader-circle" "w-4 h-4 animate-spin hidden group-[.htmx-request]:inline" }} 24 </span> 25 </button> 26 <button 27 type="button" 28 class="btn flex items-center gap-2 group" 29 hx-get="/{{ .RepoInfo.FullName }}/pulls/{{ .Pull.PullId }}/round/{{ .RoundNumber }}/actions" 30 hx-swap="outerHTML" 31 hx-target="#pull-comment-card-{{ .RoundNumber }}" 32 > 33 {{ i "x" "w-4 h-4" }} 34 <span>cancel</span> 35 {{ i "loader-circle" "w-4 h-4 animate-spin hidden group-[.htmx-request]:inline" }} 36 </button> 37 <div id="pull-comment"></div> 38 </form> 39</div> 40{{ end }}