feat(web-ui): 新增首页启动器与地图遮挡感知交互

- 添加首页卡片式应用启动器界面,包含实时视图、登记、
  设置三个入口及对应 SVG 图标资源
- 地图组件新增 ResizeObserver 自动适配容器尺寸变化
- 地图组件引入遮挡区域(occlusion)管理,聚焦时自动
  计算可见填充偏移,避免目标被面板遮挡
- 将地图加载事件从 load 改为 style.load,提升初始化
  可靠性
- 扩展 metrics 接口,返回选中目标像素坐标、遮挡状态、
  画布尺寸等运行时诊断信息
- 补充 web-sys features(HtmlImageElement, Storage,
  PointerEvent, DomRect 等)以支持新 UI 交互
- index.html 新增 workspace/home/registry 样式及资源引用
- .gitignore 忽略 previews 目录与本地编译产物
```
This commit is contained in:
2026-10-22 13:43:58 +08:00
parent 1dfcdb619c
commit 91059cf395
44 changed files with 2787 additions and 3390 deletions
+17 -2
View File
@@ -1,3 +1,4 @@
mod appearance;
mod archive;
mod error;
mod http;
@@ -56,7 +57,21 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
}
}
}
let listener = tokio::net::TcpListener::bind("127.0.0.1:8787")
// Isolated browser acceptance can coexist with an already running application.
// This override is intentionally available only with the synthetic-input opt-in.
let port = if simulation_api {
std::env::var("RID_TEST_PORT")
.ok()
.map(|p| p.parse::<u16>())
.transpose()?
.unwrap_or(8787)
} else {
8787
};
if port == 0 {
return Err("监听端口不能为零".into());
}
let listener = tokio::net::TcpListener::bind(("127.0.0.1", port))
.await
.map_err(|e| format!("无法监听 8787,请关闭旧版或其他实例:{e}"))?;
std::fs::create_dir_all(root.join("registry/data"))?;
@@ -83,7 +98,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
}
}
});
println!("FPV-RID Rust 登记站:http://127.0.0.1:8787");
println!("FPV-RID Rust 登记站:http://127.0.0.1:{port}");
let live_store = realtime::new_store();
let receivers = receiver::router(map_root.clone(), live_store.clone()).await;
let app = http::router(Worker(tx))