diff --git a/web/src/assets/styles/components/personal-workbench.css b/web/src/assets/styles/components/personal-workbench.css index afa5eb8..59de1c7 100644 --- a/web/src/assets/styles/components/personal-workbench.css +++ b/web/src/assets/styles/components/personal-workbench.css @@ -528,8 +528,10 @@ .progress-type { min-width: 0; display: grid; - justify-items: start; + justify-self: stretch; + justify-items: center; gap: 3px; + text-align: center; } .progress-type small { @@ -544,6 +546,7 @@ overflow: hidden; display: inline-flex; align-items: center; + justify-content: center; min-height: 22px; padding: 0 8px; border: 1px solid rgba(var(--theme-primary-rgb, 58, 124, 165), 0.18); diff --git a/web/tests/personal-workbench-assistant.test.mjs b/web/tests/personal-workbench-assistant.test.mjs index c95ca88..dc86cc4 100644 --- a/web/tests/personal-workbench-assistant.test.mjs +++ b/web/tests/personal-workbench-assistant.test.mjs @@ -159,6 +159,8 @@ test('workbench progress rows show update time first', () => { assert.match(workbench, /function formatProgressTime\(value\)/) assert.doesNotMatch(workbench, />全部进度/) assert.match(workbenchStyles, /\.progress-row\s*\{[\s\S]*grid-template-columns:\s*minmax\(78px,\s*0\.42fr\)[\s\S]*minmax\(84px,\s*0\.42fr\)/) + assert.match(workbenchStyles, /\.progress-type\s*\{[\s\S]*justify-self:\s*stretch;[\s\S]*justify-items:\s*center;[\s\S]*text-align:\s*center;/) + assert.match(workbenchStyles, /\.progress-type strong\s*\{[\s\S]*justify-content:\s*center;/) assert.match(workbenchStyles, /\.progress-type strong\s*\{[\s\S]*var\(--workbench-primary-active\)/) assert.match(workbenchStyles, /\.progress-row\.has-long-duration-divider::before\s*\{[\s\S]*content:\s*"10日以上"/) assert.match(workbenchStyles, /\.progress-row\.has-long-duration-divider::before\s*\{[\s\S]*left:\s*50%;[\s\S]*transform:\s*translateX\(-50%\);/)