diff --git a/src/components/App.tsx b/src/components/App.tsx index f143f72..0b5202e 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -109,7 +109,10 @@ export default function App() { try { const [pkgName, requestedRange] = getPackageNameAndVersion(pkg); const dev = isDev(); - const limit = parseInt(limitInput(), 10) || 200; + const limit = Math.min( + 3000, + Math.max(1, parseInt(limitInput(), 10) || 200), + ); if (replaceState) { const url = new URL(window.location.href); @@ -203,11 +206,11 @@ export default function App() { return ( <> -
-
+
+
- setLimitInput(e.currentTarget.value)} - onKeyPress={(e) => { - if (e.key === "Enter") startAnalysis(); - }} - class="w-full px-4 py-2 bg-white dark:bg-slate-800 border border-slate-300 dark:border-slate-700 rounded-lg focus:ring-2 focus:ring-blue-500 focus:outline-none dark:text-white" - /> +
+ { + const next = Math.min( + 3000, + Math.max(1, parseInt(e.currentTarget.value, 10) || 1), + ); + setLimitInput(next.toString()); + }} + 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" + /> +
+ + +
+
-
-