From 39b3e78c4ee2c8d3bad07ba35a88fee0dff8e88c Mon Sep 17 00:00:00 2001 From: dingyongliang Date: Fri, 18 Aug 2023 11:13:39 +0800 Subject: [PATCH] * zin: add finish marker for history. --- lib/zin/wg/history/v1.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/zin/wg/history/v1.php b/lib/zin/wg/history/v1.php index 3f9977d4df..1568cc268f 100644 --- a/lib/zin/wg/history/v1.php +++ b/lib/zin/wg/history/v1.php @@ -25,12 +25,12 @@ class history extends wg return file_get_contents(__DIR__ . DS . 'js' . DS . 'v1.js'); } - private function marker(int $num): wg + private function marker(int|string $content): wg { return span ( setClass('marker', 'relative', 'z-10', 'text-sm', 'rounded-full', 'aspect-square', 'inline-flex', 'justify-center', 'items-center', 'mr-1', 'border', 'h-5', 'w-5', 'z-10'), - $num + is_int($content) ? $content : icon('check', setClass('text-success font-semibold')) ); } @@ -105,8 +105,7 @@ class history extends wg return li ( setClass('mb-2 flex'), - set::value($i), - $this->marker($i), + $this->marker($action->action === 'finished' ? 'finished' : $i), $actionItemView ); }