Skip to content

Commit 812b28c

Browse files
committed
refactor: rename
1 parent 6af0739 commit 812b28c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

server/api/registry/badge/[type]/[...pkg].get.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -284,8 +284,8 @@ export default defineCachedEventHandler(
284284
const rawColor = userColor ?? strategyResult.color
285285
const finalColor = rawColor?.startsWith('#') ? rawColor : `#${rawColor}`
286286

287-
const rawLeftColor = labelColor ?? '#0a0a0a'
288-
const finalLeftColor = rawLeftColor?.startsWith('#') ? rawLeftColor : `#${rawLeftColor}`
287+
const rawLabelColor = labelColor ?? '#0a0a0a'
288+
const finalLabelColor = rawLabelColor?.startsWith('#') ? rawLabelColor : `#${rawLabelColor}`
289289

290290
const leftWidth = measureTextWidth(finalLabel)
291291
const rightWidth = measureTextWidth(finalValue)
@@ -298,7 +298,7 @@ export default defineCachedEventHandler(
298298
<rect width="${totalWidth}" height="${height}" rx="3" fill="#fff"/>
299299
</clipPath>
300300
<g clip-path="url(#r)">
301-
<rect width="${leftWidth}" height="${height}" fill="${finalLeftColor}"/>
301+
<rect width="${leftWidth}" height="${height}" fill="${finalLabelColor}"/>
302302
<rect x="${leftWidth}" width="${rightWidth}" height="${height}" fill="${finalColor}"/>
303303
</g>
304304
<g text-anchor="middle" font-family="'Geist', system-ui, -apple-system, sans-serif" font-size="11">

0 commit comments

Comments
 (0)