Deploy implemented Videoreg interface and persistent theme cycle

This commit is contained in:
huncode committed 2026-10-27 15:49:46 +03:00
1 parent 6405a8d101
commit a12eefa1de
98 files changed
+4094 -2319

No files matched your search

+1 -37
View File
@@ -1,37 +1 @@
"use client";
import { useState } from "react";
type Frame = { src: string; filename: string; width: number; height: number };
export default function FrameGallery({ frames }: { frames: Frame[] }) {
const [all, setAll] = useState(false);
const visible = all ? frames : frames.slice(0, 6);
return (
<div className="frame-gallery">
<p className="frame-count" role="status">
Показано доступных кадров: {visible.length} из {frames.length}
</p>
<div className="frame-grid">
{visible.map((f, i) => (
<figure key={f.src}>
<a href={f.src} aria-label={"Открыть исходный кадр " + f.filename}>
<img
src={f.src}
width={f.width}
height={f.height}
alt={"Кадр дорожной последовательности " + f.filename}
loading={i < 2 ? "eager" : "lazy"}
/>
</a>
<figcaption>
{f.filename} · {f.width}×{f.height}
</figcaption>
</figure>
))}
</div>
{frames.length > 6 && (
<button type="button" onClick={() => setAll((v) => !v)}>
{all ? "Свернуть серию" : "Показать доступные " + frames.length + " кадров"}
</button>
)}
</div>
);
}
export { FrameGallery as default } from "@/fsd/features/frame-gallery";