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

appview/pages: repo fullname

Changed files
+10 -5
appview
pages
+5
appview/pages/pages.go
···
"io"
"io/fs"
"log"
+
"path"
"strings"
"github.com/sotangled/tangled/appview/auth"
···
} else {
return r.OwnerDid
}
+
}
+
+
func (r RepoInfo) FullName() string {
+
return path.Join(r.OwnerWithAt(), r.Name)
}
type RepoIndexParams struct {
+3 -3
appview/pages/templates/repo/commit.html
···
{{ define "content" }}
-
{{ $repo := .RepoInfo.Name }}
+
{{ $repo := .RepoInfo.FullName }}
{{ $commit := .Diff.Commit }}
{{ $stat := .Diff.Stat }}
{{ $diff := .Diff.Diff }}
···
<div>
<strong>commit</strong>
<p><a href="/{{ $repo }}/commit/{{ $commit.This }}" class="commit-hash">
-
{{ $commit.This }}
+
{{ slice $commit.This 0 8 }}
</a>
</p>
</div>
···
<div>
<strong>parent</strong>
<p><a href="/{{ $repo }}/commit/{{ $commit.Parent }}" class="commit-hash">
-
{{ $commit.Parent }}
+
{{ slice $commit.Parent 0 8 }}
</a></p>
</div>
+1 -1
appview/pages/templates/repo/index.html
···
<div class="log">
{{ range .Commits }}
<div>
-
<div><a href="/{{ $.RepoInfo.OwnerWithAt }}/{{ $.RepoInfo.Name }}/commit/{{ .Hash.String }}" class="commit-hash">{{ slice .Hash.String 0 8 }}</a></div>
+
<div><a href="/{{ $.RepoInfo.FullName }}/commit/{{ .Hash.String }}" class="commit-hash">{{ slice .Hash.String 0 8 }}</a></div>
<pre>{{ .Message }}</pre>
</div>
<div class="commit-info">
+1 -1
appview/pages/templates/repo/log.html
···
<div class="log">
{{ range .Commits }}
<div>
-
<div><a href="/{{ $.RepoInfo.OwnerWithAt }}/{{ $.RepoInfo.Name }}/commit/{{ .Hash.String }}" class="commit-hash">{{ slice .Hash.String 0 8 }}</a></div>
+
<div><a href="/{{ $.RepoInfo.FullName }}/commit/{{ .Hash.String }}" class="commit-hash">{{ slice .Hash.String 0 8 }}</a></div>
<pre>{{ .Message }}</pre>
</div>
<div class="commit-info">