feeds private view

This commit is contained in:
Tim-Niclas Oelschläger 2024-04-14 19:06:16 +02:00
parent 59b087190b
commit 4a433ef478
No known key found for this signature in database
1 changed files with 129 additions and 106 deletions

View File

@ -5,6 +5,24 @@
{{ctx.AvatarUtils.AvatarByAction .}}
</div>
<div class="flex-item-main tw-gap-2">
{{if .IsPrivateView}}
<div>
{{if gt .ActUser.ID 0}}
<a href="{{AppSubUrl}}/{{(.GetActUserName ctx) | PathEscape}}" title="{{.GetActDisplayNameTitle ctx}}">{{.GetActDisplayName ctx}}</a>
{{else}}
{{.ShortActUserName ctx}}
{{end}}
{{$pushLength := 1}}
{{if .GetOpType.InActions "commit_repo" "mirror_sync_push"}}
{{$commitLength := (ActionContent2Commits .).Len}}
{{if gt $commitLength $pushLength}}
{{$pushLength = $commitLength}}
{{end}}
{{end}}
{{ctx.Locale.TrN $pushLength "action.performed_1" "action.performed_n" $pushLength}}
{{TimeSince .GetCreate ctx.Locale}}
</div>
{{else}}
<div>
{{if gt .ActUser.ID 0}}
<a href="{{AppSubUrl}}/{{(.GetActUserName ctx) | PathEscape}}" title="{{.GetActDisplayNameTitle ctx}}">{{.GetActDisplayName ctx}}</a>
@ -117,9 +135,14 @@
<div class="flex-item-body text black">{{ctx.Locale.Tr "action.review_dismissed_reason"}}</div>
<div class="flex-item-body text black">{{index .GetIssueInfos 2 | RenderEmoji $.Context}}</div>
{{end}}
{{end}}
</div>
<div class="flex-item-trailing">
{{if .IsPrivateView}}
{{svg "octicon-lock" 32 "text grey tw-mr-1"}}
{{else}}
{{svg (printf "octicon-%s" (ActionIcon .GetOpType)) 32 "text grey tw-mr-1"}}
{{end}}
</div>
</div>
{{end}}