From 5d64d6932914018f8d35660d6dbb1d1a53c83f5c Mon Sep 17 00:00:00 2001 From: iamyaash Date: Mon, 5 May 2025 15:23:33 +0530 Subject: [PATCH] feat: commit table layout ui changes each commit is grouped by date shabox needs refinement, must be applied to both signed & unsigned commits username redirection must be added, it seems to be not working after the change flex should be implement the right way, (learn flex pls) fix: shadow box size & look redesign major alignment changes made, fixed overflowing, needs refinement in hashbox chore: position and style changes; might be changed later --- templates/repo/commits_list.tmpl | 79 ++++++++++++++++++++++---------- 1 file changed, 56 insertions(+), 23 deletions(-) diff --git a/templates/repo/commits_list.tmpl b/templates/repo/commits_list.tmpl index 2c0a93f2ba..250e60f888 100644 --- a/templates/repo/commits_list.tmpl +++ b/templates/repo/commits_list.tmpl @@ -76,27 +76,60 @@ {{else}} {{DateUtils.TimeSince .Author.When}} {{end}} - - - {{if not $.PageIsWiki}} - {{if $.FileName}} - - {{svg "octicon-file-diff"}} - - {{end}} - - {{svg "octicon-file-code"}} - - {{end}} - - + {{end}} + {{$commitShaLink := ""}} + {{if $.PageIsWiki}} + {{$commitShaLink = (printf "%s/wiki/commit/%s" $commitRepoLink (PathEscape .ID.String))}} + {{else if $.PageIsPullCommits}} + {{$commitShaLink = (printf "%s/pulls/%d/commits/%s" $commitRepoLink $.Issue.Index (PathEscape .ID.String))}} + {{else if $.Reponame}} + {{$commitShaLink = (printf "%s/commit/%s" $commitRepoLink (PathEscape .ID.String))}} + {{end}} + + {{ShortSha .ID.String}} + {{if .Signature}}{{template "repo/shabox_badge" dict "root" $ "verification" .Verification}}{{end}} + + +
+ {{$userName := .Author.Name}} + + {{if .User}} + {{if and .User.FullName DefaultShowFullName}} + {{$userName = .User.FullName}} + {{end}} + {{ctx.AvatarUtils.Avatar .User 28 "tw-mr-2"}}{{$userName}} + {{else}} + {{ctx.AvatarUtils.AvatarByEmail .Author.Email .Author.Name 28 "tw-mr-2"}} + {{$userName}} + {{end}} +
+ + +
+ {{$commitLink:= printf "%s/commit/%s" $commitRepoLink (PathEscape .ID.String)}} +
{{RenderCommitMessageLinkSubject $.Context .Message $commitLink ($.Repository.ComposeMetas ctx)}}
+ {{if IsMultilineCommitMessage .Message}} + +
{{RenderCommitBody $.Context .Message ($.Repository.ComposeMetas ctx)}}
{{end}} - - -
+ {{template "repo/commit_statuses" dict "Status" .Status "Statuses" .Statuses}} + + +
+ {{if .Committer}}{{DateUtils.TimeSince .Committer.When}}{{else}}{{DateUtils.TimeSince .Author.When}}{{end}} +
+ + +
+ + {{if not $.PageIsWiki}} + {{if $.FileName}} + {{svg "octicon-file-diff"}} + {{end}} + {{svg "octicon-file-code"}} + {{end}} +
+ + {{end}} + +