forked from tangled.org/core
Monorepo for Tangled

appview: pulls: unify styles for fork-based pulls

the pull-source information chip displayed `fork branch` but the two
bits of information were styled differently.

this patch unifies the styles, moves both bits of info into the same
pill, styles them identically, and uses a `:` to separate them
`fork:branch`.

Changed files
+19 -23
appview
pages
templates
repo
pulls
+9 -11
appview/pages/templates/repo/pulls/fragments/pullHeader.html
··· 42 42 </span> 43 43 </span> 44 44 {{ if not .Pull.IsPatchBased }} 45 - <span>from 46 - {{ if .Pull.IsForkBased }} 47 - {{ if .Pull.PullSource.Repo }} 48 - <a href="/{{ $owner }}/{{ .Pull.PullSource.Repo.Name }}" class="no-underline hover:underline">{{ $owner }}/{{ .Pull.PullSource.Repo.Name }}</a> 49 - {{ else }} 50 - <span class="italic">[deleted fork]</span> 51 - {{ end }} 52 - {{ end }} 53 - 45 + from 54 46 <span class="text-xs rounded bg-gray-100 dark:bg-gray-700 text-black dark:text-white font-mono px-2 mx-1/2 inline-flex items-center"> 55 - {{ .Pull.PullSource.Branch }} 47 + {{ if .Pull.IsForkBased }} 48 + {{ if .Pull.PullSource.Repo }} 49 + <a href="/{{ $owner }}/{{ .Pull.PullSource.Repo.Name }}" class="no-underline hover:underline">{{ $owner }}/{{ .Pull.PullSource.Repo.Name }}</a>: 50 + {{- else -}} 51 + <span class="italic">[deleted fork]</span> 52 + {{- end -}} 53 + {{- end -}} 54 + {{- .Pull.PullSource.Branch -}} 56 55 </span> 57 - </span> 58 56 {{ end }} 59 57 </span> 60 58 </div>
+10 -12
appview/pages/templates/repo/pulls/pulls.html
··· 79 79 </span> 80 80 </span> 81 81 {{ if not .IsPatchBased }} 82 - <span>from 83 - {{ if .IsForkBased }} 84 - {{ if .PullSource.Repo }} 85 - <a href="/{{ $owner }}/{{ .PullSource.Repo.Name }}" class="no-underline hover:underline">{{ $owner }}/{{ .PullSource.Repo.Name }}</a> 86 - {{ else }} 87 - <span class="italic">[deleted fork]</span> 88 - {{ end }} 89 - {{ end }} 90 - 91 - <span class="text-xs rounded bg-gray-100 dark:bg-gray-700 text-black dark:text-white font-mono px-2 mx-1/2 inline-flex items-center"> 92 - {{ .PullSource.Branch }} 93 - </span> 82 + from 83 + <span class="text-xs rounded bg-gray-100 dark:bg-gray-700 text-black dark:text-white font-mono px-2 mx-1/2 inline-flex items-center"> 84 + {{ if .IsForkBased }} 85 + {{ if .PullSource.Repo }} 86 + <a href="/{{ $owner }}/{{ .PullSource.Repo.Name }}" class="no-underline hover:underline">{{ $owner }}/{{ .PullSource.Repo.Name }}</a>: 87 + {{- else -}} 88 + <span class="italic">[deleted fork]</span> 89 + {{- end -}} 90 + {{- end -}} 91 + {{- .PullSource.Branch -}} 94 92 </span> 95 93 {{ end }} 96 94 <span class="before:content-['·']">