From b9e8fa5beb300eac7bd0623c9d7201a9e3a92a4a Mon Sep 17 00:00:00 2001 From: Gusted Date: Fri, 29 Apr 2022 02:05:21 +0200 Subject: [PATCH] More width on viewing comments --- templates/repo/issue/view_content.tmpl | 7 +++-- web_src/less/_repository.less | 41 ++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 2 deletions(-) diff --git a/templates/repo/issue/view_content.tmpl b/templates/repo/issue/view_content.tmpl index 46a2a3969b..b5f838e9d0 100644 --- a/templates/repo/issue/view_content.tmpl +++ b/templates/repo/issue/view_content.tmpl @@ -41,6 +41,9 @@ {{if .Repository.OriginalURL}} ({{$.i18n.Tr "repo.migrated_from" (.Repository.OriginalURL|Escape) (.Repository.GetOriginalURLHostname|Escape) | Safe }}){{end}} {{else}} + + {{avatar .Issue.Poster}} + {{.Issue.Poster.GetDisplayName}} {{.i18n.Tr "repo.issues.commented_at" (.Issue.HashTag|Escape) $createdStr | Safe}} @@ -50,12 +53,12 @@
{{if gt .Issue.ShowRole 0}} {{if (.Issue.ShowRole.HasRole "Writer")}} -
+
{{$.i18n.Tr "repo.issues.collaborator"}}
{{end}} {{if (.Issue.ShowRole.HasRole "Owner")}} -
+
{{$.i18n.Tr "repo.issues.owner"}}
{{end}} diff --git a/web_src/less/_repository.less b/web_src/less/_repository.less index cb1539866a..065f890326 100644 --- a/web_src/less/_repository.less +++ b/web_src/less/_repository.less @@ -861,6 +861,10 @@ } } + .inline-timeline-avatar { + display: none; + } + .avatar.image, .avatar.image img { width: 20px; @@ -3284,4 +3288,41 @@ td.blob-excerpt { width: 50%; } } + + .repository.view.issue .comment-list { + .timeline, + .timeline-item { + margin-left: 0; + } + + .timeline { + &::before { + left: 14px; + } + + .inline-timeline-avatar { + display: flex; + margin-bottom: auto; + + img.avatar.image { + height: 24px; + width: 24px; + } + } + + .comment-header { + &::before, + &::after { + content: unset; + } + + padding-left: 4px; + } + + .timeline-avatar, + .comment-header-right .role-label { + display: none; + } + } + } }