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

44
messages/en.json Normal file
View File

@@ -0,0 +1,44 @@
{
"meta": {
"title": "CYD Flasher — Flash Cheap Yellow Display in the browser",
"description": "Web Serial installer for ESP32-2432S028 (CYD). Pick a firmware and flash over USB from Chrome or Edge."
},
"brand": {
"name": "CYD Flasher",
"tagline": "Browser serial flash · ESP32-2432S028"
},
"hero": {
"title": "Pick firmware, plug in USB, flash once",
"lede": "Scans local CYD project firmwares and writes them over Web Serial from your browser."
},
"browser": {
"unsupported": "Chrome or Edge with Web Serial is required. Open this site on HTTPS or http://localhost."
},
"firmware": {
"title": "Available firmware",
"refresh": "Refresh",
"scanning": "Scanning…",
"empty": "No firmware found. Ensure complete firmware/*/…bin packages exist, or set CYD_FIRMWARE_ROOT.",
"error": "Scan failed: {message}",
"noneSelected": "No firmware selected",
"selectedLabel": "Selected:"
},
"install": {
"cta": "Connect & flash",
"steps": {
"1": "Connect CYD with a data USB cable (not charge-only).",
"2": "Select a firmware above.",
"3": "Click Connect & flash, then choose the serial port (CH340 / CP210x).",
"4": "Wait for progress to finish — the board reboots automatically."
}
},
"lang": {
"label": "Language",
"en": "English",
"zh": "中文"
},
"footer": {
"offsets": "Flash @ 0x1000 / 0x8000 / 0xe000 / 0x10000",
"stack": "Powered by esp-web-tools · Web Serial flash for ESP32"
}
}

44
messages/zh.json Normal file
View File

@@ -0,0 +1,44 @@
{
"meta": {
"title": "CYD Flasher — 浏览器刷写 Cheap Yellow Display",
"description": "面向 ESP32-2432S028(CYD)的 Web Serial 刷机站。在 Chrome / Edge 中选择固件并通过 USB 刷入。"
},
"brand": {
"name": "CYD Flasher",
"tagline": "浏览器串口刷机 · ESP32-2432S028"
},
"hero": {
"title": "选固件,插上 USB,一键刷入",
"lede": "自动扫描本机 CYD 项目预编译包,在浏览器里通过 Web Serial 写入固件。"
},
"browser": {
"unsupported": "需要支持 Web Serial 的 Chrome 或 Edge。请通过 HTTPS 或 http://localhost 打开本页。"
},
"firmware": {
"title": "可用固件",
"refresh": "刷新",
"scanning": "正在扫描…",
"empty": "未找到固件。请确认存在完整的 firmware/*/…bin,或设置 CYD_FIRMWARE_ROOT。",
"error": "扫描失败:{message}",
"noneSelected": "尚未选择固件",
"selectedLabel": "已选:"
},
"install": {
"cta": "连接并刷写",
"steps": {
"1": "用 USB 线连接 CYD(数据口,非仅充电)。",
"2": "选择上方固件。",
"3": "点「连接并刷写」,在弹窗中选串口(常见 CH340 / CP210x)。",
"4": "等待进度完成,板子会自动重启。"
}
},
"lang": {
"label": "语言",
"en": "English",
"zh": "中文"
},
"footer": {
"offsets": "刷写地址 @ 0x1000 / 0x8000 / 0xe000 / 0x10000",
"stack": "基于 esp-web-tools · 浏览器串口刷写 ESP32"
}
}