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 / pullComposeHost.html
4.0 kB 74 lines
1{{ define "repo/pulls/fragments/pullComposeHost" }} 2 <div id="pr-compose-host" class="flex flex-col"> 3 {{ if .PrefillError }} 4 <div class="mb-4 p-3 border border-red-200 dark:border-red-800 rounded bg-red-50 dark:bg-red-900/30 text-sm text-red-800 dark:text-red-200 flex items-center gap-2"> 5 {{ i "triangle-alert" "w-4 h-4 flex-shrink-0" }} 6 <span>{{ .PrefillError }}</span> 7 </div> 8 {{ end }} 9 10 {{ $hasCommits := and .Comparison .Comparison.FormatPatch }} 11 {{ $hasDiff := false }} 12 {{ if .Diff }}{{ if .Diff.Diff }}{{ $hasDiff = true }}{{ end }}{{ end }} 13 {{ $showDetails := and (or $hasCommits $hasDiff) (not .IsStacked) }} 14 15 <form 16 hx-post="/{{ .RepoInfo.FullName }}/pulls/new" 17 hx-trigger="submit, keydown[(ctrlKey || metaKey) && key=='Enter'] from:(#patch,#title,#body)" 18 hx-indicator="#create-pull-spinner" 19 hx-swap="none" 20 class="flex flex-col gap-6" 21 > 22 <section class="relative flex flex-col gap-3"> 23 <div class="absolute left-3 -translate-x-1/2 top-3 -bottom-6 w-px bg-gray-200 dark:bg-gray-700"></div> 24 <div class="flex items-center gap-4 relative"> 25 <div class="flex-shrink-0 relative z-10"> 26 {{ template "pullComposeSectionNumber" 1 }} 27 </div> 28 <h3 class="uppercase text-sm tracking-wide font-bold my-0 dark:text-white">source</h3> 29 </div> 30 <div class="ml-10 flex flex-col gap-3"> 31 {{ template "repo/pulls/fragments/pullStepSource" . }} 32 </div> 33 </section> 34 35 <section class="relative flex flex-col gap-3"> 36 {{ if $showDetails }} 37 <div class="absolute left-3 -translate-x-1/2 -top-6 -bottom-6 w-px bg-gray-200 dark:bg-gray-700"></div> 38 {{ else }} 39 <div class="absolute left-3 -translate-x-1/2 -top-6 -bottom-12 w-px bg-gray-200 dark:bg-gray-700 [mask-image:linear-gradient(to_bottom,black_calc(100%-1.5rem),transparent)]"></div> 40 {{ end }} 41 <div class="flex items-center gap-4 relative"> 42 <div class="flex-shrink-0 relative z-10"> 43 {{ template "pullComposeSectionNumber" 2 }} 44 </div> 45 <h3 class="uppercase text-sm tracking-wide font-bold my-0 dark:text-white">review</h3> 46 </div> 47 <div class="ml-10 flex flex-col gap-3"> 48 {{ template "repo/pulls/fragments/pullStepReview" . }} 49 </div> 50 </section> 51 52 {{ if $showDetails }} 53 <section class="relative flex flex-col gap-3"> 54 <div class="absolute left-3 -translate-x-1/2 -top-6 -bottom-12 w-px bg-gray-200 dark:bg-gray-700 [mask-image:linear-gradient(to_bottom,black_calc(100%-1.5rem),transparent)]"></div> 55 <div class="flex items-center gap-4 relative"> 56 <div class="flex-shrink-0 relative z-10"> 57 {{ template "pullComposeSectionNumber" 3 }} 58 </div> 59 <h3 class="uppercase text-sm tracking-wide font-bold my-0 dark:text-white">details</h3> 60 </div> 61 <div class="ml-10 flex flex-col gap-3"> 62 {{ template "repo/pulls/fragments/pullStepDetails" . }} 63 </div> 64 </section> 65 {{ end }} 66 </form> 67 68 <div id="pull" class="error dark:text-red-300 mt-4 ml-10"></div> 69 </div> 70{{ end }} 71 72{{ define "pullComposeSectionNumber" }} 73 <span class="inline-flex items-center justify-center w-6 h-6 rounded-full bg-gray-200 text-gray-600 dark:bg-gray-700 dark:text-gray-300 text-xs font-bold">{{ . }}</span> 74{{ end }}