diff --git a/appview/pages/pages.go b/appview/pages/pages.go index f844fc19..a5b2b94e 100644 --- a/appview/pages/pages.go +++ b/appview/pages/pages.go @@ -7,6 +7,7 @@ import ( "io" "io/fs" "log" + "path" "strings" "github.com/sotangled/tangled/appview/auth" @@ -141,6 +142,10 @@ func (r RepoInfo) OwnerWithAt() string { } } +func (r RepoInfo) FullName() string { + return path.Join(r.OwnerWithAt(), r.Name) +} + type RepoIndexParams struct { LoggedInUser *auth.User RepoInfo RepoInfo diff --git a/appview/pages/templates/repo/commit.html b/appview/pages/templates/repo/commit.html index 57db6615..8375788e 100644 --- a/appview/pages/templates/repo/commit.html +++ b/appview/pages/templates/repo/commit.html @@ -2,7 +2,7 @@ {{ define "content" }} -{{ $repo := .RepoInfo.Name }} +{{ $repo := .RepoInfo.FullName }} {{ $commit := .Diff.Commit }} {{ $stat := .Diff.Stat }} {{ $diff := .Diff.Diff }} @@ -17,7 +17,7 @@
commit

- {{ $commit.This }} + {{ slice $commit.This 0 8 }}

@@ -26,7 +26,7 @@
parent

- {{ $commit.Parent }} + {{ slice $commit.Parent 0 8 }}

diff --git a/appview/pages/templates/repo/index.html b/appview/pages/templates/repo/index.html index 4dcdebeb..d5cdfa79 100644 --- a/appview/pages/templates/repo/index.html +++ b/appview/pages/templates/repo/index.html @@ -9,7 +9,7 @@
{{ range .Commits }}
-
{{ slice .Hash.String 0 8 }}
+
{{ slice .Hash.String 0 8 }}
{{ .Message }}
diff --git a/appview/pages/templates/repo/log.html b/appview/pages/templates/repo/log.html index e1d46ef1..1b5376b9 100644 --- a/appview/pages/templates/repo/log.html +++ b/appview/pages/templates/repo/log.html @@ -9,7 +9,7 @@ log | {{ .RepoInfo.OwnerWithAt }} / {{ .RepoInfo.Name }}
{{ range .Commits }}
-
{{ slice .Hash.String 0 8 }}
+
{{ slice .Hash.String 0 8 }}
{{ .Message }}