Skip to content

Commit bf3dfeb

Browse files
committed
fix: color-code package tags by type instead of small badges
1 parent eedc171 commit bf3dfeb

File tree

1 file changed

+20
-21
lines changed

1 file changed

+20
-21
lines changed

src/routes/dashboard/+page.svelte

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -537,13 +537,9 @@
537537
{#if getExtraPackages().length > 0}
538538
<div class="selected-extras">
539539
{#each getExtraPackages() as pkg}
540-
<button type="button" class="extra-tag" onclick={() => togglePackage(pkg, selectedPackages.get(pkg) || 'formula')}>
540+
{@const pkgType = selectedPackages.get(pkg) || 'formula'}
541+
<button type="button" class="extra-tag {pkgType}" onclick={() => togglePackage(pkg, pkgType)}>
541542
{pkg}
542-
{#if selectedPackages.get(pkg) === 'cask'}
543-
<span class="type-badge cask">cask</span>
544-
{:else if selectedPackages.get(pkg) === 'tap'}
545-
<span class="type-badge tap">tap</span>
546-
{/if}
547543
<span class="remove-icon">×</span>
548544
</button>
549545
{/each}
@@ -1097,8 +1093,6 @@
10971093
align-items: center;
10981094
gap: 4px;
10991095
padding: 4px 8px;
1100-
background: var(--accent);
1101-
color: #000;
11021096
border: none;
11031097
border-radius: 4px;
11041098
font-size: 0.75rem;
@@ -1107,26 +1101,31 @@
11071101
transition: all 0.15s;
11081102
}
11091103
1110-
.extra-tag:hover {
1104+
.extra-tag.formula {
1105+
background: var(--accent);
1106+
color: #000;
1107+
}
1108+
1109+
.extra-tag.formula:hover {
11111110
background: #1a9f4a;
11121111
}
11131112
1114-
.type-badge {
1115-
font-size: 0.6rem;
1116-
padding: 1px 4px;
1117-
border-radius: 3px;
1118-
text-transform: uppercase;
1119-
font-family: 'JetBrains Mono', monospace;
1113+
.extra-tag.cask {
1114+
background: #60a5fa;
1115+
color: #000;
11201116
}
11211117
1122-
.type-badge.cask {
1123-
background: rgba(96, 165, 250, 0.2);
1124-
color: #60a5fa;
1118+
.extra-tag.cask:hover {
1119+
background: #3b82f6;
1120+
}
1121+
1122+
.extra-tag.tap {
1123+
background: #fbbf24;
1124+
color: #000;
11251125
}
11261126
1127-
.type-badge.tap {
1128-
background: rgba(251, 191, 36, 0.2);
1129-
color: #fbbf24;
1127+
.extra-tag.tap:hover {
1128+
background: #f59e0b;
11301129
}
11311130
11321131
.remove-icon {

0 commit comments

Comments
 (0)