1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-26 13:29:12 -05:00

Fix some UI regressions for commit list (#30920) (#30937)

Backport #30920 by wxiaoguang

Close #30919

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
(cherry picked from commit 94c5a30c8bd2ae78ffd7bd3b39bee019c531e1e7)
This commit is contained in:
Giteabot 2024-05-10 22:36:06 +08:00 committed by Earl Warren
parent 6917b25ad3
commit 10a9b6b806
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
3 changed files with 11 additions and 10 deletions

View file

@ -13,13 +13,12 @@
{{$commitLink:= printf "%s/commit/%s" $.comment.Issue.PullRequest.BaseRepo.Link (PathEscape .ID.String)}} {{$commitLink:= printf "%s/commit/%s" $.comment.Issue.PullRequest.BaseRepo.Link (PathEscape .ID.String)}}
<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> <span class="tw-flex-1 tw-font-mono gt-ellipsis" title="{{.Summary}}">
{{- RenderCommitMessageLinkSubject $.root.Context .Message $commitLink ($.comment.Issue.PullRequest.BaseRepo.ComposeMetas ctx) -}}
</span>
{{if IsMultilineCommitMessage .Message}} {{if IsMultilineCommitMessage .Message}}
<button class="ui button js-toggle-commit-body ellipsis-button" aria-expanded="false">...</button> <button class="ui button ellipsis-button show-panel toggle" data-panel="[data-singular-commit-body-for='{{$tag}}']">...</button>
{{end}}
{{if IsMultilineCommitMessage .Message}}
<pre class="commit-body tw-hidden">{{RenderCommitBody $.root.Context .Message ($.comment.Issue.PullRequest.BaseRepo.ComposeMetas ctx)}}</pre>
{{end}} {{end}}
<span class="shabox tw-flex tw-items-center"> <span class="shabox tw-flex tw-items-center">
@ -47,5 +46,10 @@
</a> </a>
</span> </span>
</div> </div>
{{if IsMultilineCommitMessage .Message}}
<pre class="commit-body tw-ml-[33px] tw-hidden" data-singular-commit-body-for="{{$tag}}">
{{- RenderCommitBody $.root.Context .Message ($.comment.Issue.PullRequest.BaseRepo.ComposeMetas ctx) -}}
</pre>
{{end}}
{{end}} {{end}}
</div> </div>

View file

@ -976,6 +976,7 @@ input:-webkit-autofill:active,
font-weight: var(--font-weight-normal); font-weight: var(--font-weight-normal);
margin: 0 6px; margin: 0 6px;
padding: 5px 10px; padding: 5px 10px;
flex-shrink: 0;
} }
.ui .sha.label .shortsha { .ui .sha.label .shortsha {

View file

@ -2588,14 +2588,10 @@ tbody.commit-list {
.commit-body { .commit-body {
margin: 0.25em 0; margin: 0.25em 0;
white-space: pre-wrap; white-space: pre-wrap;
overflow-wrap: anywhere;
line-height: initial; line-height: initial;
} }
/* PR-comment */
.repository .timeline-item .commit-body {
margin-left: 45px;
}
.git-notes.top { .git-notes.top {
text-align: left; text-align: left;
} }