Skip to content

Commit 49aba47

Browse files
feat(ui): make version colors consistent (#2171)
Co-authored-by: Willow (GHOST) <git@willow.sh>
1 parent c17f0f5 commit 49aba47

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

app/components/VersionSelector.vue

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ watch(
486486
<span dir="ltr" class="me-1.5">{{ currentVersion }}</span>
487487
<span
488488
v-if="currentVersion === latestVersion"
489-
class="text-xs px-1.5 py-0.5 rounded badge-green font-sans font-medium me-1.5"
489+
class="text-xs px-1.5 py-0.5 rounded badge-accent font-sans font-medium me-1.5"
490490
>
491491
latest
492492
</span>
@@ -577,7 +577,7 @@ watch(
577577
v-for="tag in group.primaryVersion.tags"
578578
:key="tag"
579579
class="text-xs px-1.5 py-0.5 rounded font-sans font-medium"
580-
:class="tag === 'latest' ? 'badge-green' : 'badge-subtle'"
580+
:class="tag === 'latest' ? 'badge-accent' : 'badge-subtle'"
581581
>
582582
{{ tag }}
583583
</span>
@@ -613,11 +613,7 @@ watch(
613613
v-for="tag in v.tags"
614614
:key="tag"
615615
class="text-4xs px-1 py-0.5 rounded font-sans font-medium"
616-
:class="
617-
tag === 'latest'
618-
? 'bg-emerald-500/10 text-emerald-400'
619-
: 'bg-bg-muted text-fg-subtle'
620-
"
616+
:class="tag === 'latest' ? 'badge-accent' : 'badge-subtle'"
621617
>
622618
{{ tag }}
623619
</span>

test/nuxt/components/VersionSelector.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -511,9 +511,9 @@ describe('VersionSelector', () => {
511511
// Find the latest tag span
512512
const latestTags = component.findAll('span').filter(s => s.text() === 'latest')
513513
expect(latestTags.length).toBeGreaterThan(0)
514-
// Should have green styling
515-
const hasGreenStyling = latestTags.some(t => t.classes().some(c => c.includes('green')))
516-
expect(hasGreenStyling).toBe(true)
514+
// Should have accent styling
515+
const hasAccentStyle = latestTags.some(t => t.classes().some(c => c.includes('badge-accent')))
516+
expect(hasAccentStyle).toBe(true)
517517
})
518518
})
519519

uno.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ export default defineConfig({
156156
['badge-purple', 'bg-badge-purple/10 text-badge-purple'],
157157
['badge-pink', 'bg-badge-pink/10 text-badge-pink'],
158158
['badge-subtle', 'bg-bg-subtle text-fg-subtle'],
159+
['badge-accent', 'bg-accent/10 text-accent'],
159160
],
160161
rules: [
161162
// Custom scale for active states

0 commit comments

Comments
 (0)