Spaces:
Running
Running
zRzRzRzRzRzRzR commited on
Commit ·
bd899f8
1
Parent(s): ae4aa81
fix: make repository index scrollable
Browse files- src/features/home/ProductHomePage.tsx +7 -8
- src/index.css +22 -0
src/features/home/ProductHomePage.tsx
CHANGED
|
@@ -314,7 +314,7 @@ function LedgerRow({ project }: { project: ProjectCard }) {
|
|
| 314 |
return (
|
| 315 |
<Link
|
| 316 |
to={`/p/${project.owner_login}/${project.name}`}
|
| 317 |
-
className="group grid grid-cols-[minmax(0,1fr)_auto] items-center gap-x-4 gap-y-2 border-b border-line/70 px-2 py-3.5 transition-colors last:border-b-0 hover:bg-surface-sunken/60 focus-ring md:grid-cols-[minmax(0,2.4fr)_110px_78px_150px_70px_150px] md:gap-x-5"
|
| 318 |
>
|
| 319 |
{/* repository */}
|
| 320 |
<span className="flex min-w-0 items-center gap-3">
|
|
@@ -425,8 +425,7 @@ export function ProductHomePage() {
|
|
| 425 |
project.full_name.toLowerCase().includes(needle) ||
|
| 426 |
(project.description ?? "").toLowerCase().includes(needle)
|
| 427 |
);
|
| 428 |
-
})
|
| 429 |
-
.slice(0, 5);
|
| 430 |
}, [allItems, q]);
|
| 431 |
|
| 432 |
const scans = overview.data?.live?.scanning ?? [];
|
|
@@ -565,7 +564,11 @@ export function ProductHomePage() {
|
|
| 565 |
</div>
|
| 566 |
<div className="mt-6 border-b border-line md:hidden" aria-hidden />
|
| 567 |
|
| 568 |
-
<div
|
|
|
|
|
|
|
|
|
|
|
|
|
| 569 |
{projects.isLoading ? (
|
| 570 |
<div className="space-y-2 py-5">
|
| 571 |
{Array.from({ length: 5 }).map((_, index) => (
|
|
@@ -594,10 +597,6 @@ export function ProductHomePage() {
|
|
| 594 |
)}
|
| 595 |
</div>
|
| 596 |
|
| 597 |
-
<div className="mt-4 flex items-center justify-between gap-3 border-t border-line pt-3.5 font-mono text-[10px] uppercase tracking-[0.1em] text-ink-tertiary">
|
| 598 |
-
<span>{(projects.data?.total ?? 0).toLocaleString()} repositories indexed</span>
|
| 599 |
-
<a href="#top" className="transition-colors hover:text-ink">Back to top ↑</a>
|
| 600 |
-
</div>
|
| 601 |
</section>
|
| 602 |
</main>
|
| 603 |
|
|
|
|
| 314 |
return (
|
| 315 |
<Link
|
| 316 |
to={`/p/${project.owner_login}/${project.name}`}
|
| 317 |
+
className="group grid min-h-[72px] grid-cols-[minmax(0,1fr)_auto] items-center gap-x-4 gap-y-2 border-b border-line/70 px-2 py-3.5 transition-colors last:border-b-0 hover:bg-surface-sunken/60 focus-ring md:grid-cols-[minmax(0,2.4fr)_110px_78px_150px_70px_150px] md:gap-x-5"
|
| 318 |
>
|
| 319 |
{/* repository */}
|
| 320 |
<span className="flex min-w-0 items-center gap-3">
|
|
|
|
| 425 |
project.full_name.toLowerCase().includes(needle) ||
|
| 426 |
(project.description ?? "").toLowerCase().includes(needle)
|
| 427 |
);
|
| 428 |
+
});
|
|
|
|
| 429 |
}, [allItems, q]);
|
| 430 |
|
| 431 |
const scans = overview.data?.live?.scanning ?? [];
|
|
|
|
| 564 |
</div>
|
| 565 |
<div className="mt-6 border-b border-line md:hidden" aria-hidden />
|
| 566 |
|
| 567 |
+
<div
|
| 568 |
+
className="openvuln-scrollbar max-h-[360px] overflow-y-auto overscroll-contain pr-2"
|
| 569 |
+
aria-label="Scanned repository list"
|
| 570 |
+
tabIndex={0}
|
| 571 |
+
>
|
| 572 |
{projects.isLoading ? (
|
| 573 |
<div className="space-y-2 py-5">
|
| 574 |
{Array.from({ length: 5 }).map((_, index) => (
|
|
|
|
| 597 |
)}
|
| 598 |
</div>
|
| 599 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 600 |
</section>
|
| 601 |
</main>
|
| 602 |
|
src/index.css
CHANGED
|
@@ -43,6 +43,28 @@
|
|
| 43 |
.text-balance {
|
| 44 |
text-wrap: balance;
|
| 45 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
}
|
| 47 |
|
| 48 |
@layer components {
|
|
|
|
| 43 |
.text-balance {
|
| 44 |
text-wrap: balance;
|
| 45 |
}
|
| 46 |
+
|
| 47 |
+
.openvuln-scrollbar {
|
| 48 |
+
scrollbar-width: thin;
|
| 49 |
+
scrollbar-color: rgba(237, 239, 244, 0.28) transparent;
|
| 50 |
+
}
|
| 51 |
+
|
| 52 |
+
.openvuln-scrollbar::-webkit-scrollbar {
|
| 53 |
+
width: 6px;
|
| 54 |
+
}
|
| 55 |
+
|
| 56 |
+
.openvuln-scrollbar::-webkit-scrollbar-track {
|
| 57 |
+
background: transparent;
|
| 58 |
+
}
|
| 59 |
+
|
| 60 |
+
.openvuln-scrollbar::-webkit-scrollbar-thumb {
|
| 61 |
+
border-radius: 999px;
|
| 62 |
+
background: rgba(237, 239, 244, 0.28);
|
| 63 |
+
}
|
| 64 |
+
|
| 65 |
+
.openvuln-scrollbar::-webkit-scrollbar-thumb:hover {
|
| 66 |
+
background: rgba(237, 239, 244, 0.42);
|
| 67 |
+
}
|
| 68 |
}
|
| 69 |
|
| 70 |
@layer components {
|