初始提交: Gitea 项目代码
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
{{/* Status icons used for runs, jobs and steps.
|
||||
|
||||
Template Attributes:
|
||||
* Status: one of success, skipped, waiting, blocked, running, failure, cancelled, cancelling, unknown
|
||||
* Size: icon size in pixels (default 16)
|
||||
* ClassName: additional CSS classes
|
||||
* IconVariant: "circle-fill" → octicon-check-circle-fill / octicon-x-circle-fill
|
||||
|
||||
Keep this template in sync with web_src/js/components/ActionStatusIcon.vue.
|
||||
*/}}
|
||||
{{- $size := or .Size 16 -}}
|
||||
{{- $className := or .ClassName "" -}}
|
||||
{{- $circleFill := eq .IconVariant "circle-fill" -}}
|
||||
{{if eq .Status "success"}}
|
||||
{{svg (Iif $circleFill "octicon-check-circle-fill" "octicon-check") $size (printf "tw-text-green %s" $className)}}
|
||||
{{else if eq .Status "skipped"}}
|
||||
{{svg "octicon-skip" $size (printf "tw-text-text-light %s" $className)}}
|
||||
{{else if eq .Status "cancelled"}}
|
||||
{{svg "octicon-stop" $size (printf "tw-text-text-light %s" $className)}}
|
||||
{{else if eq .Status "waiting"}}
|
||||
{{svg "octicon-circle" $size (printf "tw-text-text-light %s" $className)}}
|
||||
{{else if eq .Status "blocked"}}
|
||||
{{svg "octicon-blocked" $size (printf "tw-text-yellow %s" $className)}}
|
||||
{{else if eq .Status "running"}}
|
||||
{{svg "gitea-running" $size (printf "tw-text-yellow rotate-clockwise %s" $className)}}
|
||||
{{else if eq .Status "cancelling"}}
|
||||
{{svg "octicon-stop" $size (printf "tw-text-yellow %s" $className)}}
|
||||
{{else}}{{/*failure, unknown*/}}
|
||||
{{svg (Iif $circleFill "octicon-x-circle-fill" "octicon-x") $size (printf "tw-text-red %s" $className)}}
|
||||
{{end}}
|
||||
@@ -0,0 +1,19 @@
|
||||
<!-- make sure this matches the color logic in web_src/js/components/DashboardRepoList.vue -->
|
||||
{{if eq .State "pending"}}
|
||||
{{svg "octicon-dot-fill" 18 "commit-status icon tw-text-yellow"}}
|
||||
{{end}}
|
||||
{{if eq .State "success"}}
|
||||
{{svg "octicon-check" 18 "commit-status icon tw-text-green"}}
|
||||
{{end}}
|
||||
{{if eq .State "error"}}
|
||||
{{svg "gitea-exclamation" 18 "commit-status icon tw-text-red"}}
|
||||
{{end}}
|
||||
{{if eq .State "failure"}}
|
||||
{{svg "octicon-x" 18 "commit-status icon tw-text-red"}}
|
||||
{{end}}
|
||||
{{if eq .State "warning"}}
|
||||
{{svg "gitea-exclamation" 18 "commit-status icon tw-text-yellow"}}
|
||||
{{end}}
|
||||
{{if eq .State "skipped"}}
|
||||
{{svg "octicon-skip" 18 "commit-status icon tw-text-text-light"}}
|
||||
{{end}}
|
||||
Reference in New Issue
Block a user