Skip to content

Commit

Permalink
add missing inline avatars, fix avatar offset, icon size tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
silverwind committed May 4, 2023
1 parent 7c7aa59 commit 5438a5b
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 15 deletions.
14 changes: 12 additions & 2 deletions templates/repo/issue/view_content/comments.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@
<div class="timeline-item event">
{{if .OriginalAuthor}}
{{else}}
<a class="timeline-avatar"{{if gt .Poster.ID 0}} href="{{.Poster.HomeLink}}"{{end}}>
<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}}>
{{avatar $.Context .Poster}}
</a>
{{end}}
Expand Down Expand Up @@ -409,6 +409,11 @@
<div class="content comment-container">
<div class="ui top attached header comment-header gt-df gt-ac gt-sb">
<div class="comment-header-left gt-df gt-ac">
{{if gt .Poster.ID 0}}
<a class="inline-timeline-avatar" href="{{.Poster.HomeLink}}">
{{avatar $.Context .Poster}}
</a>
{{end}}
<span class="text grey muted-links">
{{if .OriginalAuthor}}
<span class="text black gt-bold">
Expand Down Expand Up @@ -779,7 +784,12 @@
{{if .Content}}
<div class="timeline-item comment">
<div class="content">
<div class="ui top attached header arrow-top">
<div class="ui top attached header comment-header-left gt-df gt-ac arrow-top">
{{if gt .Poster.ID 0}}
<a class="inline-timeline-avatar" href="{{.Poster.HomeLink}}">
{{avatar $.Context .Poster}}
</a>
{{end}}
<span class="text grey muted-links">
{{$.locale.Tr "action.review_dismissed_reason"}}
</span>
Expand Down
14 changes: 6 additions & 8 deletions templates/repo/issue/view_content/pull.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
{{svg (printf "octicon-%s" .Review.Type.Icon) 18}}
</span>
{{if .User}}
<a href="{{.User.HomeLink}}">
<a href="{{.User.HomeLink}}" class="gt-mr-2">
{{avatar $.Context .User}}
</a>
{{end}}
Expand Down Expand Up @@ -43,7 +43,7 @@
{{end}}
{{if (and $.Permission.IsAdmin (or (eq .Review.Type 1) (eq .Review.Type 3)) (not $.Issue.IsClosed))}}
<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"}}">
{{svg "octicon-x" 16}}
{{svg "octicon-x" 20}}
</a>
<div class="ui small modal" id="dismiss-review-modal">
<div class="header">
Expand All @@ -68,11 +68,9 @@
</div>
</div>
{{end}}
<span class="gt-df gt-ac">
{{if .CanChange}}
<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>
{{end}}
</span>
{{if .CanChange}}
<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>
{{end}}
</div>
</div>
{{end}}
Expand All @@ -85,7 +83,7 @@
{{svg (printf "octicon-%s" .Type.Icon) 18}}
</span>
<a href="{{$.Repository.OriginalURL}}" data-tooltip-content="{{$.locale.Tr "repo.migrated_from_fake" ($.Repository.GetOriginalURLHostname|Escape) | Safe}}">
<span class="text black ">
<span class="text black">
{{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}}
{{.OriginalAuthor}}
</span>
Expand Down
5 changes: 1 addition & 4 deletions templates/repo/issue/view_content/sidebar.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,7 @@
{{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}}
Expand Down
4 changes: 3 additions & 1 deletion web_src/css/repository.css
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,7 @@
padding-bottom: 8px;
}

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

Expand Down Expand Up @@ -3257,6 +3257,8 @@ td.blob-excerpt {
.repository.view.issue .comment-list .timeline .inline-timeline-avatar {
display: flex;
margin-bottom: auto;
margin-left: 6px;
margin-right: 2px;
}
.repository.view.issue .comment-list .timeline .inline-timeline-avatar img.avatar {
height: 24px;
Expand Down

0 comments on commit 5438a5b

Please sign in to comment.