Skip to content

Commit 5438a5b

Browse files
committed
add missing inline avatars, fix avatar offset, icon size tweaks
1 parent 7c7aa59 commit 5438a5b

File tree

4 files changed

+22
-15
lines changed

4 files changed

+22
-15
lines changed

templates/repo/issue/view_content/comments.tmpl

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@
372372
<div class="timeline-item event">
373373
{{if .OriginalAuthor}}
374374
{{else}}
375-
<a class="timeline-avatar"{{if gt .Poster.ID 0}} href="{{.Poster.HomeLink}}"{{end}}>
375+
<a class="timeline-avatar{{if or (eq .Review.Type 2) (eq .Review.Type 3)}} timeline-avatar-offset{{end}}"{{if gt .Poster.ID 0}} href="{{.Poster.HomeLink}}"{{end}}>
376376
{{avatar $.Context .Poster}}
377377
</a>
378378
{{end}}
@@ -409,6 +409,11 @@
409409
<div class="content comment-container">
410410
<div class="ui top attached header comment-header gt-df gt-ac gt-sb">
411411
<div class="comment-header-left gt-df gt-ac">
412+
{{if gt .Poster.ID 0}}
413+
<a class="inline-timeline-avatar" href="{{.Poster.HomeLink}}">
414+
{{avatar $.Context .Poster}}
415+
</a>
416+
{{end}}
412417
<span class="text grey muted-links">
413418
{{if .OriginalAuthor}}
414419
<span class="text black gt-bold">
@@ -779,7 +784,12 @@
779784
{{if .Content}}
780785
<div class="timeline-item comment">
781786
<div class="content">
782-
<div class="ui top attached header arrow-top">
787+
<div class="ui top attached header comment-header-left gt-df gt-ac arrow-top">
788+
{{if gt .Poster.ID 0}}
789+
<a class="inline-timeline-avatar" href="{{.Poster.HomeLink}}">
790+
{{avatar $.Context .Poster}}
791+
</a>
792+
{{end}}
783793
<span class="text grey muted-links">
784794
{{$.locale.Tr "action.review_dismissed_reason"}}
785795
</span>

templates/repo/issue/view_content/pull.tmpl

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
{{svg (printf "octicon-%s" .Review.Type.Icon) 18}}
1313
</span>
1414
{{if .User}}
15-
<a href="{{.User.HomeLink}}">
15+
<a href="{{.User.HomeLink}}" class="gt-mr-2">
1616
{{avatar $.Context .User}}
1717
</a>
1818
{{end}}
@@ -43,7 +43,7 @@
4343
{{end}}
4444
{{if (and $.Permission.IsAdmin (or (eq .Review.Type 1) (eq .Review.Type 3)) (not $.Issue.IsClosed))}}
4545
<a href="#" class="ui muted icon dismiss-review-btn" data-review-id="dismiss-review-{{.Review.ID}}" data-tooltip-content="{{$.locale.Tr "repo.issues.dismiss_review"}}">
46-
{{svg "octicon-x" 16}}
46+
{{svg "octicon-x" 20}}
4747
</a>
4848
<div class="ui small modal" id="dismiss-review-modal">
4949
<div class="header">
@@ -68,11 +68,9 @@
6868
</div>
6969
</div>
7070
{{end}}
71-
<span class="gt-df gt-ac">
72-
{{if .CanChange}}
73-
<a href="#" class="ui icon muted re-request-review{{if .Checked}} checked{{end}}" data-issue-id="{{$.Issue.ID}}" data-tooltip-content="{{if .Checked}}{{$.locale.Tr "repo.issues.remove_request_review"}}{{else}}{{$.locale.Tr "repo.issues.re_request_review"}}{{end}}" data-id="{{.ItemID}}" data-update-url="{{$.RepoLink}}/issues/request_review">{{if .Checked}}{{svg "octicon-trash"}}{{else}}{{svg "octicon-sync"}}{{end}}</a>
74-
{{end}}
75-
</span>
71+
{{if .CanChange}}
72+
<a href="#" class="ui icon muted re-request-review{{if .Checked}} checked{{end}}" data-issue-id="{{$.Issue.ID}}" data-tooltip-content="{{if .Checked}}{{$.locale.Tr "repo.issues.remove_request_review"}}{{else}}{{$.locale.Tr "repo.issues.re_request_review"}}{{end}}" data-id="{{.ItemID}}" data-update-url="{{$.RepoLink}}/issues/request_review">{{if .Checked}}{{svg "octicon-trash"}}{{else}}{{svg "octicon-sync"}}{{end}}</a>
73+
{{end}}
7674
</div>
7775
</div>
7876
{{end}}
@@ -85,7 +83,7 @@
8583
{{svg (printf "octicon-%s" .Type.Icon) 18}}
8684
</span>
8785
<a href="{{$.Repository.OriginalURL}}" data-tooltip-content="{{$.locale.Tr "repo.migrated_from_fake" ($.Repository.GetOriginalURLHostname|Escape) | Safe}}">
88-
<span class="text black ">
86+
<span class="text black">
8987
{{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}}
9088
{{.OriginalAuthor}}
9189
</span>

templates/repo/issue/view_content/sidebar.tmpl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,7 @@
5454
{{range .PullReviewers}}
5555
<div class="item gt-mb-2">
5656
{{if .User}}
57-
<a class="muted sidebar-item-link" href="{{.User.HomeLink}}">
58-
{{avatar $.Context .User 28 "gt-mr-3"}}
59-
{{.User.GetDisplayName}}
60-
</a>
57+
<a class="muted sidebar-item-link" href="{{.User.HomeLink}}">{{avatar $.Context .User 28 "gt-mr-3"}}{{.User.GetDisplayName}}</a>
6158
{{else if .Team}}
6259
<span class="text">{{svg "octicon-people" 16 "teamavatar"}}{{$.Issue.Repo.OwnerName}}/{{.Team.Name}}</span>
6360
{{end}}

web_src/css/repository.css

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,7 @@
774774
padding-bottom: 8px;
775775
}
776776

777-
.repository.view.issue .comment-list .timeline-item-group .timeline-avatar {
777+
.repository.view.issue .comment-list .timeline-item-group .timeline-avatar-offset {
778778
margin-top: 48px;
779779
}
780780

@@ -3257,6 +3257,8 @@ td.blob-excerpt {
32573257
.repository.view.issue .comment-list .timeline .inline-timeline-avatar {
32583258
display: flex;
32593259
margin-bottom: auto;
3260+
margin-left: 6px;
3261+
margin-right: 2px;
32603262
}
32613263
.repository.view.issue .comment-list .timeline .inline-timeline-avatar img.avatar {
32623264
height: 24px;

0 commit comments

Comments
 (0)