* [refac] Optimize width of progress bar.

This commit is contained in:
liugang
2026-01-08 11:38:02 +08:00
parent 247d9b5b5c
commit 36621c9918
+7 -4
View File
@@ -24,6 +24,7 @@ foreach(['open', 'biz', 'max', 'ipd'] as $edition)
$toVersionEdition = is_numeric($toVersion[0]) ? 'open' : substr($toVersion, 0, 3);
$toVersionName = $editionNames[$toVersionEdition] . str_ireplace($toVersionEdition, '', $toVersion);
$versionCount = count($upgradeVersions);
$buildVersions = function() use ($upgradeVersions, $editionNames)
{
@@ -131,23 +132,25 @@ div
),
row
(
setClass('items-center gap-2'),
setClass('justify-between items-center gap-2'),
progressbar
(
setID('versionsProgressBar'),
setClass('rounded-full'),
setStyle(['height' => '.75rem', 'width' => 'calc(100% - 3rem)']),
setStyle(['height' => '.75rem', 'width' => '100%']),
set::color('rgba(var(--color-success-500-rgb), var(--tw-bg-opacity));'),
set::percent(0)
),
span
(
setClass('text-right'),
setStyle(['min-width' => (strlen((string)$versionCount) + 1) . 'rem']),
span
(
setID('versionsProgressText'),
'0'
0
),
' / ' . count($upgradeVersions)
' / ' . $versionCount
)
)
)