mirror of
https://github.com/go-gitea/gitea
synced 2025-08-08 10:38:21 +00:00
Review fixes and enhancements (#24526)
- Fix regression with icons wrapping from https://github.com/go-gitea/gitea/pull/24459 - Fix box misalignment on small screen - Fix avatar misalignment on review comment - Fix incorrect underline hover effect on review icons - Move status icon to left side in review box - Enhance review icon colors, add helper function for it - Add missing inline avatars in review comments - Tweak icon sizes because some octicons have inconsistent sizing ### Before <img width="655" alt="Screenshot 2023-05-04 at 20 50 28" src="https://user-images.githubusercontent.com/115237/236301230-92325507-6e03-47ac-bfb4-c9ddde310571.png"> <img width="260" alt="Screenshot 2023-05-04 at 20 50 42" src="https://user-images.githubusercontent.com/115237/236301236-0dfa50e7-b8fc-4179-ae68-d872bc90f1f3.png"> ### After <img width="498" alt="Screenshot 2023-05-04 at 20 55 08" src="https://user-images.githubusercontent.com/115237/236301810-23862c2c-c0a9-43a4-a3eb-ee611c14a7f4.png"> <img width="219" alt="Screenshot 2023-05-04 at 20 55 16" src="https://user-images.githubusercontent.com/115237/236301817-d0de02ea-6ab5-43e1-9183-6b3848b72995.png"> --------- Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
@@ -54,37 +54,27 @@
|
||||
{{range .PullReviewers}}
|
||||
<div class="item gt-mb-2">
|
||||
{{if .User}}
|
||||
<a class="muted sidebar-item-link" href="{{.User.HomeLink}}">
|
||||
{{avatar $.Context .User 28 "gt-mr-3"}}
|
||||
{{.User.GetDisplayName}}
|
||||
</a>
|
||||
<a class="muted sidebar-item-link" href="{{.User.HomeLink}}">{{avatar $.Context .User 28 "gt-mr-3"}}{{.User.GetDisplayName}}</a>
|
||||
{{else if .Team}}
|
||||
<span class="text">{{svg "octicon-people" 16 "teamavatar"}}{{$.Issue.Repo.OwnerName}}/{{.Team.Name}}</span>
|
||||
{{end}}
|
||||
<span class="ui right type-icon text {{if eq .Review.Type 1}}green
|
||||
{{- else if eq .Review.Type 2}}grey
|
||||
{{- else if eq .Review.Type 3}}red
|
||||
{{- else if eq .Review.Type 4}}yellow
|
||||
{{- else}}grey{{end}} right ">
|
||||
|
||||
<span class="ui right gt-df gt-ac gt-gap-3">
|
||||
{{if .CanChange}}
|
||||
<a href="#" class="ui icon re-request-review {{if .Checked}}checked{{end}}" data-tooltip-content="{{if .Checked}} {{$.locale.Tr "repo.issues.remove_request_review"}} {{else}} {{$.locale.Tr "repo.issues.re_request_review"}} {{end}}" data-issue-id="{{$.Issue.ID}}" data-id="{{.ItemID}}" data-update-url="{{$.RepoLink}}/issues/request_review">
|
||||
{{if .Checked}} {{svg "octicon-trash"}} {{else}} {{svg "octicon-sync"}} {{end}}
|
||||
</a>
|
||||
<a href="#" class="ui muted icon re-request-review{{if .Checked}} checked{{end}}" data-tooltip-content="{{if .Checked}}{{$.locale.Tr "repo.issues.remove_request_review"}}{{else}}{{$.locale.Tr "repo.issues.re_request_review"}}{{end}}" data-issue-id="{{$.Issue.ID}}" data-id="{{.ItemID}}" data-update-url="{{$.RepoLink}}/issues/request_review">{{if .Checked}}{{svg "octicon-trash"}}{{else}}{{svg "octicon-sync"}}{{end}}</a>
|
||||
{{end}}
|
||||
{{svg (printf "octicon-%s" .Review.Type.Icon)}}
|
||||
{{svg (printf "octicon-%s" .Review.Type.Icon) 16 (printf "text %s" (.Review.HTMLTypeColorName))}}
|
||||
</span>
|
||||
</div>
|
||||
{{end}}
|
||||
{{range .OriginalReviews}}
|
||||
<div class="item" style="margin-bottom: 10px;">
|
||||
<div class="item gt-mb-3">
|
||||
<a href="{{$.Repository.OriginalURL}}" data-tooltip-content="{{$.locale.Tr "repo.migrated_from_fake" ($.Repository.GetOriginalURLHostname|Escape) | Safe}}">
|
||||
<span class="text black">
|
||||
{{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}}
|
||||
{{.OriginalAuthor}}
|
||||
</span>
|
||||
</a>
|
||||
<span class="ui right type-icon text {{if eq .Type 1}}green
|
||||
<span class="ui right text {{if eq .Type 1}}green
|
||||
{{- else if eq .Type 2}}grey
|
||||
{{- else if eq .Type 3}}red
|
||||
{{- else if eq .Type 4}}yellow
|
||||
|
Reference in New Issue
Block a user