From f5f258b259de8d44259053a2f976bbe084f7a41e Mon Sep 17 00:00:00 2001 From: Anirudh Oppiliappan Date: Wed, 30 Apr 2025 20:11:19 +0300 Subject: [PATCH] appview: pages: show tags against commits --- appview/pages/pages.go | 1 + appview/pages/templates/repo/index.html | 11 +++-- appview/pages/templates/repo/log.html | 57 ++++++++++++++++++------- appview/state/repo.go | 26 +++++++++++ 4 files changed, 73 insertions(+), 22 deletions(-) diff --git a/appview/pages/pages.go b/appview/pages/pages.go index 4ac662c..2bf3cee 100644 --- a/appview/pages/pages.go +++ b/appview/pages/pages.go @@ -499,6 +499,7 @@ func (p *Pages) RepoIndexPage(w io.Writer, params RepoIndexParams) error { type RepoLogParams struct { LoggedInUser *auth.User RepoInfo RepoInfo + TagMap map[string][]string types.RepoLogResponse Active string EmailToDidOrHandle map[string]string diff --git a/appview/pages/templates/repo/index.html b/appview/pages/templates/repo/index.html index 7c0e75b..68c94d8 100644 --- a/appview/pages/templates/repo/index.html +++ b/appview/pages/templates/repo/index.html @@ -151,8 +151,8 @@
-
- {{ i "git-commit-horizontal" "w-4 h-4" }} commits +
+ {{ i "logs" "w-4 h-4" }} commits
-
- - {{ i "git-branch" "w-3 h-3" }} branches +
+ {{ i "git-branch" "w-4 h-4" }} branches
-
+
{{ i "tags" "w-4 h-4" }} tags
- {{ index $messageParts 0 }} - {{ if gt (len $messageParts) 1 }} - +
+ {{ index $messageParts 0 }} + {{ if gt (len $messageParts) 1 }} + + {{ end }} + + + {{ if index $.TagMap $commit.Hash.String }} + {{ range $tag := index $.TagMap $commit.Hash.String }} + + {{ $tag }} + + {{ end }} + {{ end }} + +
+ + {{ if gt (len $messageParts) 1 }} {{ end }} -
{{ timeFmt $commit.Author.When }} - {{ end }} + {{ end }} @@ -66,17 +80,28 @@
- - {{ index $messageParts 0 }} - - {{ if gt (len $messageParts) 1 }} - - {{ end }} +
+ + {{ index $messageParts 0 }} + + {{ if gt (len $messageParts) 1 }} + + {{ end }} + + {{ if index $.TagMap $commit.Hash.String }} + {{ range $tag := index $.TagMap $commit.Hash.String }} + + {{ $tag }} + + {{ end }} + {{ end }} +
+ {{ if gt (len $messageParts) 1 }}