Skip to content

Commit c96102b

Browse files
committed
Remove bind:group, add outdated,deprecated tags
1 parent 6fa2460 commit c96102b

File tree

2 files changed

+28
-7
lines changed

2 files changed

+28
-7
lines changed

apps/svelte.dev/src/routes/(packages)/packages/+page.svelte

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@
5858
return () => worker.terminate();
5959
});
6060
61-
$inspect(tags_qp.current);
62-
6361
$effect(() => {
6462
query_qp.current;
6563
tags_qp.current;
@@ -123,7 +121,6 @@
123121
<li>
124122
<input
125123
type="checkbox"
126-
bind:group={tags_qp.current}
127124
value={tag.tag}
128125
bind:checked={() =>
129126
tag.tag === 'all'
@@ -228,7 +225,15 @@
228225
rel="noreferrer noopener"
229226
title="Read the article »"
230227
>
231-
<h2>{pkg.name}</h2>
228+
<h2 class={[(pkg.outdated || pkg.deprecated) && 'faded']}>{pkg.name}</h2>
229+
<span class="status">
230+
{#if pkg.outdated}
231+
<span>outdated</span>
232+
{/if}
233+
{#if pkg.deprecated}
234+
<span>deprecated</span>
235+
{/if}
236+
</span>
232237
</a>
233238

234239
<p>{pkg.description}</p>
@@ -435,6 +440,10 @@
435440
display: inline-block;
436441
color: var(--sk-fg-1);
437442
font: var(--sk-font-h3);
443+
444+
&.faded {
445+
color: var(--sk-fg-3);
446+
}
438447
}
439448

440449
article {
@@ -450,6 +459,20 @@
450459
}
451460
}
452461

462+
.status {
463+
width: max-content;
464+
font: var(--sk-font-ui-medium);
465+
font-family: var(--sk-font-family-mono);
466+
margin-left: 0.5rem;
467+
468+
> * {
469+
padding: 0.4rem 0.5rem;
470+
width: fit-content;
471+
border: 1px solid var(--sk-border);
472+
border-radius: 0.5rem;
473+
}
474+
}
475+
453476
.tags {
454477
display: flex;
455478
gap: 0.5rem;

apps/svelte.dev/src/routes/(packages)/packages/packages-worker.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ addEventListener('message', async (event) => {
1111
}
1212

1313
if (type === 'get') {
14-
let { query, page = 0, tags = [], url } = payload;
14+
let { query, page = 0, tags = [] } = payload;
1515

1616
const current_results = search(query, { tags });
1717
const total_pages = Math.ceil(current_results.length / REGISTRY_PAGE_LIMIT);
@@ -30,8 +30,6 @@ addEventListener('message', async (event) => {
3030
return;
3131
}
3232

33-
console.log(current_results.length);
34-
3533
postMessage({
3634
type: 'results',
3735
payload: {

0 commit comments

Comments
 (0)