2022-05-16 19:45:12 +03:00
|
|
|
<div class="ui attached table segment commit-table">
|
2023-07-04 20:45:45 +03:00
|
|
|
<table class="ui very basic striped table unstackable" id="commits-table">
|
2019-11-02 01:02:41 +03:00
|
|
|
<thead>
|
|
|
|
<tr>
|
2023-09-25 11:56:50 +03:00
|
|
|
<th class="three wide">{{ctx.Locale.Tr "repo.commits.author"}}</th>
|
2024-01-19 19:05:02 +03:00
|
|
|
<th class="two wide sha">{{StringUtils.ToUpper $.Repository.ObjectFormatName}}</th>
|
2023-10-02 07:04:32 +03:00
|
|
|
<th class="eight wide message">{{ctx.Locale.Tr "repo.commits.message"}}</th>
|
2023-09-25 11:56:50 +03:00
|
|
|
<th class="two wide right aligned">{{ctx.Locale.Tr "repo.commits.date"}}</th>
|
2023-10-09 10:19:23 +03:00
|
|
|
<th class="one wide"></th>
|
2019-11-02 01:02:41 +03:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody class="commit-list">
|
2022-01-18 19:12:10 +03:00
|
|
|
{{$commitRepoLink := $.RepoLink}}{{if $.CommitRepoLink}}{{$commitRepoLink = $.CommitRepoLink}}{{end}}
|
2021-08-09 21:08:51 +03:00
|
|
|
{{range .Commits}}
|
2019-11-02 01:02:41 +03:00
|
|
|
<tr>
|
2024-03-25 23:18:58 +03:00
|
|
|
<td class="author tw-flex">
|
2019-11-04 13:20:12 +03:00
|
|
|
{{$userName := .Author.Name}}
|
2019-11-02 01:02:41 +03:00
|
|
|
{{if .User}}
|
2024-03-28 22:15:39 +03:00
|
|
|
{{if and .User.FullName DefaultShowFullName}}
|
2019-11-04 13:20:12 +03:00
|
|
|
{{$userName = .User.FullName}}
|
2019-11-02 01:02:41 +03:00
|
|
|
{{end}}
|
2024-03-25 23:18:58 +03:00
|
|
|
{{ctx.AvatarUtils.Avatar .User 28 "tw-mr-2"}}<a class="muted author-wrapper" href="{{.User.HomeLink}}">{{$userName}}</a>
|
2019-11-02 01:02:41 +03:00
|
|
|
{{else}}
|
2024-03-25 23:18:58 +03:00
|
|
|
{{ctx.AvatarUtils.AvatarByEmail .Author.Email .Author.Name 28 "tw-mr-2"}}
|
|
|
|
<span class="author-wrapper">{{$userName}}</span>
|
2019-11-02 01:02:41 +03:00
|
|
|
{{end}}
|
|
|
|
</td>
|
2023-10-09 10:19:23 +03:00
|
|
|
<td class="sha">
|
2019-11-04 13:20:12 +03:00
|
|
|
{{$class := "ui sha label"}}
|
|
|
|
{{if .Signature}}
|
2023-09-16 06:51:54 +03:00
|
|
|
{{$class = (print $class " isSigned")}}
|
2019-11-04 13:20:12 +03:00
|
|
|
{{if .Verification.Verified}}
|
2020-02-27 22:20:55 +03:00
|
|
|
{{if eq .Verification.TrustStatus "trusted"}}
|
2023-09-16 06:51:54 +03:00
|
|
|
{{$class = (print $class " isVerified")}}
|
2020-02-27 22:20:55 +03:00
|
|
|
{{else if eq .Verification.TrustStatus "untrusted"}}
|
2023-09-16 06:51:54 +03:00
|
|
|
{{$class = (print $class " isVerifiedUntrusted")}}
|
2020-02-27 22:20:55 +03:00
|
|
|
{{else}}
|
2023-09-16 06:51:54 +03:00
|
|
|
{{$class = (print $class " isVerifiedUnmatched")}}
|
2020-02-27 22:20:55 +03:00
|
|
|
{{end}}
|
2019-11-04 13:20:12 +03:00
|
|
|
{{else if .Verification.Warning}}
|
2023-09-16 06:51:54 +03:00
|
|
|
{{$class = (print $class " isWarning")}}
|
2019-11-04 13:20:12 +03:00
|
|
|
{{end}}
|
|
|
|
{{end}}
|
2023-09-03 05:58:52 +03:00
|
|
|
{{$commitShaLink := ""}}
|
2020-05-16 19:38:40 +03:00
|
|
|
{{if $.PageIsWiki}}
|
2023-09-03 05:58:52 +03:00
|
|
|
{{$commitShaLink = (printf "%s/wiki/commit/%s" $commitRepoLink (PathEscape .ID.String))}}
|
2023-08-13 12:04:42 +03:00
|
|
|
{{else if $.PageIsPullCommits}}
|
2023-09-03 05:58:52 +03:00
|
|
|
{{$commitShaLink = (printf "%s/pulls/%d/commits/%s" $commitRepoLink $.Issue.Index (PathEscape .ID.String))}}
|
2020-05-16 19:38:40 +03:00
|
|
|
{{else if $.Reponame}}
|
2023-09-03 05:58:52 +03:00
|
|
|
{{$commitShaLink = (printf "%s/commit/%s" $commitRepoLink (PathEscape .ID.String))}}
|
2019-11-04 13:20:12 +03:00
|
|
|
{{end}}
|
2023-09-03 05:58:52 +03:00
|
|
|
<a {{if $commitShaLink}}href="{{$commitShaLink}}"{{end}} class="{{$class}}">
|
2020-02-27 22:20:55 +03:00
|
|
|
<span class="shortsha">{{ShortSha .ID.String}}</span>
|
2023-09-03 05:58:52 +03:00
|
|
|
{{if .Signature}}{{template "repo/shabox_badge" dict "root" $ "verification" .Verification}}{{end}}
|
|
|
|
</a>
|
2019-11-02 01:02:41 +03:00
|
|
|
</td>
|
|
|
|
<td class="message">
|
|
|
|
<span class="message-wrapper">
|
2019-12-03 21:15:41 +03:00
|
|
|
{{if $.PageIsWiki}}
|
2023-03-06 00:59:05 +03:00
|
|
|
<span class="commit-summary {{if gt .ParentCount 1}} grey text{{end}}" title="{{.Summary}}">{{.Summary | RenderEmoji $.Context}}</span>
|
2022-08-26 00:55:52 +03:00
|
|
|
{{else}}
|
|
|
|
{{$commitLink:= printf "%s/commit/%s" $commitRepoLink (PathEscape .ID.String)}}
|
2024-01-15 11:49:24 +03:00
|
|
|
<span class="commit-summary {{if gt .ParentCount 1}} grey text{{end}}" title="{{.Summary}}">{{RenderCommitMessageLinkSubject $.Context .Message $commitLink ($.Repository.ComposeMetas ctx)}}</span>
|
2019-12-03 21:15:41 +03:00
|
|
|
{{end}}
|
2019-11-02 01:02:41 +03:00
|
|
|
</span>
|
|
|
|
{{if IsMultilineCommitMessage .Message}}
|
2023-07-27 13:47:41 +03:00
|
|
|
<button class="ui button js-toggle-commit-body ellipsis-button" aria-expanded="false">...</button>
|
2019-11-02 01:02:41 +03:00
|
|
|
{{end}}
|
2023-11-02 17:49:02 +03:00
|
|
|
{{template "repo/commit_statuses" dict "Status" .Status "Statuses" .Statuses}}
|
2019-11-02 01:02:41 +03:00
|
|
|
{{if IsMultilineCommitMessage .Message}}
|
2024-03-24 21:23:38 +03:00
|
|
|
<pre class="commit-body tw-hidden">{{RenderCommitBody $.Context .Message ($.Repository.ComposeMetas ctx)}}</pre>
|
2019-11-02 01:02:41 +03:00
|
|
|
{{end}}
|
|
|
|
</td>
|
2022-01-25 01:11:40 +03:00
|
|
|
{{if .Committer}}
|
2023-09-25 15:42:40 +03:00
|
|
|
<td class="text right aligned">{{TimeSince .Committer.When ctx.Locale}}</td>
|
2022-01-25 01:11:40 +03:00
|
|
|
{{else}}
|
2023-09-25 15:42:40 +03:00
|
|
|
<td class="text right aligned">{{TimeSince .Author.When ctx.Locale}}</td>
|
2022-01-25 01:11:40 +03:00
|
|
|
{{end}}
|
Migrate margin and padding helpers to tailwind (#30043)
This will conclude the refactor of 1:1 class replacements to tailwind,
except `gt-hidden`. Commands ran:
```bash
perl -p -i -e 's#gt-(p|m)([lrtbxy])?-0#tw-$1$2-0#g' {web_src/js,templates,routers,services}/**/*
perl -p -i -e 's#gt-(p|m)([lrtbxy])?-1#tw-$1$2-0.5#g' {web_src/js,templates,routers,services}/**/*
perl -p -i -e 's#gt-(p|m)([lrtbxy])?-2#tw-$1$2-1#g' {web_src/js,templates,routers,services}/**/*
perl -p -i -e 's#gt-(p|m)([lrtbxy])?-3#tw-$1$2-2#g' {web_src/js,templates,routers,services}/**/*
perl -p -i -e 's#gt-(p|m)([lrtbxy])?-4#tw-$1$2-4#g' {web_src/js,templates,routers,services}/**/*
perl -p -i -e 's#gt-(p|m)([lrtbxy])?-5#tw-$1$2-8#g' {web_src/js,templates,routers,services}/**/*
```
(cherry picked from commit 68ec9b48592fe88765bcc3a73093d43c98b315de)
Conflicts:
routers/web/repo/view.go
templates/base/head_navbar.tmpl
templates/repo/code/recently_pushed_new_branches.tmpl
templates/repo/diff/box.tmpl
templates/repo/diff/compare.tmpl
templates/repo/diff/conversation.tmpl
templates/repo/header.tmpl
templates/repo/issue/filter_list.tmpl
templates/repo/issue/view_content/conversation.tmpl
templates/repo/issue/view_content/sidebar.tmpl
templates/repo/settings/options.tmpl
templates/repo/view_file.tmpl
templates/shared/user/blocked_users.tmpl
templates/status/500.tmpl
web_src/js/components/DashboardRepoList.vue
resolved by prefering Forgejo version and applying the
commands to all files
2024-03-24 19:42:49 +03:00
|
|
|
<td class="text right aligned tw-py-0">
|
|
|
|
<button class="btn interact-bg tw-p-2" data-tooltip-content="{{ctx.Locale.Tr "copy_hash"}}" data-clipboard-text="{{.ID}}">{{svg "octicon-copy"}}</button>
|
2024-04-03 16:37:12 +03:00
|
|
|
{{if not $.PageIsWiki}}
|
2024-02-13 11:07:59 +03:00
|
|
|
<a
|
Migrate margin and padding helpers to tailwind (#30043)
This will conclude the refactor of 1:1 class replacements to tailwind,
except `gt-hidden`. Commands ran:
```bash
perl -p -i -e 's#gt-(p|m)([lrtbxy])?-0#tw-$1$2-0#g' {web_src/js,templates,routers,services}/**/*
perl -p -i -e 's#gt-(p|m)([lrtbxy])?-1#tw-$1$2-0.5#g' {web_src/js,templates,routers,services}/**/*
perl -p -i -e 's#gt-(p|m)([lrtbxy])?-2#tw-$1$2-1#g' {web_src/js,templates,routers,services}/**/*
perl -p -i -e 's#gt-(p|m)([lrtbxy])?-3#tw-$1$2-2#g' {web_src/js,templates,routers,services}/**/*
perl -p -i -e 's#gt-(p|m)([lrtbxy])?-4#tw-$1$2-4#g' {web_src/js,templates,routers,services}/**/*
perl -p -i -e 's#gt-(p|m)([lrtbxy])?-5#tw-$1$2-8#g' {web_src/js,templates,routers,services}/**/*
```
(cherry picked from commit 68ec9b48592fe88765bcc3a73093d43c98b315de)
Conflicts:
routers/web/repo/view.go
templates/base/head_navbar.tmpl
templates/repo/code/recently_pushed_new_branches.tmpl
templates/repo/diff/box.tmpl
templates/repo/diff/compare.tmpl
templates/repo/diff/conversation.tmpl
templates/repo/header.tmpl
templates/repo/issue/filter_list.tmpl
templates/repo/issue/view_content/conversation.tmpl
templates/repo/issue/view_content/sidebar.tmpl
templates/repo/settings/options.tmpl
templates/repo/view_file.tmpl
templates/shared/user/blocked_users.tmpl
templates/status/500.tmpl
web_src/js/components/DashboardRepoList.vue
resolved by prefering Forgejo version and applying the
commands to all files
2024-03-24 19:42:49 +03:00
|
|
|
class="btn interact-bg tw-p-2"
|
2024-02-13 11:07:59 +03:00
|
|
|
data-tooltip-content="{{ctx.Locale.Tr "repo.commits.view_path"}}"
|
|
|
|
href="{{if $.FileName}}{{printf "%s/src/commit/%s/%s" $commitRepoLink (PathEscape .ID.String) (PathEscapeSegments $.FileName)}}{{else}}{{printf "%s/src/commit/%s" $commitRepoLink (PathEscape .ID.String)}}{{end}}">
|
|
|
|
{{svg "octicon-file-code"}}
|
|
|
|
</a>
|
2024-04-03 16:37:12 +03:00
|
|
|
{{end}}
|
2023-10-02 07:04:32 +03:00
|
|
|
</td>
|
2019-11-02 01:02:41 +03:00
|
|
|
</tr>
|
|
|
|
{{end}}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|