appview: Update New PR Page #490

The compare forks option dropdown now shows repos in which you are a collaborator on instead of just repos you own.

Changed files
+9 -6
appview
db
pages
templates
repo
pulls
+8 -5
appview/db/repos.go
··· 467 467 var repos []Repo 468 468 469 469 rows, err := e.Query( 470 - `select did, name, knot, rkey, description, created, at_uri, source 471 - from repos 472 - where did = ? and source is not null and source != '' 473 - order by created desc`, 474 - did, 470 + `select distinct r.did, r.name, r.knot, r.rkey, r.description, r.created, r.at_uri, r.source 471 + from repos r 472 + left join collaborators c on r.at_uri = c.repo_at 473 + where (r.did = ? or c.subject_did = ?) 474 + and r.source is not null 475 + and r.source != '' 476 + order by r.created desc`, 477 + did, did, 475 478 ) 476 479 if err != nil { 477 480 return nil, err
+1 -1
appview/pages/templates/repo/pulls/fragments/pullCompareForks.html
··· 20 20 <option disabled selected>select a fork</option> 21 21 {{ range .Forks }} 22 22 <option value="{{ .Name }}" {{ if eq .Name $.Selected }}selected{{ end }} class="py-1"> 23 - {{ .Name }} 23 + {{ .Did | resolve }}/{{ .Name }} 24 24 </option> 25 25 {{ end }} 26 26 </select>