diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2024-12-16 11:18:00 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-16 11:18:00 +0800 |
commit | d28a4843b8de5d5e01ef3d7b2ad25f22853247ad (patch) | |
tree | ded19ee74967e2d112bac0d4442baa780c2af6e7 /web_src/js | |
parent | 276f43330cb86e2ce6bc5a902a43f02727e009e9 (diff) | |
download | gitea-d28a4843b8de5d5e01ef3d7b2ad25f22853247ad.tar.gz gitea-d28a4843b8de5d5e01ef3d7b2ad25f22853247ad.zip |
Fix incomplete Actions status aggregations (#32859)
fix #32857
Diffstat (limited to 'web_src/js')
-rw-r--r-- | web_src/js/components/ActionRunStatus.vue | 13 | ||||
-rw-r--r-- | web_src/js/components/RepoActionView.vue | 4 | ||||
-rw-r--r-- | web_src/js/svg.ts | 2 |
3 files changed, 12 insertions, 7 deletions
diff --git a/web_src/js/components/ActionRunStatus.vue b/web_src/js/components/ActionRunStatus.vue index 558b881dfe..deab5f6469 100644 --- a/web_src/js/components/ActionRunStatus.vue +++ b/web_src/js/components/ActionRunStatus.vue @@ -6,24 +6,25 @@ import {SvgIcon} from '../svg.ts'; withDefaults(defineProps<{ - status: '', - size?: number, - className?: string, + status: 'success' | 'skipped' | 'waiting' | 'blocked' | 'running' | 'failure' | 'cancelled' | 'unknown', + size: number, + className: string, localeStatus?: string, }>(), { size: 16, - className: undefined, + className: '', localeStatus: undefined, }); </script> <template> - <span class="tw-flex tw-items-center" :data-tooltip-content="localeStatus" v-if="status"> + <span :data-tooltip-content="localeStatus ?? status" v-if="status"> <SvgIcon name="octicon-check-circle-fill" class="text green" :size="size" :class-name="className" v-if="status === 'success'"/> <SvgIcon name="octicon-skip" class="text grey" :size="size" :class-name="className" v-else-if="status === 'skipped'"/> + <SvgIcon name="octicon-stop" class="text yellow" :size="size" :class-name="className" v-else-if="status === 'cancelled'"/> <SvgIcon name="octicon-clock" class="text yellow" :size="size" :class-name="className" v-else-if="status === 'waiting'"/> <SvgIcon name="octicon-blocked" class="text yellow" :size="size" :class-name="className" v-else-if="status === 'blocked'"/> <SvgIcon name="octicon-meter" class="text yellow" :size="size" :class-name="'job-status-rotate ' + className" v-else-if="status === 'running'"/> - <SvgIcon name="octicon-x-circle-fill" class="text red" :size="size" v-else-if="['failure', 'cancelled', 'unknown'].includes(status)"/> + <SvgIcon name="octicon-x-circle-fill" class="text red" :size="size" v-else/><!-- failure, unknown --> </span> </template> diff --git a/web_src/js/components/RepoActionView.vue b/web_src/js/components/RepoActionView.vue index eece2efaf8..cb65a98edd 100644 --- a/web_src/js/components/RepoActionView.vue +++ b/web_src/js/components/RepoActionView.vue @@ -551,11 +551,13 @@ export function initRepositoryActionView() { .action-info-summary-title { display: flex; + align-items: center; + gap: 0.5em; } .action-info-summary-title-text { font-size: 20px; - margin: 0 0 0 8px; + margin: 0; flex: 1; overflow-wrap: anywhere; } diff --git a/web_src/js/svg.ts b/web_src/js/svg.ts index 3a0f2ed53c..90b12fa87d 100644 --- a/web_src/js/svg.ts +++ b/web_src/js/svg.ts @@ -65,6 +65,7 @@ import octiconSidebarCollapse from '../../public/assets/img/svg/octicon-sidebar- import octiconSidebarExpand from '../../public/assets/img/svg/octicon-sidebar-expand.svg'; import octiconSkip from '../../public/assets/img/svg/octicon-skip.svg'; import octiconStar from '../../public/assets/img/svg/octicon-star.svg'; +import octiconStop from '../../public/assets/img/svg/octicon-stop.svg'; import octiconStrikethrough from '../../public/assets/img/svg/octicon-strikethrough.svg'; import octiconSync from '../../public/assets/img/svg/octicon-sync.svg'; import octiconTable from '../../public/assets/img/svg/octicon-table.svg'; @@ -140,6 +141,7 @@ const svgs = { 'octicon-sidebar-expand': octiconSidebarExpand, 'octicon-skip': octiconSkip, 'octicon-star': octiconStar, + 'octicon-stop': octiconStop, 'octicon-strikethrough': octiconStrikethrough, 'octicon-sync': octiconSync, 'octicon-table': octiconTable, |