Browse Source

fix issue

pull/3437/head
zhoupzh 2 years ago
parent
commit
bd2ad47d4c
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      modules/templates/helper.go
  2. +1
    -1
      templates/custom/task_wait_count.tmpl

+ 1
- 1
modules/templates/helper.go View File

@@ -471,7 +471,7 @@ func Str2html(raw string) template.HTML {
func subOne(length int) int {
return length - 1
}
func addOne(i) int64 {
func addOne(i interface{}) int64 {
if i>=0 {
return i + 1
}


+ 1
- 1
templates/custom/task_wait_count.tmpl View File

@@ -1,7 +1,7 @@
<div style="display:inline-block;">
<div style="display:flex;align-items:center;color:#f2711c;">
<i class="ri-error-warning-line" style="margin-right: 0.5rem; font-size: 14px"></i>
<span style="font-size: 12px">{{.i18n.Tr "repo.wait_count_start"}} <span class="__task_wait_count__">{{.WaitCount}}{{if and (.WaitCount) (ne .WaitCount 0) }}{{addOne .WaitCount}}{{end}}</span> {{.i18n.Tr "repo.wait_count_end"}}</span>
<span style="font-size: 12px">{{.i18n.Tr "repo.wait_count_start"}} <span class="__task_wait_count__">{{addOne .WaitCount}}</span> {{.i18n.Tr "repo.wait_count_end"}}</span>
</div>
</div>
<script>


Loading…
Cancel
Save