diff --git a/appview/pages/templates/repo/pulls/fragments/pullCompareBranches.html b/appview/pages/templates/repo/pulls/fragments/pullCompareBranches.html --- a/appview/pages/templates/repo/pulls/fragments/pullCompareBranches.html +++ b/appview/pages/templates/repo/pulls/fragments/pullCompareBranches.html @@ -1,45 +1,43 @@ {{ define "repo/pulls/fragments/pullCompareBranches" }} -
- -
- + - {{ $recent := index .Branches 0 }} - {{ range .Branches }} - {{ $isRecent := eq .Reference.Name $recent.Reference.Name }} - {{ $preset := false }} - {{ if $.SourceBranch }} - {{ $preset = eq .Reference.Name $.SourceBranch }} - {{ else }} - {{ $preset = $isRecent }} - {{ end }} - - + {{ $recent := "" }} + {{ if .SourceBranches }} + {{ $recent = (index .SourceBranches 0).Reference.Name }} + {{ end }} + {{ range .SourceBranches }} + {{ $isRecent := eq .Reference.Name $recent }} + {{ $preset := false }} + {{ if $.SourceBranch }} + {{ $preset = eq .Reference.Name $.SourceBranch }} + {{ else }} + {{ $preset = $isRecent }} {{ end }} - -
-
-
- - + + {{ end }} + + {{ i "loader-circle" "size-4 animate-spin hidden peer-[.htmx-request]:inline text-gray-500 dark:text-gray-400" }}
- -

- Title and description are optional; if left out, they will be extracted - from the first commit. -

{{ end }} diff --git a/appview/pages/templates/repo/pulls/fragments/pullCompareForks.html b/appview/pages/templates/repo/pulls/fragments/pullCompareForks.html --- a/appview/pages/templates/repo/pulls/fragments/pullCompareForks.html +++ b/appview/pages/templates/repo/pulls/fragments/pullCompareForks.html @@ -1,53 +1,37 @@ {{ define "repo/pulls/fragments/pullCompareForks" }} -
- - selected: {{ .Selected }} -
-
- - - -
+
+
+ + {{ i "loader-circle" "size-4 animate-spin hidden peer-[.htmx-request]:inline text-gray-500 dark:text-gray-400" }} +
-
+
+ {{ if and .Fork .ForkBranches }} + {{ template "repo/pulls/fragments/pullCompareForksBranches" (dict "SourceBranches" .ForkBranches "SourceBranch" .SourceBranch "RepoInfo" .RepoInfo) }} + {{ else }}
Select a fork first to view available branches
-
+ {{ end }}
- -
- - -
- -

- Title and description are optional; if left out, they will be extracted - from the first commit. -

{{ end }} diff --git a/appview/pages/templates/repo/pulls/fragments/pullCompareForksBranches.html b/appview/pages/templates/repo/pulls/fragments/pullCompareForksBranches.html --- a/appview/pages/templates/repo/pulls/fragments/pullCompareForksBranches.html +++ b/appview/pages/templates/repo/pulls/fragments/pullCompareForksBranches.html @@ -2,18 +2,31 @@ {{ define "repo/pulls/fragments/pullCompareForksBranches" }}
+ {{ i "loader-circle" "size-4 animate-spin hidden peer-[.htmx-request]:inline text-gray-500 dark:text-gray-400" }}
{{ end }} diff --git a/appview/pages/templates/repo/pulls/fragments/pullPatchUpload.html b/appview/pages/templates/repo/pulls/fragments/pullPatchUpload.html --- a/appview/pages/templates/repo/pulls/fragments/pullPatchUpload.html +++ b/appview/pages/templates/repo/pulls/fragments/pullPatchUpload.html @@ -1,13 +1,21 @@ {{ define "repo/pulls/fragments/pullPatchUpload" }}
-

- You can paste a git diff or a - git format-patch patch series here. -

+
+

+ You can paste a git diff or a + git format-patch patch series here. +

+ + {{ i "loader-circle" "size-4 animate-spin hidden group-[.htmx-request]:inline text-gray-500 dark:text-gray-400" }} + +
+ >{{ .Patch }}
{{ end }}