summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2023-07-04 11:59:47 +0200
committerGitHub <noreply@github.com>2023-07-04 09:59:47 +0000
commit0006169f38f757e35c61169cb0a5da051ff696fe (patch)
tree3e82199feb12574f32f17a10a1d54e26e3cf06cc /templates
parent9958642502f8b505f97589d7a7f5357e8dfc04e3 (diff)
downloadgitea-0006169f38f757e35c61169cb0a5da051ff696fe.tar.gz
gitea-0006169f38f757e35c61169cb0a5da051ff696fe.zip
Actions list enhancements (#25601)
Various small enhancements to the actions list. Before and after: <img width="1264" alt="Screenshot 2023-06-30 at 00 11 40" src="https://github.com/go-gitea/gitea/assets/115237/bb4162ee-cdcf-4a73-b05e-f9521562edbb"> <img width="1264" alt="Screenshot 2023-06-30 at 00 09 51" src="https://github.com/go-gitea/gitea/assets/115237/52a70ea9-4bb3-406e-904b-0fdaafde9582"> --------- Co-authored-by: Giteabot <teabot@gitea.io>
Diffstat (limited to 'templates')
-rw-r--r--templates/package/shared/list.tmpl4
-rw-r--r--templates/package/shared/versionlist.tmpl4
-rw-r--r--templates/repo/actions/list.tmpl1
-rw-r--r--templates/repo/actions/runs_list.tmpl35
-rw-r--r--templates/shared/issuelist.tmpl4
5 files changed, 25 insertions, 23 deletions
diff --git a/templates/package/shared/list.tmpl b/templates/package/shared/list.tmpl
index 3d14eda3ef..6ac930e5c7 100644
--- a/templates/package/shared/list.tmpl
+++ b/templates/package/shared/list.tmpl
@@ -16,12 +16,12 @@
<div class="ui {{if .PackageDescriptors}}issue list{{end}}">
{{range .PackageDescriptors}}
<li class="item gt-df gt-py-3">
- <div class="issue-item-main gt-f1 gt-fc gt-df">
+ <div class="issue-item-main">
<div class="issue-item-top-row">
<a class="title" href="{{.FullWebLink}}">{{.Package.Name}}</a>
<span class="ui label">{{svg .Package.Type.SVGName 16}} {{.Package.Type.Name}}</span>
</div>
- <div class="desc issue-item-bottom-row gt-df gt-ac gt-fw gt-my-1">
+ <div class="desc issue-item-bottom-row">
{{$timeStr := TimeSinceUnix .Version.CreatedUnix $.locale}}
{{$hasRepositoryAccess := false}}
{{if .Repository}}
diff --git a/templates/package/shared/versionlist.tmpl b/templates/package/shared/versionlist.tmpl
index 23cd0bfcc0..9fc53d806c 100644
--- a/templates/package/shared/versionlist.tmpl
+++ b/templates/package/shared/versionlist.tmpl
@@ -22,11 +22,11 @@
<div class="ui {{if .PackageDescriptors}}issue list{{end}}">
{{range .PackageDescriptors}}
<li class="item gt-df gt-py-3">
- <div class="issue-item-main gt-f1 gt-fc gt-df">
+ <div class="issue-item-main">
<div class="issue-item-top-row">
<a class="title" href="{{.FullWebLink}}">{{.Version.LowerVersion}}</a>
</div>
- <div class="desc issue-item-bottom-row gt-df gt-ac gt-fw gt-my-1">
+ <div class="desc issue-item-bottom-row">
{{$.locale.Tr "packages.published_by" (TimeSinceUnix .Version.CreatedUnix $.locale) .Creator.HomeLink (.Creator.GetDisplayName | Escape) | Safe}}
</div>
</div>
diff --git a/templates/repo/actions/list.tmpl b/templates/repo/actions/list.tmpl
index 46cbb34670..f4f0aa9d6d 100644
--- a/templates/repo/actions/list.tmpl
+++ b/templates/repo/actions/list.tmpl
@@ -6,7 +6,6 @@
<div class="four wide column">
<div class="ui fluid vertical menu">
<a class="item{{if not $.CurWorkflow}} active{{end}}" href="{{$.Link}}?actor={{$.CurActor}}&status={{$.CurStatus}}">{{.locale.Tr "actions.runs.all_workflows"}}</a>
- <div class="divider"></div>
{{range .workflows}}
<a class="item{{if eq .Entry.Name $.CurWorkflow}} active{{end}}" href="{{$.Link}}?workflow={{.Entry.Name}}&actor={{$.CurActor}}&status={{$.CurStatus}}">{{.Entry.Name}}
{{if .ErrMsg}}
diff --git a/templates/repo/actions/runs_list.tmpl b/templates/repo/actions/runs_list.tmpl
index bfd5aabe55..ce664eb458 100644
--- a/templates/repo/actions/runs_list.tmpl
+++ b/templates/repo/actions/runs_list.tmpl
@@ -6,31 +6,34 @@
</div>
{{end}}
{{range .Runs}}
- <li class="item gt-df gt-py-4">
+ <li class="item gt-df gt-py-3">
<div class="issue-item-left issue-item-icon gt-df gt-items-start">
{{template "repo/actions/status" (dict "status" .Status.String "locale" $.locale)}}
</div>
- <div class="issue-item-main action-item-main gt-f1 gt-fc gt-df gt-mr-3">
- <div class="issue-item-top-row gt-mb-2">
+ <div class="issue-item-main action-item-main">
+ <div class="issue-item-top-row">
<a class="index gt-no-underline title action-item-title" title="{{.Title}}" href="{{if .Link}}{{.Link}}{{else}}{{$.Link}}/{{.Index}}{{end}}">
{{- .Title -}}
</a>
</div>
- <div class="desc issue-item-bottom-row gt-df gt-ac gt-fw">
- <b>{{if not $.CurWorkflow}}{{.WorkflowID}} {{end}}#{{.Index}}</b>: {{$.locale.Tr "actions.runs.commit"}}
- <a href="{{$.RepoLink}}/commit/{{.CommitSHA}}">{{ShortSha .CommitSHA}}</a>{{$.locale.Tr "actions.runs.pushed_by"}} {{.TriggerUser.GetDisplayName}}
- <span class="ui label">
- {{if .RefLink}}
- <a href="{{.RefLink}}">{{.PrettyRef}}</a>
- {{else}}
- {{.PrettyRef}}
- {{end}}
- </span>
+ <div class="desc issue-item-bottom-row">
+ <b>{{if not $.CurWorkflow}}{{.WorkflowID}} {{end}}#{{.Index}}</b>
+ : {{$.locale.Tr "actions.runs.commit"}}
+ <a href="{{$.RepoLink}}/commit/{{.CommitSHA}}">{{ShortSha .CommitSHA}}</a>
+ {{$.locale.Tr "actions.runs.pushed_by"}}
+ <a href="{{.TriggerUser.HomeLink}}">{{.TriggerUser.GetDisplayName}}</a>
</div>
</div>
- <div class="issue-item-right">
- <div>{{TimeSinceUnix .Updated $.locale}}</div>
- <div>{{.Duration}}</div>
+ <div class="action-item-center">
+ {{if .RefLink}}
+ <a class="ui label gt-px-2 gt-mx-0" href="{{.RefLink}}">{{.PrettyRef}}</a>
+ {{else}}
+ <span class="ui label gt-px-2 gt-mx-0">{{.PrettyRef}}</span>
+ {{end}}
+ </div>
+ <div class="action-item-right">
+ <div>{{svg "octicon-calendar" 16 "gt-mr-2"}}{{TimeSinceUnix .Updated $.locale}}</div>
+ <div>{{svg "octicon-stopwatch" 16 "gt-mr-2"}}{{.Duration}}</div>
</div>
</li>
{{end}}
diff --git a/templates/shared/issuelist.tmpl b/templates/shared/issuelist.tmpl
index 192911d13a..6d61b9fa99 100644
--- a/templates/shared/issuelist.tmpl
+++ b/templates/shared/issuelist.tmpl
@@ -10,7 +10,7 @@
{{template "shared/issueicon" .}}
</div>
</div>
- <div class="issue-item-main gt-f1 gt-fc gt-df">
+ <div class="issue-item-main">
<div class="issue-item-top-row">
<a class="title gt-no-underline issue-title" href="{{if .Link}}{{.Link}}{{else}}{{$.Link}}/{{.Index}}{{end}}">{{RenderEmoji $.Context .Title | RenderCodeBlock}}</a>
{{if .IsPull}}
@@ -24,7 +24,7 @@
{{end}}
</span>
</div>
- <div class="desc issue-item-bottom-row gt-df gt-ac gt-fw gt-my-1">
+ <div class="desc issue-item-bottom-row">
<a class="index gt-ml-0 gt-mr-2" href="{{if .Link}}{{.Link}}{{else}}{{$.Link}}/{{.Index}}{{end}}">
{{if eq $.listType "dashboard"}}
{{.Repo.FullName}}#{{.Index}}