diff options
author | silverwind <me@silverwind.io> | 2024-04-17 10:58:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-17 08:58:08 +0000 |
commit | 311f5261cdb23b46d3f510e40fd4e2ac06e376c0 (patch) | |
tree | 1a6000ac870b04ed301497fe1b5d51b170a46a96 /templates/repo | |
parent | 3e2e76e2484c79715ab5d56f268ea3ad8e1c259b (diff) | |
download | gitea-311f5261cdb23b46d3f510e40fd4e2ac06e376c0.tar.gz gitea-311f5261cdb23b46d3f510e40fd4e2ac06e376c0.zip |
Fix and tweak pull request commit list (#30528)
Fixes https://github.com/go-gitea/gitea/issues/30493, regression from
https://github.com/go-gitea/gitea/pull/30374.
Also did the flexbox convertion as suggested by the existing comment.
<img width="850" alt="Screenshot 2024-04-16 at 22 28 48"
src="https://github.com/go-gitea/gitea/assets/115237/e8905944-620a-4211-b5c5-53ed3b3ee23e">
Co-authored-by: Giteabot <teabot@gitea.io>
Diffstat (limited to 'templates/repo')
-rw-r--r-- | templates/repo/commits_list_small.tmpl | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/templates/repo/commits_list_small.tmpl b/templates/repo/commits_list_small.tmpl index d96b314d01..6ca6dd5cdc 100644 --- a/templates/repo/commits_list_small.tmpl +++ b/templates/repo/commits_list_small.tmpl @@ -6,14 +6,23 @@ <div class="singular-commit" id="{{$tag}}"> <span class="badge badge-commit">{{svg "octicon-git-commit"}}</span> {{if .User}} - <a class="avatar" href="{{.User.HomeLink}}">{{ctx.AvatarUtils.Avatar .User}}</a> + <a class="avatar" href="{{.User.HomeLink}}">{{ctx.AvatarUtils.Avatar .User 20}}</a> {{else}} - {{ctx.AvatarUtils.AvatarByEmail .Author.Email .Author.Name}} + {{ctx.AvatarUtils.AvatarByEmail .Author.Email .Author.Name 20}} {{end}} {{$commitLink:= printf "%s/commit/%s" $.comment.Issue.PullRequest.BaseRepo.Link (PathEscape .ID.String)}} - <span class="shabox tw-flex tw-items-center tw-float-right"> + <span class="tw-flex-1 gt-ellipsis tw-font-mono{{if gt .ParentCount 1}} grey text{{end}}" title="{{.Summary}}">{{RenderCommitMessageLinkSubject $.root.Context .Message $commitLink ($.comment.Issue.PullRequest.BaseRepo.ComposeMetas ctx)}}</span> + + {{if IsMultilineCommitMessage .Message}} + <button class="ui button js-toggle-commit-body ellipsis-button" aria-expanded="false">...</button> + {{end}} + {{if IsMultilineCommitMessage .Message}} + <pre class="commit-body tw-hidden">{{RenderCommitBody $.root.Context .Message ($.comment.Issue.PullRequest.BaseRepo.ComposeMetas ctx)}}</pre> + {{end}} + + <span class="shabox tw-flex tw-items-center"> {{template "repo/commit_statuses" dict "Status" .Status "Statuses" .Statuses}} {{$class := "ui sha label"}} {{if .Signature}} @@ -37,14 +46,6 @@ {{end}} </a> </span> - - <span class="tw-font-mono commit-summary {{if gt .ParentCount 1}} grey text{{end}}" title="{{.Summary}}">{{RenderCommitMessageLinkSubject $.root.Context .Message $commitLink ($.comment.Issue.PullRequest.BaseRepo.ComposeMetas ctx)}}</span> - {{if IsMultilineCommitMessage .Message}} - <button class="ui button js-toggle-commit-body ellipsis-button" aria-expanded="false">...</button> - {{end}} - {{if IsMultilineCommitMessage .Message}} - <pre class="commit-body tw-hidden">{{RenderCommitBody $.root.Context .Message ($.comment.Issue.PullRequest.BaseRepo.ComposeMetas ctx)}}</pre> - {{end}} </div> {{end}} </div> |