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 / pullStepDetails.html
3.2 kB 81 lines
1{{ define "repo/pulls/fragments/pullStepDetails" }} 2 {{ $hasSidePanel := and .LabelDefs .RepoInfo.Roles.IsPushAllowed }} 3 {{ $labelCtx := dict "Defs" .LabelDefs "State" .LabelState "RepoInfo" .RepoInfo "Subject" "" "LoggedInUser" .LoggedInUser }} 4 5 <section class="flex flex-col md:flex-row gap-6"> 6 <div class="flex-1 min-w-0 flex flex-col gap-4"> 7 {{ template "pullStepDetailsSingle" . }} 8 {{ template "pullSubmitRow" . }} 9 </div> 10 11 {{ if $hasSidePanel }} 12 <aside class="w-full md:w-72 md:flex-shrink-0 flex flex-col gap-6"> 13 {{ template "editBasicLabels" $labelCtx }} 14 {{ template "editKvLabels" $labelCtx }} 15 </aside> 16 {{ end }} 17 </section> 18 19 <script> 20 document.querySelectorAll('input[name=body]').forEach(el => { 21 el.addEventListener('oninput', () => { 22 document.querySelector('#bodyDirty').value = 1; 23 }); 24 }); 25 </script> 26{{ end }} 27 28{{ define "pullStepDetailsSingle" }} 29 <input type="hidden" name="titleDirty" id="titleDirty" value="{{ if .TitleDirty }}1{{ end }}" /> 30 <input type="hidden" name="bodyDirty" id="bodyDirty" value="{{ if .BodyDirty }}1{{ end }}" /> 31 <div class="flex flex-col gap-1"> 32 <label for="title" class="text-xs tracking-wide text-gray-800 dark:text-gray-200">Title</label> 33 <input 34 type="text" 35 name="title" 36 id="title" 37 value="{{ .Title }}" 38 oninput="document.getElementById('titleDirty').value='1'" 39 class="w-full dark:bg-gray-800 dark:text-white dark:border-gray-700" 40 placeholder="One-line summary of your change." 41 /> 42 </div> 43 44 {{ template "fragments/markdownEditor" (dict 45 "Name" "body" 46 "Value" .Body 47 "Rows" 6 48 "Placeholder" "Describe your change. Markdown is supported." 49 ) }} 50{{ end }} 51 52{{ define "pullSubmitRow" }} 53 <div class="flex items-center justify-end gap-4 mt-auto"> 54 {{ if and .MergeCheck .MergeCheck.IsConflicted }} 55 <div class="flex items-center gap-2 text-sm"> 56 <span class="inline-flex items-center gap-1 text-red-600 dark:text-red-400"> 57 {{ i "x" "w-4 h-4" }} 58 Can't automatically merge 59 </span> 60 <span class="text-gray-500 dark:text-gray-400">You can still create the pull request</span> 61 </div> 62 {{ else if and .MergeCheck .MergeCheck.Error }} 63 <div class="flex items-center gap-2 text-sm text-red-600 dark:text-red-400"> 64 {{ i "triangle-alert" "w-4 h-4" }} 65 Merge check failed 66 </div> 67 {{ end }} 68 69 <button 70 type="submit" 71 class="btn-create flex items-center gap-2" 72 hx-indicator="#create-pull-spinner" 73 > 74 {{ i "git-pull-request-create" "w-4 h-4" }} 75 Create pull request 76 <span id="create-pull-spinner" class="group"> 77 {{ i "loader-circle" "w-4 h-4 animate-spin hidden group-[.htmx-request]:inline" }} 78 </span> 79 </button> 80 </div> 81{{ end }}