From 0006169f38f757e35c61169cb0a5da051ff696fe Mon Sep 17 00:00:00 2001 From: silverwind Date: Tue, 4 Jul 2023 11:59:47 +0200 Subject: [PATCH] Actions list enhancements (#25601) 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 | 35 ++++++++++++----------- 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, 50 insertions(+), 35 deletions(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 6d0f29eddb..f10d6620ff 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -3463,7 +3463,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 runs.actor = Actor 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 @@
{{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 23cd0bfcc0..9fc53d806c 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 46cbb34670..f4f0aa9d6d 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 ca400f270b..542fb1fd74 100644 --- a/web_src/css/base.css +++ b/web_src/css/base.css @@ -1633,6 +1633,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 c247967161..f244720fe0 100644 --- a/web_src/js/components/RepoActionView.vue +++ b/web_src/js/components/RepoActionView.vue @@ -20,12 +20,12 @@
    @@ -507,7 +507,6 @@ export function initRepositoryActionView() { .action-view-header { margin-top: 8px; - margin-bottom: 4px; } .action-info-summary { @@ -522,14 +521,14 @@ export function initRepositoryActionView() { .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 {