aboutsummaryrefslogtreecommitdiffstats
path: root/templates/repo/issue/view_content/conversation.tmpl
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2024-04-14 12:44:11 +0200
committerGitHub <noreply@github.com>2024-04-14 18:44:11 +0800
commit4b1063f3dba6ef7a54c15f6e795409b504a62391 (patch)
tree9f023c7dbc337088a9040cfe655af733fb35fdfa /templates/repo/issue/view_content/conversation.tmpl
parent6999a88fd9bef6baa0a8cc5f63e419079611fc9b (diff)
downloadgitea-4b1063f3dba6ef7a54c15f6e795409b504a62391.tar.gz
gitea-4b1063f3dba6ef7a54c15f6e795409b504a62391.zip
Rewrite and restyle reaction selector and enable no-sizzle eslint rule (#30453)
Enable `no-sizzle` lint rule, there was only one use in `initCompReactionSelector` and: - Remove all jQuery except the necessary fomantic dropdown init - Remove the recursion, instead bind event listeners to common parent container nodes --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Giteabot <teabot@gitea.io>
Diffstat (limited to 'templates/repo/issue/view_content/conversation.tmpl')
-rw-r--r--templates/repo/issue/view_content/conversation.tmpl8
1 files changed, 4 insertions, 4 deletions
diff --git a/templates/repo/issue/view_content/conversation.tmpl b/templates/repo/issue/view_content/conversation.tmpl
index 79e7cb498b..ac32a2db5d 100644
--- a/templates/repo/issue/view_content/conversation.tmpl
+++ b/templates/repo/issue/view_content/conversation.tmpl
@@ -55,8 +55,8 @@
<div class="ui comments tw-mb-0">
{{range .comments}}
{{$createdSubStr:= TimeSinceUnix .CreatedUnix ctx.Locale}}
- <div class="comment code-comment tw-pb-4" id="{{.HashTag}}">
- <div class="content">
+ <div class="comment code-comment" id="{{.HashTag}}">
+ <div class="content comment-container">
<div class="header comment-header">
<div class="comment-header-left tw-flex tw-items-center">
{{if not .OriginalAuthor}}
@@ -82,7 +82,7 @@
<div class="comment-header-right actions tw-flex tw-items-center">
{{template "repo/issue/view_content/show_role" dict "ShowRole" .ShowRole}}
{{if not $.Repository.IsArchived}}
- {{template "repo/issue/view_content/add_reaction" dict "ctxData" $ "ActionURL" (printf "%s/comments/%d/reactions" $.RepoLink .ID)}}
+ {{template "repo/issue/view_content/add_reaction" dict "ActionURL" (printf "%s/comments/%d/reactions" $.RepoLink .ID)}}
{{template "repo/issue/view_content/context_menu" dict "ctxData" $ "item" . "delete" true "issue" true "diff" true "IsCommentPoster" (and $.IsSigned (eq $.SignedUserID .PosterID))}}
{{end}}
</div>
@@ -103,7 +103,7 @@
</div>
{{$reactions := .Reactions.GroupByType}}
{{if $reactions}}
- {{template "repo/issue/view_content/reactions" dict "ctxData" $ "ActionURL" (printf "%s/comments/%d/reactions" $.RepoLink .ID) "Reactions" $reactions}}
+ {{template "repo/issue/view_content/reactions" dict "ActionURL" (printf "%s/comments/%d/reactions" $.RepoLink .ID) "Reactions" $reactions}}
{{end}}
</div>
</div>