···
{{ $isCurrent = eq $pull.PullId $.Pull.PullId }}
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 }}">
8
+
<a href="/{{ $.RepoInfo.FullName }}/pulls/{{ $pull.PullId }}" class="no-underline hover:no-underline hover:bg-gray-100 hover:dark:bg-gray-700">
9
+
<div class="flex gap-2 items-center px-2 {{ if $isCurrent }}bg-gray-100 dark:bg-gray-700{{ end }}">
{{ i "arrow-right" "w-4 h-4" }}
12
-
<div {{ if not $isCurrent }} class="ml-6" {{ end }}>
13
-
{{ block "summarizedHeader" (list $pull $) }} {{ end }}
13
+
<div class="{{ if not $isCurrent }} ml-6 {{ end }} w-full py-2">
14
+
{{ block "summarizedHeader" $pull }} {{ end }}
{{ 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>
23
+
<div class="flex text-sm items-center justify-between w-full">
24
+
<div class="flex items-center gap-2">
25
+
{{ block "summarizedPullState" . }} {{ end }}
27
+
<span class="text-gray-500 dark:text-gray-400">#{{ .PullId }}</span>
33
+
{{ $latestRound := .LastRoundNumber }}
34
+
{{ $lastSubmission := index .Submissions $latestRound }}
35
+
{{ $commentCount := len $lastSubmission.Comments }}
37
+
<div class="inline-flex items-center gap-2">
39
+
comment{{if ne $commentCount 1}}s{{end}}
42
+
<span class="mx-2 before:content-['·'] before:select-none"></span>
43
+
<span>round <span class="font-mono">#{{ $latestRound }}</span></span>
{{ define "summarizedPullState" }}