mirror of
https://github.com/go-gitea/gitea.git
synced 2026-05-23 05:42:33 +09:00
- Action view sidebar: rename `job-brief-item` to `action-view-sidebar-item`, fix trash icon overflow on long artifact names, align artifact and workflow hover styles with the jobs list - Branches: expand new PR button cell to three wide so the button is not clipped on narrow viewports - Dashboard feed: add `tw-max-w-full` so long issue titles truncate - Reactions: tighten label padding <img width="261" height="65" alt="Screenshot 2026-05-13 at 16 18 33" src="https://github.com/user-attachments/assets/ecfe8f37-4a65-4839-b8c0-defccc85482c" /> <img width="154" height="126" alt="Screenshot 2026-05-13 at 16 19 25" src="https://github.com/user-attachments/assets/41302134-d1b7-401a-be2d-79173adb6d17" /> <img width="405" height="378" alt="Screenshot 2026-05-13 at 16 47 18" src="https://github.com/user-attachments/assets/e2c5cdd4-f11d-498c-b17e-c74c80c0ddf7" /> <img width="206" height="149" alt="Screenshot 2026-05-13 at 16 55 53" src="https://github.com/user-attachments/assets/7787125d-04b1-4500-b9b8-2637845509d6" /> <img width="858" height="135" alt="Screenshot 2026-05-13 at 16 58 41" src="https://github.com/user-attachments/assets/cb5bdf56-3891-469d-aa77-ea38855958c1" /> <img width="434" height="128" alt="Screenshot 2026-05-13 at 17 00 43" src="https://github.com/user-attachments/assets/60f2c34d-b345-4813-8f6d-a95bf51021b4" /> --- This PR was written with the help of Claude Opus 4.7 --------- Signed-off-by: silverwind <me@silverwind.io> Co-authored-by: Claude (Opus 4.7) <noreply@anthropic.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
131 lines
8.2 KiB
Handlebars
131 lines
8.2 KiB
Handlebars
<div id="activity-feed" class="flex-divided-list items-with-main" data-ref-issue-container>
|
|
{{range .Feeds}}
|
|
<div class="item">
|
|
<div class="item-leading">
|
|
{{ctx.AvatarUtils.AvatarByAction .}}
|
|
</div>
|
|
<div class="item-main tw-gap-2">
|
|
<div>
|
|
{{if gt .ActUser.ID 0}}
|
|
<a href="{{AppSubUrl}}/{{(.GetActUserName ctx) | PathEscape}}" title="{{.GetActDisplayNameTitle ctx}}">{{.GetActDisplayName ctx}}</a>
|
|
{{else}}
|
|
{{.ShortActUserName ctx}}
|
|
{{end}}
|
|
{{if .GetOpType.InActions "create_repo"}}
|
|
{{ctx.Locale.Tr "action.create_repo" (.GetRepoLink ctx) (.ShortRepoPath ctx)}}
|
|
{{else if .GetOpType.InActions "rename_repo"}}
|
|
{{ctx.Locale.Tr "action.rename_repo" .GetContent (.GetRepoLink ctx) (.ShortRepoPath ctx)}}
|
|
{{else if .GetOpType.InActions "commit_repo"}}
|
|
{{if .Content}}
|
|
{{ctx.Locale.Tr "action.commit_repo" (.GetRepoLink ctx) (.GetRefLink ctx) .GetBranch (.ShortRepoPath ctx)}}
|
|
{{else}}
|
|
{{ctx.Locale.Tr "action.create_branch" (.GetRepoLink ctx) (.GetRefLink ctx) .GetBranch (.ShortRepoPath ctx)}}
|
|
{{end}}
|
|
{{else if .GetOpType.InActions "create_issue"}}
|
|
{{$index := index .GetIssueInfos 0}}
|
|
{{ctx.Locale.Tr "action.create_issue" (printf "%s/issues/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx)}}
|
|
{{else if .GetOpType.InActions "create_pull_request"}}
|
|
{{$index := index .GetIssueInfos 0}}
|
|
{{ctx.Locale.Tr "action.create_pull_request" (printf "%s/pulls/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx)}}
|
|
{{else if .GetOpType.InActions "transfer_repo"}}
|
|
{{ctx.Locale.Tr "action.transfer_repo" .GetContent (.GetRepoLink ctx) (.ShortRepoPath ctx)}}
|
|
{{else if .GetOpType.InActions "push_tag"}}
|
|
{{ctx.Locale.Tr "action.push_tag" (.GetRepoLink ctx) (.GetRefLink ctx) .GetTag (.ShortRepoPath ctx)}}
|
|
{{else if .GetOpType.InActions "comment_issue"}}
|
|
{{$index := index .GetIssueInfos 0}}
|
|
{{ctx.Locale.Tr "action.comment_issue" (printf "%s/issues/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx)}}
|
|
{{else if .GetOpType.InActions "merge_pull_request"}}
|
|
{{$index := index .GetIssueInfos 0}}
|
|
{{ctx.Locale.Tr "action.merge_pull_request" (printf "%s/pulls/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx)}}
|
|
{{else if .GetOpType.InActions "close_issue"}}
|
|
{{$index := index .GetIssueInfos 0}}
|
|
{{ctx.Locale.Tr "action.close_issue" (printf "%s/issues/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx)}}
|
|
{{else if .GetOpType.InActions "reopen_issue"}}
|
|
{{$index := index .GetIssueInfos 0}}
|
|
{{ctx.Locale.Tr "action.reopen_issue" (printf "%s/issues/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx)}}
|
|
{{else if .GetOpType.InActions "close_pull_request"}}
|
|
{{$index := index .GetIssueInfos 0}}
|
|
{{ctx.Locale.Tr "action.close_pull_request" (printf "%s/pulls/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx)}}
|
|
{{else if .GetOpType.InActions "reopen_pull_request"}}
|
|
{{$index := index .GetIssueInfos 0}}
|
|
{{ctx.Locale.Tr "action.reopen_pull_request" (printf "%s/pulls/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx)}}
|
|
{{else if .GetOpType.InActions "delete_tag"}}
|
|
{{$index := index .GetIssueInfos 0}}
|
|
{{ctx.Locale.Tr "action.delete_tag" (.GetRepoLink ctx) .GetTag (.ShortRepoPath ctx)}}
|
|
{{else if .GetOpType.InActions "delete_branch"}}
|
|
{{$index := index .GetIssueInfos 0}}
|
|
{{ctx.Locale.Tr "action.delete_branch" (.GetRepoLink ctx) .GetBranch (.ShortRepoPath ctx)}}
|
|
{{else if .GetOpType.InActions "mirror_sync_push"}}
|
|
{{ctx.Locale.Tr "action.mirror_sync_push" (.GetRepoLink ctx) (.GetRefLink ctx) .RefName (.ShortRepoPath ctx)}}
|
|
{{else if .GetOpType.InActions "mirror_sync_create"}}
|
|
{{ctx.Locale.Tr "action.mirror_sync_create" (.GetRepoLink ctx) (.GetRefLink ctx) .RefName (.ShortRepoPath ctx)}}
|
|
{{else if .GetOpType.InActions "mirror_sync_delete"}}
|
|
{{ctx.Locale.Tr "action.mirror_sync_delete" (.GetRepoLink ctx) .RefName (.ShortRepoPath ctx)}}
|
|
{{else if .GetOpType.InActions "approve_pull_request"}}
|
|
{{$index := index .GetIssueInfos 0}}
|
|
{{ctx.Locale.Tr "action.approve_pull_request" (printf "%s/pulls/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx)}}
|
|
{{else if .GetOpType.InActions "reject_pull_request"}}
|
|
{{$index := index .GetIssueInfos 0}}
|
|
{{ctx.Locale.Tr "action.reject_pull_request" (printf "%s/pulls/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx)}}
|
|
{{else if .GetOpType.InActions "comment_pull"}}
|
|
{{$index := index .GetIssueInfos 0}}
|
|
{{ctx.Locale.Tr "action.comment_pull" (printf "%s/pulls/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx)}}
|
|
{{else if .GetOpType.InActions "publish_release"}}
|
|
{{$linkText := .Content | ctx.RenderUtils.RenderEmoji}}
|
|
{{ctx.Locale.Tr "action.publish_release" (.GetRepoLink ctx) (printf "%s/releases/tag/%s" (.GetRepoLink ctx) .GetTag) (.ShortRepoPath ctx) $linkText}}
|
|
{{else if .GetOpType.InActions "pull_review_dismissed"}}
|
|
{{$index := index .GetIssueInfos 0}}
|
|
{{$reviewer := index .GetIssueInfos 1}}
|
|
{{ctx.Locale.Tr "action.review_dismissed" (printf "%s/pulls/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx) $reviewer}}
|
|
{{else if .GetOpType.InActions "auto_merge_pull_request"}}
|
|
{{$index := index .GetIssueInfos 0}}
|
|
{{ctx.Locale.Tr "action.auto_merge_pull_request" (printf "%s/pulls/%s" (.GetRepoLink ctx) $index) $index (.ShortRepoPath ctx)}}
|
|
{{end}}
|
|
{{DateUtils.TimeSince .GetCreate}}
|
|
</div>
|
|
{{if .GetOpType.InActions "commit_repo" "mirror_sync_push"}}
|
|
{{$push := ActionContent2Commits .}}
|
|
{{$repoLink := (.GetRepoLink ctx)}}
|
|
{{$repo := .Repo}}
|
|
<div class="tw-flex tw-flex-col tw-gap-1">
|
|
{{range $pushCommit := $push.Commits}}
|
|
{{$commitLink := printf "%s/commit/%s" $repoLink .Sha1}}
|
|
<div class="flex-text-block">
|
|
<img loading="lazy" alt class="ui avatar" src="{{$push.AvatarLink ctx .AuthorEmail}}" title="{{.AuthorName}}" width="16" height="16">
|
|
<a class="ui sha label" href="{{$commitLink}}">{{ShortSha .Sha1}}</a>
|
|
<span class="tw-inline-block tw-truncate">
|
|
{{ctx.RenderUtils.RenderCommitMessage $pushCommit.Message $repo}}
|
|
</span>
|
|
</div>
|
|
{{end}}
|
|
</div>
|
|
{{if and (gt $push.Len 1) $push.CompareURL}}
|
|
<a href="{{AppSubUrl}}/{{$push.CompareURL}}">{{ctx.Locale.Tr "action.compare_commits" $push.Len}} »</a>
|
|
{{end}}
|
|
{{else if .GetOpType.InActions "create_issue"}}
|
|
<span class="tw-inline-block tw-truncate issue title">{{index .GetIssueInfos 1 | ctx.RenderUtils.RenderIssueSimpleTitle}}</span>
|
|
{{else if .GetOpType.InActions "create_pull_request"}}
|
|
<span class="tw-inline-block tw-truncate issue title">{{index .GetIssueInfos 1 | ctx.RenderUtils.RenderIssueSimpleTitle}}</span>
|
|
{{else if .GetOpType.InActions "comment_issue" "approve_pull_request" "reject_pull_request" "comment_pull"}}
|
|
<a href="{{.GetCommentLink ctx}}" class="tw-inline-block tw-truncate tw-max-w-full tw-self-start issue title">{{(.GetIssueTitle ctx) | ctx.RenderUtils.RenderIssueSimpleTitle}}</a>
|
|
{{$comment := index .GetIssueInfos 1}}
|
|
{{if $comment}}
|
|
<div class="render-content markup truncated-markup">{{ctx.RenderUtils.MarkdownToHtml $comment}}</div>
|
|
{{end}}
|
|
{{else if .GetOpType.InActions "merge_pull_request"}}
|
|
<div class="item-body tw-text-text">{{index .GetIssueInfos 1 | ctx.RenderUtils.RenderIssueSimpleTitle}}</div>
|
|
{{else if .GetOpType.InActions "close_issue" "reopen_issue" "close_pull_request" "reopen_pull_request"}}
|
|
<span class="tw-inline-block tw-truncate issue title">{{(.GetIssueTitle ctx) | ctx.RenderUtils.RenderIssueSimpleTitle}}</span>
|
|
{{else if .GetOpType.InActions "pull_review_dismissed"}}
|
|
<div class="item-body tw-text-text">{{ctx.Locale.Tr "action.review_dismissed_reason"}}</div>
|
|
<div class="item-body tw-text-text">{{index .GetIssueInfos 2 | ctx.RenderUtils.RenderEmoji}}</div>
|
|
{{end}}
|
|
</div>
|
|
<div class="item-trailing">
|
|
{{svg (printf "octicon-%s" (ActionIcon .GetOpType)) 32 "tw-text-text-light tw-mr-1"}}
|
|
</div>
|
|
</div>
|
|
{{end}}
|
|
{{template "base/paginate" .}}
|
|
</div>
|