Monorepo for Tangled

appview/pulls: add submit shortcut

Signed-off-by: marco.tngl.sh <dev@marco.social>

authored by

marco.tngl.sh and committed by tangled.org f8877430 43c02a0b

+3
+2
appview/pages/templates/repo/pulls/fragments/pullNewComment.html
··· 5 {{ template "user/fragments/picHandleLink" .LoggedInUser.Did }} 6 <form 7 hx-post="/{{ .RepoInfo.FullName }}/pulls/{{ .Pull.PullId }}/round/{{ .RoundNumber }}/comment" 8 hx-swap="none" 9 hx-on::after-request="if(event.detail.successful) this.reset()" 10 hx-disabled-elt="#reply-{{ .RoundNumber }}" 11 class="w-full flex flex-wrap gap-2 group" 12 > 13 <textarea 14 name="body" 15 class="w-full p-2 rounded border" 16 rows=8
··· 5 {{ template "user/fragments/picHandleLink" .LoggedInUser.Did }} 6 <form 7 hx-post="/{{ .RepoInfo.FullName }}/pulls/{{ .Pull.PullId }}/round/{{ .RoundNumber }}/comment" 8 + hx-trigger="submit, keydown[(ctrlKey || metaKey) && key=='Enter'] from:#pull-comment-textarea" 9 hx-swap="none" 10 hx-on::after-request="if(event.detail.successful) this.reset()" 11 hx-disabled-elt="#reply-{{ .RoundNumber }}" 12 class="w-full flex flex-wrap gap-2 group" 13 > 14 <textarea 15 + id="pull-comment-textarea" 16 name="body" 17 class="w-full p-2 rounded border" 18 rows=8
+1
appview/pages/templates/repo/pulls/new.html
··· 7 8 <form 9 hx-post="/{{ .RepoInfo.FullName }}/pulls/new" 10 hx-indicator="#create-pull-spinner" 11 hx-swap="none" 12 >
··· 7 8 <form 9 hx-post="/{{ .RepoInfo.FullName }}/pulls/new" 10 + hx-trigger="submit, keydown[(ctrlKey || metaKey) && key=='Enter'] from:(#patch,#title,#body)" 11 hx-indicator="#create-pull-spinner" 12 hx-swap="none" 13 >