1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-07-22 16:04:18 -04:00

Fix comment review avatar alignment (#29935)

Fix #29934
This commit is contained in:
wxiaoguang 2024-03-20 22:05:34 +08:00 committed by GitHub
parent 8cad44f410
commit bc55a80693
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -374,10 +374,9 @@
{{$reviewType := -1}} {{$reviewType := -1}}
{{if .Review}}{{$reviewType = .Review.Type}}{{end}} {{if .Review}}{{$reviewType = .Review.Type}}{{end}}
{{if not .OriginalAuthor}} {{if not .OriginalAuthor}}
{{/* Some timeline avatars need a offset to correctly align with their speech {{/* Some timeline avatars need a offset to correctly align with their speech bubble.
bubble. The condition depends on review type and for positive reviews whether The condition depends on whether the comment has contents/attachments or reviews */}}
there is a comment element or not */}} <a class="timeline-avatar{{if or .Content .Attachments (and .Review .Review.CodeComments)}} timeline-avatar-offset{{end}}"{{if gt .Poster.ID 0}} href="{{.Poster.HomeLink}}"{{end}}>
<a class="timeline-avatar{{if or (and (eq $reviewType 1) (or .Content .Attachments)) (and (eq $reviewType 2) (or .Content .Attachments)) (eq $reviewType 3)}} timeline-avatar-offset{{end}}"{{if gt .Poster.ID 0}} href="{{.Poster.HomeLink}}"{{end}}>
{{ctx.AvatarUtils.Avatar .Poster 40}} {{ctx.AvatarUtils.Avatar .Poster 40}}
</a> </a>
{{end}} {{end}}