This repository has no description
1.2 kB
29 lines
1{{ define "repo/pulls/fragments/pullPatchUpload" }}
2 <div id="patch-upload">
3 <div class="flex items-center justify-between gap-2">
4 <p class="my-0">
5 You can paste a <code>git diff</code> or a
6 <code>git format-patch</code> patch series here.
7 </p>
8 <span id="patch-spinner" class="group">
9 {{ i "loader-circle" "size-4 animate-spin hidden group-[.htmx-request]:inline text-gray-500 dark:text-gray-400" }}
10 </span>
11 </div>
12 <textarea
13 hx-trigger="paste delay:100ms, change"
14 hx-post="/{{ .RepoInfo.RepoDid }}/pulls/new/refresh"
15 hx-include="closest form"
16 hx-target="#pr-compose-host"
17 hx-swap="outerHTML"
18 hx-indicator="#patch-spinner"
19 name="patch"
20 id="patch"
21 rows="12"
22 class="w-full mt-2 resize-y font-mono dark:bg-gray-800 dark:text-white dark:border-gray-700"
23 placeholder="diff --git a/file.txt b/file.txt
24index 1234567..abcdefg 100644
25--- a/file.txt
26+++ b/file.txt"
27 >{{ .Patch }}</textarea>
28 </div>
29{{ end }}