A vibe coded tangled fork which supports pijul.
at a373e2e1575abac5256acaae209aae1d6ebb9f6a 47 lines 1.5 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"> 9 {{ block "summarizedHeader" (list $pull $) }} {{ end }} 10 {{ if $isCurrent }} 11 {{ i "arrow-left" "w-4 h-4" }} 12 {{ end }} 13 </div> 14 {{ end }} 15 </div> 16{{ end }} 17 18{{ define "summarizedHeader" }} 19 {{ $pull := index . 0 }} 20 {{ $root := index . 1 }} 21 <a href="/{{ $root.RepoInfo.FullName }}/pulls/{{ $pull.PullId }}" class="no-underline hover:no-underline"> 22 <div class="flex text-sm items-center gap-2"> 23 {{ block "summarizedPullState" $pull }} {{ end }} 24 <span class="dark:text-white"> 25 <span class="text-gray-500 dark:text-gray-400">#{{ $pull.PullId }}</span> 26 {{ $pull.Title }} 27 </span> 28 </div> 29 </a> 30{{ end }} 31 32{{ define "summarizedPullState" }} 33 {{ $fgColor := "text-gray-600 dark:text-gray-300" }} 34 {{ $icon := "ban" }} 35 36 {{ if .State.IsOpen }} 37 {{ $fgColor = "text-green-600 dark:text-green-500" }} 38 {{ $icon = "git-pull-request" }} 39 {{ else if .State.IsMerged }} 40 {{ $fgColor = "text-purple-600 dark:text-purple-500" }} 41 {{ $icon = "git-merge" }} 42 {{ end }} 43 44 {{ $style := printf "w-4 h-4 %s" $fgColor }} 45 46 {{ i $icon $style }} 47{{ end }}