Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@
"build": "astro build",
"deploy": "wrangler deploy",
"dev": "astro dev",
"format": "biome check --write --linter-enabled=false",
"format": "biome check --write",
"lint": "biome check",
"preview": "astro preview",
"test": "bun test",
"typecheck": "tsc --noEmit"
},
Expand Down
76 changes: 24 additions & 52 deletions src/components/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,17 @@ export default function App() {
Limit Results (max 3000)
</label>
<div class="flex">
<button
type="button"
aria-label="Decrease limit by 50"
onClick={() => {
const current = parseInt(limitInput(), 10) || 0;
setLimitInput(Math.max(1, current - 50).toString());
}}
class="px-4 text-lg font-medium bg-slate-900 hover:bg-slate-800 active:bg-slate-700 text-slate-400 hover:text-white transition-colors cursor-pointer flex items-center justify-center rounded-l-xl border border-r-0 border-slate-800"
>
</button>
<input
type="number"
id="limitInput"
Expand All @@ -252,58 +263,19 @@ export default function App() {
onKeyPress={(e) => {
if (e.key === "Enter") startAnalysis();
}}
class="w-full px-4 py-2.5 bg-slate-950/60 border border-r-0 border-slate-800 rounded-l-xl text-slate-100 focus:ring-2 focus:ring-blue-500/50 focus:border-blue-500 focus:outline-none transition-all duration-200 shadow-inner [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none"
class="w-full px-4 py-2.5 text-center bg-slate-950/60 border border-l-0 border-r-0 border-slate-800 text-slate-100 focus:ring-2 focus:ring-blue-500/50 focus:border-blue-500 focus:outline-none transition-all duration-200 shadow-inner [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none"
/>
<div class="flex flex-col border border-slate-800 rounded-r-xl overflow-hidden bg-slate-900 shrink-0">
<button
type="button"
aria-label="Increase limit by 50"
onClick={() => {
const current = parseInt(limitInput(), 10) || 0;
setLimitInput(Math.min(3000, current + 50).toString());
}}
class="flex-1 px-3 bg-slate-900 hover:bg-slate-800 active:bg-slate-700 text-slate-400 hover:text-white transition-colors border-b border-slate-800/80 cursor-pointer flex items-center justify-center"
>
<svg
class="w-3 h-3"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<title>Increase limit</title>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2.5"
d="M5 15l7-7 7 7"
/>
</svg>
</button>
<button
type="button"
aria-label="Decrease limit by 50"
onClick={() => {
const current = parseInt(limitInput(), 10) || 0;
setLimitInput(Math.max(1, current - 50).toString());
}}
class="flex-1 px-3 bg-slate-900 hover:bg-slate-800 active:bg-slate-700 text-slate-400 hover:text-white transition-colors cursor-pointer flex items-center justify-center"
>
<svg
class="w-3 h-3"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<title>Decrease limit</title>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2.5"
d="M19 9l-7 7-7-7"
/>
</svg>
</button>
</div>
<button
type="button"
aria-label="Increase limit by 50"
onClick={() => {
const current = parseInt(limitInput(), 10) || 0;
setLimitInput(Math.min(3000, current + 50).toString());
}}
class="px-4 text-lg font-medium bg-slate-900 hover:bg-slate-800 active:bg-slate-700 text-slate-400 hover:text-white transition-colors cursor-pointer flex items-center justify-center rounded-r-xl border border-l-0 border-slate-800"
>
+
</button>
</div>
</div>
<button
Expand Down Expand Up @@ -482,7 +454,7 @@ export default function App() {
<For each={resultsItems()}>
{(pkg, i) => (
<tr class="hover:bg-slate-800/40 transition-colors duration-150 h-14">
<td class="px-6 py-4 text-slate-500 font-mono text-xs">
<td class="px-6 py-4 text-slate-400 font-mono text-xs">
{i() + 1}
</td>
<td class="px-6 py-4 text-slate-300 font-medium">
Expand Down
5 changes: 1 addition & 4 deletions src/layouts/Layout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@ const { title, description } = Astro.props;
<head>
<meta charset="UTF-8" />
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
/>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<title>{title}</title>
<meta name="description" content={description} />
Expand Down