Add CYD browser flasher with Next.js, i18n, and Web Serial install.

Replace the starter app with a public/local flasher that discovers sibling firmwares, supports en/zh, and documents HTTPS deploy.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-19 19:38:53 +08:00
parent 0bf10091db
commit ae63378fdb
39 changed files with 2889 additions and 196 deletions

23
app/[locale]/page.tsx Normal file
View File

@@ -0,0 +1,23 @@
import { getTranslations, setRequestLocale } from "next-intl/server";
import { FlasherPanel } from "@/components/flasher-panel";
type Props = { params: Promise<{ locale: string }> };
export default async function HomePage({ params }: Props) {
const { locale } = await params;
setRequestLocale(locale);
const t = await getTranslations("hero");
return (
<div className="flex flex-col gap-5">
<section className="animate-rise">
<h1 className="m-0 max-w-[18ch] font-[family-name:var(--font-display)] text-[clamp(1.45rem,3.5vw,1.85rem)] font-bold tracking-tight">
{t("title")}
</h1>
<p className="mt-2 max-w-[42rem] text-[var(--muted)]">{t("lede")}</p>
</section>
<FlasherPanel />
</div>
);
}