feat: Web 版独立入口 + SQLite 持久化存储
测试构建 / 代码检查 (push) Has been cancelled
测试构建 / 单元测试和构建 (push) Has been cancelled
测试构建 / 构建验证 (push) Has been cancelled

- 拆分 main.go 为 main_cli.go 和 main_web.go,Web 版不再包含 CLI 参数解析
- Web 版直接启动 HTTP 服务,通过 -port/-lang 控制,无需 -web flag
- 结果存储从内存 map 替换为 SQLite(modernc.org/sqlite,纯 Go 零 CGO)
- 数据库文件 ~/.fscan/results.db,进程重启后结果不丢失
- 修复结果分布面板跟随 tab 筛选联动的问题
This commit is contained in:
ZacharyZcR
2026-06-12 05:17:26 +08:00
parent b94e8bc4ca
commit 683707fcd4
12 changed files with 285 additions and 131 deletions
+2 -2
View File
@@ -53,14 +53,14 @@ export function ResultsPage() {
const fetchResults = useCallback(async () => {
setLoading(true);
try {
const data = await getResults(filter === 'all' ? undefined : filter);
const data = await getResults();
setResults(data.items);
} catch (err) {
console.error('Failed to fetch results:', err);
} finally {
setLoading(false);
}
}, [filter]);
}, []);
useEffect(() => {
fetchResults();