feat(web-ui): 重构地图设置与目标列表页面并优化实时地图导航体验

- 重构地图设置页面布局,采用 flex 替代 grid,新增导航栏、标签页
  和下载步骤组件,改善响应式断点适配
- 将目标列表管理从侧边抽屉方案改为全页面内联编辑器,包含表格视图
  与分类侧栏,支持移动端卡片式降级展示
- 为实时地图屏幕添加半透明毛玻璃导航栏样式,支持 backdrop-filter
  降级,并在地图模式下调整内容区域偏移量
- 修复地图渲染器在画布尺寸为 0 时的边界异常,增加宽高校验
- 优化 fitBounds 的 padding 计算,改为基于容器宽度的比例值并
  限制最大值,避免小屏下地图偏移过大
- 新增 B5、B6、B7 三组 SVG 壁纸资源
```
This commit is contained in:
2026-10-23 14:50:27 +08:00
parent cd1b717e74
commit 461e2c8e7f
29 changed files with 910 additions and 319 deletions
+2 -12
View File
@@ -1,5 +1,5 @@
//! Map-overlay workspace: observed telemetry and actual local registration records only.
use super::target_lists::{Badge, Filter, Lists, Manager};
use super::target_lists::{Badge, Filter, Lists};
use gloo_timers::future::TimeoutFuture;
use leptos::prelude::*;
use rid_shared::target_lists::ListKind;
@@ -137,9 +137,8 @@ fn map_label(value: &Value, kind: &str) -> String {
}
}
#[component]
pub fn Realtime() -> impl IntoView {
pub fn Realtime(lists: Lists) -> impl IntoView {
let ids = RwSignal::new(Vec::<String>::new());
let lists = Lists::new();
let classification = Memo::new(move |_| {
lists
.snapshot
@@ -177,7 +176,6 @@ pub fn Realtime() -> impl IntoView {
.min(filtered.get().len().div_ceil(100).max(1) - 1)
});
let choose = move |id: String| {
lists.open.set(false);
layout.select();
if selected.get_untracked() != id {
selected.set(id.clone());
@@ -265,13 +263,6 @@ pub fn Realtime() -> impl IntoView {
}
});
let stopped = Rc::new(Cell::new(false));
let list_stop = stopped.clone();
spawn_local(async move {
while !list_stop.get() {
lists.refresh().await;
gloo_timers::future::TimeoutFuture::new(5000).await;
}
});
let alert_stop = stopped.clone();
spawn_local(async move {
let mut cursor = 0u64;
@@ -662,7 +653,6 @@ pub fn Realtime() -> impl IntoView {
<p class="live-data-label">"未收到的字段显示 —。未匹配本地记录不代表违法或未官方备案。"</p>
</div><div class="mc-btn-row"><button class="primary" disabled=move||position.get().is_none() on:click=move |_|layout.focus()>"聚焦此目标"</button><a class="mc-btn mc-btn-secondary" aria-disabled=move||selected.get().is_empty().to_string() tabindex=move||if selected.get().is_empty(){-1}else{0} href=move||if selected.get().is_empty(){None}else{Some(format!("/?app=register&q={}",js_sys::encode_uri_component(&selected.get())))}>"查看本地登记"</a></div>
</aside>
<Manager lists=lists/>
<section id="rt-dock" class="mc-hud-dock" tabindex="-1" aria-label="事件与接收器" hidden=move||!layout.dock_visible()>
<div class="live-resizer" role="separator" tabindex="0" aria-label="调整底栏高度" aria-orientation="horizontal" aria-valuemin="100" aria-valuemax=move||layout.maximum.get().round().to_string() aria-valuenow=move||layout.height.get().round().to_string()
on:pointerdown=move |e|{if e.button()!=0{return}