tangled
alpha
login
or
join now
willdot.net
/
tangled-fork
forked from
tangled.org/core
Monorepo for Tangled
0
fork
atom
overview
issues
pulls
pipelines
appview: pulls: improve stack styling
bigger links
oppi.li
8 months ago
6b7c2cd5
9d250f3a
+29
-15
1 changed file
expand all
collapse all
unified
split
appview
pages
templates
repo
pulls
fragments
pullStack.html
+29
-15
appview/pages/templates/repo/pulls/fragments/pullStack.html
···
5
5
{{ with $.Pull }}
6
6
{{ $isCurrent = eq $pull.PullId $.Pull.PullId }}
7
7
{{ end }}
8
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
9
-
{{ if $isCurrent }}
8
8
+
<a href="/{{ $.RepoInfo.FullName }}/pulls/{{ $pull.PullId }}" class="no-underline hover:no-underline hover:bg-gray-100 hover:dark:bg-gray-700">
9
9
+
<div class="flex gap-2 items-center px-2 {{ if $isCurrent }}bg-gray-100 dark:bg-gray-700{{ end }}">
10
10
+
{{ if $isCurrent }}
10
11
{{ i "arrow-right" "w-4 h-4" }}
11
11
-
{{ end }}
12
12
-
<div {{ if not $isCurrent }} class="ml-6" {{ end }}>
13
13
-
{{ block "summarizedHeader" (list $pull $) }} {{ end }}
12
12
+
{{ end }}
13
13
+
<div class="{{ if not $isCurrent }} ml-6 {{ end }} w-full py-2">
14
14
+
{{ block "summarizedHeader" $pull }} {{ end }}
15
15
+
</div>
14
16
</div>
15
15
-
</div>
17
17
+
</a>
16
18
{{ end }}
17
19
</div>
18
20
{{ end }}
19
21
20
22
{{ define "summarizedHeader" }}
21
21
-
{{ $pull := index . 0 }}
22
22
-
{{ $root := index . 1 }}
23
23
-
<a href="/{{ $root.RepoInfo.FullName }}/pulls/{{ $pull.PullId }}">
24
24
-
<div class="flex text-sm items-center gap-2">
25
25
-
{{ block "summarizedPullState" $pull }} {{ end }}
26
26
-
<span class="dark:text-white">
27
27
-
<span class="text-gray-500 dark:text-gray-400">#{{ $pull.PullId }}</span>
28
28
-
{{ $pull.Title }}
23
23
+
<div class="flex text-sm items-center justify-between w-full">
24
24
+
<div class="flex items-center gap-2">
25
25
+
{{ block "summarizedPullState" . }} {{ end }}
26
26
+
<span>
27
27
+
<span class="text-gray-500 dark:text-gray-400">#{{ .PullId }}</span>
28
28
+
{{ .Title }}
29
29
</span>
30
30
</div>
31
31
-
</a>
31
31
+
32
32
+
<div>
33
33
+
{{ $latestRound := .LastRoundNumber }}
34
34
+
{{ $lastSubmission := index .Submissions $latestRound }}
35
35
+
{{ $commentCount := len $lastSubmission.Comments }}
36
36
+
<span>
37
37
+
<div class="inline-flex items-center gap-2">
38
38
+
{{ $commentCount }}
39
39
+
comment{{if ne $commentCount 1}}s{{end}}
40
40
+
</div>
41
41
+
</span>
42
42
+
<span class="mx-2 before:content-['·'] before:select-none"></span>
43
43
+
<span>round <span class="font-mono">#{{ $latestRound }}</span></span>
44
44
+
</div>
45
45
+
</div>
32
46
{{ end }}
33
47
34
48
{{ define "summarizedPullState" }}