This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

core / appview / pages / templates / repo / pulls / fragments / pullNewComment.html
1.8 kB 56 lines
1{{ define "repo/pulls/fragments/pullNewComment" }} 2<div class="w-full flex flex-col gap-2"> 3 {{ template "user/fragments/picHandleLink" .LoggedInUser.Did }} 4 <form 5 class="w-full flex flex-wrap gap-2 group" 6 hx-post="/comment" 7 hx-trigger="submit, keydown[(ctrlKey || metaKey) && key=='Enter'] from:find textarea" 8 hx-swap="none" 9 hx-indicator="find button[type='submit']" 10 hx-disabled-elt="find button[type='submit']" 11 hx-on::after-request="if(event.detail.successful) this.reset()" 12 > 13 <input name="subject-uri" type="hidden" value="{{ .Pull.AtUri }}"> 14 <input name="pull-round-idx" type="hidden" value="{{ .RoundNumber }}"> 15 <textarea 16 id="comment-textarea" 17 name="body" 18 class="w-full p-2 rounded border" 19 rows=8 20 placeholder="Add to the discussion..."></textarea 21 > 22 {{ template "replyActions" . }} 23 <div id="pull-comment"></div> 24 </form> 25</div> 26{{ end }} 27 28{{ define "replyActions" }} 29 <div class="flex flex-wrap items-stretch justify-end gap-2 text-gray-500 dark:text-gray-400 text-sm w-full"> 30 {{ template "cancel" . }} 31 {{ template "reply" . }} 32 </div> 33{{ end }} 34 35{{ define "cancel" }} 36 <button 37 type="button" 38 class="btn-flat text-red-500 dark:text-red-400 flex gap-2 items-center group" 39 hx-get="/{{ .RepoInfo.FullName }}/pulls/{{ .Pull.PullId }}/round/{{ .RoundNumber }}/actions" 40 hx-swap="outerHTML" 41 hx-target="#actions-{{.RoundNumber}}" 42 > 43 {{ i "x" "w-4 h-4" }} 44 <span>Cancel</span> 45 </button> 46{{ end }} 47 48{{ define "reply" }} 49 <button 50 type="submit" 51 class="btn-create-flat flex items-center gap-2"> 52 {{ i "reply" "w-4 h-4 inline group-[.htmx-request]:hidden" }} 53 {{ i "loader-circle" "w-4 h-4 animate-spin hidden group-[.htmx-request]:inline" }} 54 Reply 55 </button> 56{{ end }}