Skip to content

Commit 6183ed4

Browse files
committed
Fix expand commit message
1 parent 3807b2f commit 6183ed4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

templates/repo/commits_list.tmpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@
2828
{{template "repo/commit_sign_badge" dict "Commit" . "CommitBaseLink" $commitBaseLink "CommitSignVerification" .Verification}}
2929
</div>
3030
{{template "repo/commit_statuses" dict "Status" .Status "Statuses" .Statuses}}
31-
{{if IsMultilineCommitMessage .Message}}
32-
<pre class="commit-body tw-hidden">{{ctx.RenderUtils.RenderCommitBody .Message $.Repository}}</pre>
33-
{{end}}
3431
{{if $.CommitsTagsMap}}
3532
{{range (index $.CommitsTagsMap .ID.String)}}
3633
{{- template "repo/tag/name" dict "RepoLink" $.Repository.Link "TagName" .TagName "IsRelease" (not .IsTag) -}}
3734
{{end}}
3835
{{end}}
3936
</div>
37+
{{if IsMultilineCommitMessage .Message}}
38+
<pre class="commit-body tw-hidden">{{ctx.RenderUtils.RenderCommitBody .Message $.Repository}}</pre>
39+
{{end}}
4040
<div class="flex-item-body">
4141
{{$userName := .Author.Name}}
4242
{{if .User}}

web_src/js/features/repo-commit.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export function initRepoEllipsisButton() {
66
registerGlobalEventFunc('click', 'onRepoEllipsisButtonClick', async (el: HTMLInputElement, e: Event) => {
77
e.preventDefault();
88
const expanded = el.getAttribute('aria-expanded') === 'true';
9-
toggleElem(el.parentElement.querySelector('.commit-body'));
9+
toggleElem(el.parentElement.parentElement.querySelector('.commit-body'));
1010
el.setAttribute('aria-expanded', String(!expanded));
1111
});
1212
}

0 commit comments

Comments
 (0)