forgejo_backup/templates/repo/actions/status.tmpl
Yarden Shoham 9a0652f0b2
Attach a tooltip to the action status icon (#24614)
To clearly communicate the current state of the action

![image](5d6de6b9-f34f-417d-b08e-fcd1b99b3079)
![image](b976676a-4525-43e7-866f-8933be1a5dfd)
![image](2e0a55fe-658f-4242-83de-b857a8b55f31)
![image](6b42bcd1-c499-41ac-8419-1c4e60085d47)
![image](363fcff8-fe61-4363-a04b-2db93cfc4fa3)
![image](f8f59b68-93de-4f31-b9b0-24d94990d1d0)

---------

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
2023-05-09 21:39:16 +02:00

28 lines
1 KiB
Handlebars

<!-- This template should be kept the same as web_src/js/components/ActionRunStatus.vue
Please also update the vue file above if this template is modified.
-->
{{- $size := 16 -}}
{{- if .size -}}
{{- $size = .size -}}
{{- end -}}
{{- $className := "" -}}
{{- if .className -}}
{{- $className = .className -}}
{{- end -}}
<span data-tooltip-content="{{.locale.Tr (printf "actions.status.%s" .status)}}">
{{if eq .status "success"}}
{{svg "octicon-check-circle-fill" $size (printf "text green %s" $className)}}
{{else if eq .status "skipped"}}
{{svg "octicon-skip" $size (printf "text grey %s" $className)}}
{{else if eq .status "waiting"}}
{{svg "octicon-clock" $size (printf "text yellow %s" $className)}}
{{else if eq .status "blocked"}}
{{svg "octicon-blocked" $size (printf "text yellow %s" $className)}}
{{else if eq .status "running"}}
{{svg "octicon-meter" $size (printf "text yellow job-status-rotate %s" $className)}}
{{else}}
{{svg "octicon-x-circle-fill" $size (printf "text red %s" $className)}}
{{end}}
</span>