A vibe coded tangled fork which supports pijul.
at 9d250f3a9844b6d5c3e359744b5621b66a13cb00 49 lines 1.7 kB view raw
1{{ define "repo/pulls/fragments/pullStack" }} 2 <div class="grid grid-cols-1 rounded border border-gray-200 dark:border-gray-700 divide-y divide-gray-200 dark:divide-gray-700"> 3 {{ range $pull := .Stack }} 4 {{ $isCurrent := false }} 5 {{ with $.Pull }} 6 {{ $isCurrent = eq $pull.PullId $.Pull.PullId }} 7 {{ end }} 8 <div class="flex gap-2 items-center p-2 hover:bg-gray-100 hover:dark:bg-gray-700 {{ if $isCurrent }}bg-gray-100 dark:bg-gray-700{{ end }}"> 9 {{ if $isCurrent }} 10 {{ i "arrow-right" "w-4 h-4" }} 11 {{ end }} 12 <div {{ if not $isCurrent }} class="ml-6" {{ end }}> 13 {{ block "summarizedHeader" (list $pull $) }} {{ end }} 14 </div> 15 </div> 16 {{ end }} 17 </div> 18{{ end }} 19 20{{ define "summarizedHeader" }} 21 {{ $pull := index . 0 }} 22 {{ $root := index . 1 }} 23 <a href="/{{ $root.RepoInfo.FullName }}/pulls/{{ $pull.PullId }}"> 24 <div class="flex text-sm items-center gap-2"> 25 {{ block "summarizedPullState" $pull }} {{ end }} 26 <span class="dark:text-white"> 27 <span class="text-gray-500 dark:text-gray-400">#{{ $pull.PullId }}</span> 28 {{ $pull.Title }} 29 </span> 30 </div> 31 </a> 32{{ end }} 33 34{{ define "summarizedPullState" }} 35 {{ $fgColor := "text-gray-600 dark:text-gray-300" }} 36 {{ $icon := "ban" }} 37 38 {{ if .State.IsOpen }} 39 {{ $fgColor = "text-green-600 dark:text-green-500" }} 40 {{ $icon = "git-pull-request" }} 41 {{ else if .State.IsMerged }} 42 {{ $fgColor = "text-purple-600 dark:text-purple-500" }} 43 {{ $icon = "git-merge" }} 44 {{ end }} 45 46 {{ $style := printf "w-4 h-4 %s" $fgColor }} 47 48 {{ i $icon $style }} 49{{ end }}