Files
fpv-rid-workbench/crates/web-ui/src/workspace.html
T
JiuContinent 7af8fb32cf feat(web-ui): 添加历史轨迹功能与地图适配
- 在 web-ui 中新增历史轨迹查询与回放功能,允许用户查看历史数据。
- 更新 map-loader.js 和 history-map-adapter.js,支持历史轨迹的地图渲染与交互。
- 修改 CSS 文件以改善历史轨迹界面的样式,确保在不同主题下的视觉一致性。
- 在 receivers.js 中更新接收机配置,支持 UID 身份隔离与状态显示优化。
- 在 map_settings.rs 中设置默认经纬度,提升地图初始化体验。
2026-11-02 15:28:01 +08:00

9 lines
17 KiB
HTML

<div class="bg"><img id="workspace-wallpaper" src="/wallpapers/B5-wallpaper.svg" alt="桌面壁纸"></div><header class="reference-top"><div class="row"><button id="toggle-menu" class="reference-icon" aria-label="收起菜单" aria-expanded="true"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.65" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4" width="18" height="16" rx="3"></rect><path d="M9 4v16"></path></svg></button><button type="button" class="workspace-home-link" data-home aria-label="返回应用总览"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" aria-hidden="true"><rect x="3" y="3" width="7" height="7" rx="1"/><rect x="14" y="3" width="7" height="7" rx="1"/><rect x="3" y="14" width="7" height="7" rx="1"/><rect x="14" y="14" width="7" height="7" rx="1"/></svg><span id="workspace-brand">应用</span></button><span class="workspace-crumb-separator" aria-hidden="true">/</span><span class="reference-title" id="reference-title">应用总览</span></div><div class="row"><span class="reference-local"><i></i>本机应用</span><button type="button" class="theme-shortcut" id="theme-shortcut" data-open="settings" aria-controls="appearance-themes" aria-label="当前色调:深海蓝玻璃,打开色调选择"><span class="theme-name" id="theme-name">深海蓝玻璃</span><span class="theme-shortcut-arrow" aria-hidden="true">↗</span></button><span class="top-divider"></span><button class="reference-icon" id="full-screen" aria-label="切换全屏"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.65" stroke-linecap="round" stroke-linejoin="round"><path d="M8 3H3v5m13-5h5v5M3 16v5h5m13-5v5h-5"></path></svg></button><button class="reference-icon" data-open="settings" aria-label="打开壁纸与外观"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.65" stroke-linecap="round" stroke-linejoin="round"><path d="M4 6h7m4 0h5M4 12h2m4 0h10M4 18h10m4 0h2"></path><circle cx="13" cy="6" r="2"></circle><circle cx="8" cy="12" r="2"></circle><circle cx="16" cy="18" r="2"></circle></svg></button></div></header><nav class="reference-rail" aria-label="模块菜单"><button class="rail-brand" data-home="" data-menu="home" aria-label="应用总览"><svg width="21" height="21" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.65" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="7" height="7" rx="1.5"></rect><rect x="14" y="3" width="7" height="7" rx="1.5"></rect><rect x="3" y="14" width="7" height="7" rx="1.5"></rect><rect x="14" y="14" width="7" height="7" rx="1.5"></rect></svg><span class="rail-tooltip">应用总览</span></button><div class="rail-rule"></div><button class="rail-item" data-module="settings" hidden data-open="settings" data-menu="settings" aria-label="壁纸与外观"><svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.65" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="3" y="3" width="18" height="18" rx="3"/><circle cx="8" cy="8" r="1.5"/><path d="m3 17 5-5 4 4 4-6 5 7"/></svg><span class="rail-tooltip">壁纸与外观</span></button><button class="rail-item" data-module="settings" hidden data-open="display" data-menu="display" aria-label="显示方式"><svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.65" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="3" y="3" width="18" height="13" rx="2"/><path d="M8 21h8m-4-5v5M7 7h3M7 7v3m10-3h-3m3 0v3"/></svg><span class="rail-tooltip">显示方式</span></button><button class="rail-item" data-module="settings" hidden data-open="maps" data-menu="maps" aria-label="地图配置"><svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.65" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m3 5 6-2 6 2 6-2v16l-6 2-6-2-6 2V5Zm6-2v16m6-14v16"/></svg><span class="rail-tooltip">地图配置</span></button><button class="rail-item" data-module="realtime" hidden data-open="realtime" data-menu="realtime" aria-label="实时工作台"><svg width="21" height="21" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.65" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="9"></circle><path d="M12 3v9l6-6M3 12h3m12 0h3M12 18v3"></path><circle cx="8" cy="16" r="1"></circle></svg><span class="rail-tooltip">实时工作台</span></button><button class="rail-item" data-module="realtime" hidden data-open="receivers" data-menu="receivers" aria-label="设备管理"><svg width="21" height="21" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.65" stroke-linecap="round" stroke-linejoin="round"><rect x="4" y="14" width="16" height="6" rx="2"/><path d="M8 14V9m8 5V9M5 7a10 10 0 0 1 14 0M8 10a6 6 0 0 1 8 0"/><circle cx="8" cy="17" r=".7"/><path d="M12 17h5"/></svg><span class="rail-tooltip">设备管理</span></button><button id="history-menu" type="button" class="rail-item" data-module="realtime" hidden data-open="history" data-menu="history" aria-label="历史轨迹"><svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.65" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="9"/><path d="M12 7v5l3 2M3 5v4h4"/></svg><span class="rail-tooltip">历史轨迹</span></button><button id="geofence-menu" type="button" class="rail-item" data-module="realtime" hidden data-open="geofences" data-menu="geofences" aria-label="电子围栏"><svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.65" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m12 3 8 5v8l-8 5-8-5V8z"/><path d="m8 10 4-2 4 2v4l-4 2-4-2z"/></svg><span class="rail-tooltip">电子围栏</span></button><button id="rt-blacklist-menu" type="button" class="rail-item" data-module="realtime" hidden data-open="target-lists" data-menu="target-lists" aria-label="黑白名单管理" aria-controls="target-lists-view"><svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.65" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 3 4 6v6c0 5 8 9 8 9s8-4 8-9V6z"/><path d="M12 8v5m0 3h.01"/></svg><span class="rail-tooltip">黑白名单管理</span></button><button class="rail-item" data-module="register" hidden data-open="register" data-menu="register" aria-label="设备登记"><svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.65" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h8M14 3v6h6M14 3l6 6v3M8 12h4m-4 4h3m7-2v7m-3.5-3.5h7"/></svg><span class="rail-tooltip">设备登记</span></button><button class="rail-item" data-module="register" hidden data-open="archives" data-menu="archives" aria-label="本地档案"><svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.65" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 7V5a2 2 0 0 1 2-2h5l2 3h7a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7Z"/><path d="M3 9h18M9 13h6m-6 4h4"/></svg><span class="rail-tooltip">本地档案</span></button></nav><section class="homescreen home-launcher" aria-labelledby="home-heading"><div class="home-space"><div class="home-heading"><h1 id="home-heading">无人机监测系统</h1><p>选择一个应用开始工作。</p></div><div class="home-cards"><button type="button" id="home-app-register" class="home-card" data-open="register" aria-labelledby="home-title-register" aria-describedby="home-desc-register"><img class="home-app-icon" src="/home/register.svg" alt="" aria-hidden="true"><span id="home-title-register" class="home-card-title">设备登记</span><span id="home-desc-register" class="home-card-desc">新建设备、管理档案和登记二维码</span><span class="home-card-preview" aria-hidden="true"><span class="mini registry"><svg class="home-preview-art" viewBox="0 0 300 88" focusable="false"><rect class="preview-sheet" x="13" y="11" width="185" height="70" rx="6"/><rect class="preview-icon-bg" x="24" y="22" width="30" height="30" rx="5"/><path class="preview-symbol" d="M32 30h14m-7-7v14m-9 6h18"/><text class="preview-title" x="64" y="32">设备档案</text><text class="preview-detail" x="64" y="49">身份信息 · 照片</text><path class="preview-lines" d="M24 65h59m9 0h87"/><path class="preview-arrow" d="M205 46h15m-5-5 5 5-5 5"/><rect class="preview-code" x="229" y="21" width="49" height="49" rx="5"/><path class="preview-code-mark" d="M238 30h10v10h-10zM259 30h10v10h-10zM238 51h10v10h-10z"/><path class="preview-code-pixels" d="M258 51h5v5h6v6h-11z"/></svg><span class="home-preview-caption">档案与登记码 · 功能示意</span></span></span><span class="home-card-open" aria-hidden="true">打开<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7"><path d="m9 5 7 7-7 7"/></svg></span></button>
<button type="button" id="home-app-realtime" class="home-card" data-open="realtime" aria-labelledby="home-title-realtime" aria-describedby="home-desc-realtime"><img class="home-app-icon" src="/home/realtime.svg" alt="" aria-hidden="true"><span id="home-title-realtime" class="home-card-title">实时目标</span><span id="home-desc-realtime" class="home-card-desc">查看地图态势、目标与接收器状态</span><span class="home-card-preview" aria-hidden="true"><span class="mini radar"><svg class="home-preview-art" viewBox="0 0 300 88" focusable="false"><defs><pattern id="home-preview-map-grid" width="25" height="25" patternUnits="userSpaceOnUse"><path d="M25 0H0V25" class="preview-map-grid"/></pattern></defs><rect width="300" height="88" fill="url(#home-preview-map-grid)"/><path class="preview-map-roads" d="M-15 66 55 43 101 51 165 14 214 34 310 5M89 0l39 119M233 0l-29 119"/><path class="preview-track" d="m55 77 39-12 33 5 36-25 28-7"/><circle class="preview-target-ring" cx="191" cy="38" r="14"/><path class="preview-target" d="m191 30 7 15-7-3-7 3zM59 67l5 10-5-2-5 2zM246 70l5 10-5-2-5 2z"/></svg><span class="home-preview-caption">地图与目标轨迹 · 功能示意</span></span></span><span class="home-card-open" aria-hidden="true">打开<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7"><path d="m9 5 7 7-7 7"/></svg></span></button>
<button type="button" id="home-app-settings" class="home-card" data-open="settings" aria-labelledby="home-title-settings" aria-describedby="home-desc-settings"><img class="home-app-icon" src="/home/settings.svg" alt="" aria-hidden="true"><span id="home-title-settings" class="home-card-title">设置</span><span id="home-desc-settings" class="home-card-desc">调整壁纸、背景明暗与显示外观</span><span class="home-card-preview" aria-hidden="true"><span class="mini appearance"><span class="home-preview-swatches"><span class="home-preview-swatch"><span class="wall wall-one"></span><span>深色</span></span><span class="home-preview-swatch"><span class="wall wall-two"><span class="home-preview-check">✓</span></span><span>蓝色</span></span><span class="home-preview-swatch"><span class="wall wall-three"></span><span>浅色</span></span></span><span class="home-preview-caption">外观选择 · 功能示意</span></span></span><span class="home-card-open" aria-hidden="true">打开<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7"><path d="m9 5 7 7-7 7"/></svg></span></button></div></div></section><section id="appearance-view" class="workspace-pane" hidden><div class="settings-layout"><section class="setting-content workbench-panel"><header class="setting-panel-head"><h2 id="setting-content-title">壁纸与外观</h2><span>保存在本机</span></header><div class="settings-scroll"><div id="appearance-wallpaper-controls"><section class="appearance-theme-section" aria-labelledby="appearance-themes"><h3 id="appearance-themes" tabindex="-1">界面色调 <span>点击即时预览,自动保存</span></h3><div class="appearance-theme-cards" role="group" aria-labelledby="appearance-themes">
<button type="button" class="appearance-theme-card" data-appearance-theme="graphite" aria-pressed="false" disabled><span class="appearance-theme-sample sample-graphite" aria-hidden="true"><i></i><i></i></span><span class="appearance-theme-check" aria-hidden="true">✓</span><strong>石墨灰</strong><small>中性、沉稳</small></button>
<button type="button" class="appearance-theme-card" data-appearance-theme="blue" aria-pressed="true" disabled><span class="appearance-theme-sample sample-blue" aria-hidden="true"><i></i><i></i></span><span class="appearance-theme-check" aria-hidden="true">✓</span><strong>深海蓝</strong><small>通透、冷静 · 默认</small></button>
<button type="button" class="appearance-theme-card" data-appearance-theme="white" aria-pressed="false" disabled><span class="appearance-theme-sample sample-white" aria-hidden="true"><i></i><i></i></span><span class="appearance-theme-check" aria-hidden="true">✓</span><strong>透明白</strong><small>明亮、轻盈</small></button>
</div></section><div id="appearance-wallpapers" class="section-caption" tabindex="-1">内置壁纸 <span>默认:晴空流光</span></div><div class="wall-grid"><button class="wall-choice" data-wall="B4" type="button"><img src="/wallpapers/B4-wallpaper.svg" alt="科技网格"><span>科技网格</span></button><button class="wall-choice" data-wall="B3" type="button"><img src="/wallpapers/B3-wallpaper.svg" alt="石墨空间玻璃"><span>石墨空间玻璃</span></button><button class="wall-choice " data-wall="B2" type="button"><img src="/wallpapers/B2-wallpaper.svg" alt="午夜蓝丝绸"><span>午夜蓝丝绸</span></button><button class="wall-choice " data-wall="B1" type="button"><img src="/wallpapers/B1-wallpaper.svg" alt="黑曜石柔光"><span>黑曜石柔光</span></button><button class="wall-choice active" data-wall="B5" type="button"><img src="/wallpapers/B5-wallpaper.svg" alt="晴空流光"><span>晴空流光</span></button><button class="wall-choice" data-wall="B6" type="button"><img src="/wallpapers/B6-wallpaper.svg" alt="晨雾青山"><span>晨雾青山</span></button><button class="wall-choice" data-wall="B7" type="button"><img src="/wallpapers/B7-wallpaper.svg" alt="暖沙光影"><span>暖沙光影</span></button></div><input type="file" id="custom-wallpaper" accept="image/jpeg,image/png,image/webp" hidden=""><div class="setting-row"><div><label for="custom-wallpaper">自定义壁纸</label><small>本地图片 · JPG / PNG / WebP · 最大 8 MB</small></div><button type="button" id="choose-wallpaper">选择图片…</button></div></div><div id="appearance-display" class="native-group" tabindex="-1" hidden><div class="setting-row"><div><label for="dim">背景压暗</label><small>明亮壁纸也能保持文字清晰</small></div><div class="row"><input id="dim" type="range" min="0" max="65" value="14"><output id="dim-output" for="dim">14%</output></div></div><div class="setting-row"><div><label for="blur">背景模糊</label><small>只调整壁纸,界面文字保持清晰</small></div><div class="row"><input id="blur" type="range" min="0" max="16" value="0"><output id="blur-output" for="blur">0 px</output></div></div><div class="setting-row"><div><label for="fit">图片显示方式</label><small>可用于调整自定义壁纸</small></div><select id="fit"><option value="cover">铺满屏幕</option><option value="contain">完整显示</option></select></div></div><p class="wall-message" id="wall-message" role="status">更改即时预览,保存成功后供本机所有浏览器共用。</p><div class="setting-actions"><button id="reset-wallpaper" type="button">恢复默认外观</button><span class="setting-status">保存到本机 · 不发送到外部服务</span></div></div></section>
<aside class="settings-preview workbench-panel" aria-labelledby="appearance-preview-title"><header class="setting-panel-head"><h2 id="appearance-preview-title">外观预览</h2><span>即时</span></header><div class="preview-content"><div class="desktop-sample" id="desktop-sample"><img id="appearance-wallpaper" src="/wallpapers/B5-wallpaper.svg" alt="当前壁纸效果"><div class="preview-shade"></div><div class="preview-material"><span>RID 工作空间</span><strong id="appearance-theme-name">深海蓝玻璃</strong><small>与当前设置同步</small></div></div><dl class="preview-values"><div><dt>玻璃材质</dt><dd id="appearance-material">深海蓝 · 高透</dd></div><div><dt>面板不透明度</dt><dd id="appearance-opacity">40%</dd></div><div><dt>当前壁纸</dt><dd id="appearance-wallpaper-name">晴空流光</dd></div><div><dt>背景压暗</dt><dd id="appearance-dim-value">14%</dd></div><div><dt>背景模糊</dt><dd id="appearance-blur-value">0 px</dd></div><div><dt>图片显示方式</dt><dd id="appearance-fit-value">铺满屏幕</dd></div></dl><p class="micro">预览与工作区使用相同外观设置。更改保存成功后供本机浏览器共用。</p></div></aside></div></section>