A vibe coded tangled fork which supports pijul.
at 16f25ff5d55581ae0d83cbeac370393a081e2763 44 lines 1.5 kB view raw
1{{ define "repo/issues/fragments/editIssueComment" }} 2 <div id="comment-body-{{.Comment.Id}}" class="pt-2"> 3 <textarea 4 id="edit-textarea-{{ .Comment.Id }}" 5 name="body" 6 class="w-full p-2 rounded border border-gray-200 dark:border-gray-700" 7 rows="5" 8 autofocus>{{ .Comment.Body }}</textarea> 9 10 {{ template "editActions" $ }} 11 </div> 12{{ end }} 13 14{{ define "editActions" }} 15 <div class="flex flex-wrap items-center justify-end gap-2 text-gray-500 dark:text-gray-400 text-sm pt-2"> 16 {{ template "cancel" . }} 17 {{ template "save" . }} 18 </div> 19{{ end }} 20 21{{ define "save" }} 22 <button 23 class="btn-create py-0 flex gap-1 items-center group text-sm" 24 hx-post="/{{ .RepoInfo.FullName }}/issues/{{ .Issue.IssueId }}/comment/{{ .Comment.Id }}/edit" 25 hx-trigger="click, keydown[(ctrlKey || metaKey) && key=='Enter'] from:#edit-textarea-{{ .Comment.Id }}" 26 hx-include="#edit-textarea-{{ .Comment.Id }}" 27 hx-target="#comment-body-{{ .Comment.Id }}" 28 hx-swap="outerHTML"> 29 {{ i "check" "size-4" }} 30 save 31 {{ i "loader-circle" "w-4 h-4 animate-spin hidden group-[.htmx-request]:inline" }} 32 </button> 33{{ end }} 34 35{{ define "cancel" }} 36 <button 37 class="btn py-0 text-red-500 dark:text-red-400 flex gap-1 items-center group" 38 hx-get="/{{ .RepoInfo.FullName }}/issues/{{ .Issue.IssueId }}/comment/{{ .Comment.Id }}/" 39 hx-target="#comment-body-{{ .Comment.Id }}" 40 hx-swap="outerHTML"> 41 {{ i "x" "size-4" }} 42 cancel 43 </button> 44{{ end }}