From 491f36d32ad038fcbc241ceccee4288d5d10e768 Mon Sep 17 00:00:00 2001 From: silverwind Date: Tue, 4 Jul 2023 15:00:34 +0200 Subject: [PATCH] Actions list enhancements (#25601) (#25678) Backport https://github.com/go-gitea/gitea/pull/25601 to 1.20. Various small enhancements to the actions list. Before and after: Screenshot 2023-06-30 at 00 11 40 Screenshot 2023-06-30 at 00 09 51 Co-authored-by: Giteabot --- options/locale/locale_en-US.ini | 2 +- templates/package/shared/list.tmpl | 4 +-- templates/package/shared/versionlist.tmpl | 4 +-- templates/repo/actions/list.tmpl | 1 - templates/repo/actions/runs_list.tmpl | 37 ++++++++++++----------- templates/shared/issuelist.tmpl | 4 +-- web_src/css/base.css | 1 + web_src/css/shared/issuelist.css | 23 +++++++++++--- web_src/js/components/RepoActionView.vue | 11 +++---- 9 files changed, 51 insertions(+), 36 deletions(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index f0f2161559..090c4a690e 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -3458,7 +3458,7 @@ runners.reset_registration_token_success = Runner registration token reset succe runs.all_workflows = All Workflows runs.commit = Commit -runs.pushed_by = Pushed by +runs.pushed_by = pushed by runs.invalid_workflow_helper = Workflow config file is invalid. Please check your config file: %s runs.no_matching_runner_helper = No matching runner: %s diff --git a/templates/package/shared/list.tmpl b/templates/package/shared/list.tmpl index 707fbe357f..c9b4e5b845 100644 --- a/templates/package/shared/list.tmpl +++ b/templates/package/shared/list.tmpl @@ -16,12 +16,12 @@
{{range .PackageDescriptors}}
  • -
    +
    {{.Package.Name}} {{svg .Package.Type.SVGName 16}} {{.Package.Type.Name}}
    -
    +
    {{$timeStr := TimeSinceUnix .Version.CreatedUnix $.locale}} {{$hasRepositoryAccess := false}} {{if .Repository}} diff --git a/templates/package/shared/versionlist.tmpl b/templates/package/shared/versionlist.tmpl index ba488586a8..fa54372230 100644 --- a/templates/package/shared/versionlist.tmpl +++ b/templates/package/shared/versionlist.tmpl @@ -22,11 +22,11 @@
    {{range .PackageDescriptors}}
  • -
    +
    -
    +
    {{$.locale.Tr "packages.published_by" (TimeSinceUnix .Version.CreatedUnix $.locale) .Creator.HomeLink (.Creator.GetDisplayName | Escape) | Safe}}
    diff --git a/templates/repo/actions/list.tmpl b/templates/repo/actions/list.tmpl index ca97b67faa..96af83acb0 100644 --- a/templates/repo/actions/list.tmpl +++ b/templates/repo/actions/list.tmpl @@ -6,7 +6,6 @@
  • -
    +
  • +
    {{template "repo/actions/status" (dict "status" .Status.String "locale" $.locale)}}
    -
    +
    -
    - {{if not $.CurWorkflow}}{{.WorkflowID}} {{end}}#{{.Index}}: {{$.locale.Tr "actions.runs.commit"}} - {{ShortSha .CommitSHA}}{{$.locale.Tr "actions.runs.pushed_by"}} {{.TriggerUser.GetDisplayName}} - - {{if .RefLink}} - {{.PrettyRef}} - {{else}} - {{.PrettyRef}} - {{end}} - +
    + {{if not $.CurWorkflow}}{{.WorkflowID}} {{end}}#{{.Index}} + : {{$.locale.Tr "actions.runs.commit"}} + {{ShortSha .CommitSHA}} + {{$.locale.Tr "actions.runs.pushed_by"}} + {{.TriggerUser.GetDisplayName}}
    -
    -
    {{TimeSinceUnix .Updated $.locale}}
    -
    {{.Duration}}
    +
    + {{if .RefLink}} + {{.PrettyRef}} + {{else}} + {{.PrettyRef}} + {{end}} +
    +
    +
    {{svg "octicon-calendar" 16 "gt-mr-2"}}{{TimeSinceUnix .Updated $.locale}}
    +
    {{svg "octicon-stopwatch" 16 "gt-mr-2"}}{{.Duration}}
  • {{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" .}}
    -
    +
    {{RenderEmoji $.Context .Title | RenderCodeBlock}} {{if .IsPull}} @@ -24,7 +24,7 @@ {{end}}
    -
    +
    {{if eq $.listType "dashboard"}} {{.Repo.FullName}}#{{.Index}} diff --git a/web_src/css/base.css b/web_src/css/base.css index 0c03e3a7b6..a63dd6dab8 100644 --- a/web_src/css/base.css +++ b/web_src/css/base.css @@ -1721,6 +1721,7 @@ i.icon.centerlock { .ui.label { padding: 0.3em 0.5em; + transition: none; } .ui.label, diff --git a/web_src/css/shared/issuelist.css b/web_src/css/shared/issuelist.css index b20fd1a80e..7f9e49831a 100644 --- a/web_src/css/shared/issuelist.css +++ b/web_src/css/shared/issuelist.css @@ -17,15 +17,24 @@ } .issue.list > .item .issue-item-main { - width: 100%; + flex: 1; + display: flex; + flex-direction: column; } -.issue.list > .item .action-item-main { - width: 80%; +.issue.list > .item .action-item-center { + display: flex; + align-items: center; + padding-left: 4px; + padding-right: 12px; } -.issue.list > .item .issue-item-right { - width: 15%; +.issue.list > .item .action-item-right { + flex: 0 0 15%; + display: flex; + flex-direction: column; + gap: 3px; + color: var(--color-text-light); } .issue.list > .item .issue-item-top-row { @@ -52,6 +61,10 @@ .issue.list > .item .issue-item-bottom-row { font-size: 13px; + display: flex; + align-items: center; + flex-wrap: wrap; + margin: .125rem 0; } .issue.list > .item .title { diff --git a/web_src/js/components/RepoActionView.vue b/web_src/js/components/RepoActionView.vue index 75be2c9678..efdac0231e 100644 --- a/web_src/js/components/RepoActionView.vue +++ b/web_src/js/components/RepoActionView.vue @@ -20,12 +20,12 @@
    @@ -525,7 +525,6 @@ export function ansiLogToHTML(line) { .action-view-header { margin-top: 8px; - margin-bottom: 4px; } .action-info-summary { @@ -540,14 +539,14 @@ export function ansiLogToHTML(line) { .action-info-summary-title-text { font-size: 20px; - margin: 0 0 0 5px; + margin: 0 0 0 8px; flex: 1; } .action-commit-summary { display: flex; gap: 5px; - margin: 5px 0 0 25px; + margin: 0 0 0 28px; } .action-view-left, .action-view-right {