This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

core / appview / pages / templates / repo / pulls / fragments / pullHeader.html
3.4 kB 71 lines
1{{ define "repo/pulls/fragments/pullHeader" }} 2<section id="pull-{{ .Pull.PullId }}"> 3 <header class="pb-2"> 4 <h1 class="text-2xl dark:text-white"> 5 {{ .Pull.Title | description }} 6 <span class="text-gray-500 dark:text-gray-400">#{{ .Pull.PullId }}</span> 7 </h1> 8 </header> 9 10 <div class="flex items-center gap-2"> 11 {{ template "repo/pulls/fragments/pullState" .Pull.State }} 12 <span class="text-gray-500 dark:text-gray-400 text-sm flex flex-wrap items-center gap-1"> 13 opened by 14 {{ template "user/fragments/picLink" (list .Pull.OwnerDid "size-6" (index .VouchRelationships (did .Pull.OwnerDid))) }} 15 <a href="/{{ resolve .Pull.OwnerDid }}">{{ resolve .Pull.OwnerDid }}</a> 16 <span class="select-none before:content-['\00B7']"></span> 17 {{ template "repo/fragments/time" .Pull.Created }} 18 19 <span class="select-none before:content-['\00B7']"></span> 20 <span> 21 targeting 22 <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"> 23 <a href="/{{ .RepoInfo.FullName }}/tree/{{ .Pull.TargetBranch }}" class="no-underline hover:underline">{{ .Pull.TargetBranch }}</a> 24 </span> 25 </span> 26 {{ if not .Pull.IsPatchBased }} 27 from 28 <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"> 29 {{ if not .Pull.IsForkBased }} 30 {{ $repoPath := .RepoInfo.FullName }} 31 <a href="/{{ $repoPath }}/tree/{{ pathEscape .Pull.PullSource.Branch }}" class="no-underline hover:underline">{{ .Pull.PullSource.Branch }}</a> 32 {{ else if .Pull.PullSource.Repo }} 33 {{ $repoPath := print (resolve .Pull.PullSource.Repo.Did) "/" .Pull.PullSource.Repo.Slug }} 34 <a href="/{{ $repoPath }}" class="no-underline hover:underline">{{ $repoPath }}</a>: 35 <a href="/{{ $repoPath }}/tree/{{ pathEscape .Pull.PullSource.Branch }}" class="no-underline hover:underline">{{ .Pull.PullSource.Branch }}</a> 36 {{ else }} 37 <span class="italic">[deleted fork]</span>: 38 {{ .Pull.PullSource.Branch }} 39 {{ end }} 40 </span> 41 {{ end }} 42 43 {{ if and .LoggedInUser (eq .LoggedInUser.Did .Pull.OwnerDid) }} 44 <a 45 class="text-gray-500 dark:text-gray-400 flex gap-1 items-center group cursor-pointer" 46 hx-get="/{{ .RepoInfo.FullName }}/pulls/{{ .Pull.PullId }}/edit" 47 hx-swap="innerHTML" 48 hx-target="#pull-{{.Pull.PullId}}"> 49 {{ i "pencil" "size-3" }} 50 </a> 51 {{ end }} 52 </span> 53 </div> 54 55 {{ if .Pull.Body }} 56 <article id="body" class="mt-8 prose dark:prose-invert"> 57 {{ .Pull.Body | markdown }} 58 </article> 59 {{ end }} 60 61 <div class="mt-2"> 62 {{ $aturi := .Pull.AtUri }} 63 {{ template "repo/fragments/reactions" 64 (dict "Reactions" (index .Reactions $aturi) 65 "UserReacted" (index .UserReacted $aturi) 66 "ThreadAt" $aturi) }} 67 </div> 68</section> 69 70 71{{ end }}