gitea源码

123456789101112131415161718192021222324
  1. <!-- This template should be kept the same as web_src/js/components/ActionRunStatus.vue
  2. Please also update the vue file above if this template is modified.
  3. action status accepted: success, skipped, waiting, blocked, running, failure, cancelled, unknown
  4. -->
  5. {{- $size := Iif .size .size 16 -}}
  6. {{- $className := Iif .className .className "" -}}
  7. <span data-tooltip-content="{{ctx.Locale.Tr (printf "actions.status.%s" .status)}}">
  8. {{if eq .status "success"}}
  9. {{svg "octicon-check-circle-fill" $size (printf "text green %s" $className)}}
  10. {{else if eq .status "skipped"}}
  11. {{svg "octicon-skip" $size (printf "text grey %s" $className)}}
  12. {{else if eq .status "cancelled"}}
  13. {{svg "octicon-stop" $size (printf "text grey %s" $className)}}
  14. {{else if eq .status "waiting"}}
  15. {{svg "octicon-clock" $size (printf "text yellow %s" $className)}}
  16. {{else if eq .status "blocked"}}
  17. {{svg "octicon-blocked" $size (printf "text yellow %s" $className)}}
  18. {{else if eq .status "running"}}
  19. {{svg "octicon-meter" $size (printf "text yellow circular-spin %s" $className)}}
  20. {{else}}{{/*failure, unknown*/}}
  21. {{svg "octicon-x-circle-fill" $size (printf "text red %s" $className)}}
  22. {{end}}
  23. </span>