A vibe coded tangled fork which supports pijul.
at master 58 lines 2.0 kB view raw
1{{ define "repo/issues/fragments/putIssue" }} 2<!-- this form is used for new and edit, .Issue is passed when editing --> 3<form 4 {{ if eq .Action "edit" }} 5 hx-post="/{{ .RepoInfo.FullName }}/issues/{{ .Issue.IssueId }}/edit" 6 {{ else }} 7 hx-post="/{{ .RepoInfo.FullName }}/issues/new" 8 {{ end }} 9 hx-trigger="submit, keydown[(ctrlKey || metaKey) && key=='Enter'] from:(#title,#body)" 10 hx-swap="none" 11 hx-indicator="#spinner"> 12 <div class="flex flex-col gap-2"> 13 <div> 14 <label for="title">title</label> 15 <input type="text" name="title" id="title" class="w-full" value="{{ if .Issue }}{{ .Issue.Title }}{{ end }}" /> 16 </div> 17 <div> 18 <label for="body">body</label> 19 <textarea 20 name="body" 21 id="body" 22 rows="15" 23 class="w-full resize-y" 24 placeholder="Describe your issue. Markdown is supported." 25 >{{ if .Issue }}{{ .Issue.Body }}{{ end }}</textarea> 26 </div> 27 <div class="flex justify-between"> 28 <div id="issues" class="error"></div> 29 <div class="flex gap-2 items-center"> 30 <a 31 class="btn flex items-center gap-2 no-underline hover:no-underline" 32 type="button" 33 {{ if .Issue }} 34 href="/{{ .RepoInfo.FullName }}/issues/{{ .Issue.IssueId }}" 35 {{ else }} 36 href="/{{ .RepoInfo.FullName }}/issues" 37 {{ end }} 38 > 39 {{ i "x" "w-4 h-4" }} 40 cancel 41 </a> 42 <button type="submit" class="btn-create flex items-center gap-2"> 43 {{ if eq .Action "edit" }} 44 {{ i "pencil" "w-4 h-4" }} 45 {{ .Action }} issue 46 {{ else }} 47 {{ i "circle-plus" "w-4 h-4" }} 48 {{ .Action }} issue 49 {{ end }} 50 <span id="spinner" class="group"> 51 {{ i "loader-circle" "w-4 h-4 animate-spin hidden group-[.htmx-request]:inline" }} 52 </span> 53 </button> 54 </div> 55 </div> 56 </div> 57</form> 58{{ end }}