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
2.1 kB 55 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-target="#pull-comments-{{ .RoundNumber }}" 9 hx-swap="beforeend" 10 hx-disabled-elt="find button[type='submit']" 11 hx-on::after-request="if(event.detail.successful) htmx.ajax('GET', '/{{ .RepoInfo.FullName }}/pulls/{{ .Pull.PullId }}/round/{{ .RoundNumber }}/actions', {target: '#actions-{{ .RoundNumber }}', swap: 'outerHTML'})" 12 > 13 <input name="subject-uri" type="hidden" value="{{ .Pull.AtUri }}"> 14 <input name="pull-round-idx" type="hidden" value="{{ .RoundNumber }}"> 15 {{ template "fragments/markdownEditor" 16 (dict "Name" "body" 17 "BlobName" "blob" 18 "Rows" 8 19 "Required" true 20 "Placeholder" "Add to the discussion...") }} 21 {{ template "replyActions" . }} 22 <div id="comment-error-{{ .RoundNumber }}" class="error"></div> 23 </form> 24</div> 25{{ end }} 26 27{{ define "replyActions" }} 28 <div class="flex flex-wrap items-stretch justify-end gap-2 text-gray-500 dark:text-gray-400 text-sm w-full"> 29 {{ template "cancel" . }} 30 {{ template "reply" . }} 31 </div> 32{{ end }} 33 34{{ define "cancel" }} 35 <button 36 type="button" 37 class="btn-flat text-red-500 dark:text-red-400 flex gap-2 items-center group" 38 hx-get="/{{ .RepoInfo.FullName }}/pulls/{{ .Pull.PullId }}/round/{{ .RoundNumber }}/actions" 39 hx-swap="outerHTML" 40 hx-target="#actions-{{.RoundNumber}}" 41 > 42 {{ i "x" "w-4 h-4" }} 43 <span>Cancel</span> 44 </button> 45{{ end }} 46 47{{ define "reply" }} 48 <button 49 type="submit" 50 class="btn-create-flat flex items-center gap-2"> 51 {{ i "reply" "w-4 h-4 inline group-[.htmx-request]:hidden" }} 52 {{ i "loader-circle" "w-4 h-4 animate-spin hidden group-[.htmx-request]:inline" }} 53 Reply 54 </button> 55{{ end }}