forked from tangled.org/core
this repo has no description

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
···
</span>
</span>
{{ if not .Pull.IsPatchBased }}
-
<span>from
-
{{ if .Pull.IsForkBased }}
-
{{ if .Pull.PullSource.Repo }}
-
<a href="/{{ $owner }}/{{ .Pull.PullSource.Repo.Name }}" class="no-underline hover:underline">{{ $owner }}/{{ .Pull.PullSource.Repo.Name }}</a>
-
{{ else }}
-
<span class="italic">[deleted fork]</span>
-
{{ end }}
-
{{ end }}
-
+
from
<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">
-
{{ .Pull.PullSource.Branch }}
+
{{ if .Pull.IsForkBased }}
+
{{ if .Pull.PullSource.Repo }}
+
<a href="/{{ $owner }}/{{ .Pull.PullSource.Repo.Name }}" class="no-underline hover:underline">{{ $owner }}/{{ .Pull.PullSource.Repo.Name }}</a>:
+
{{- else -}}
+
<span class="italic">[deleted fork]</span>
+
{{- end -}}
+
{{- end -}}
+
{{- .Pull.PullSource.Branch -}}
</span>
-
</span>
{{ end }}
</span>
</div>
+10 -12
appview/pages/templates/repo/pulls/pulls.html
···
</span>
</span>
{{ if not .IsPatchBased }}
-
<span>from
-
{{ if .IsForkBased }}
-
{{ if .PullSource.Repo }}
-
<a href="/{{ $owner }}/{{ .PullSource.Repo.Name }}" class="no-underline hover:underline">{{ $owner }}/{{ .PullSource.Repo.Name }}</a>
-
{{ else }}
-
<span class="italic">[deleted fork]</span>
-
{{ end }}
-
{{ end }}
-
-
<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">
-
{{ .PullSource.Branch }}
-
</span>
+
from
+
<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">
+
{{ if .IsForkBased }}
+
{{ if .PullSource.Repo }}
+
<a href="/{{ $owner }}/{{ .PullSource.Repo.Name }}" class="no-underline hover:underline">{{ $owner }}/{{ .PullSource.Repo.Name }}</a>:
+
{{- else -}}
+
<span class="italic">[deleted fork]</span>
+
{{- end -}}
+
{{- end -}}
+
{{- .PullSource.Branch -}}
</span>
{{ end }}
<span class="before:content-['·']">