feat(web-ui): 添加 Windows 系统依赖并更新样式
- 在 Cargo.toml 中为 Windows 平台添加 windows-sys 依赖,版本为 0.52,包含 Win32_Foundation 和 Win32_System_Registry 特性。 - 更新相关 CSS 文件以改善界面样式,确保在不同主题下的视觉一致性。 - 在 JavaScript 文件中实现围栏标记的绘制和管理功能,增强地图交互体验。
This commit is contained in:
@@ -126,7 +126,7 @@ body.b.theme-white :is(.home-card .mini, .wall-choice, .reference-rail .rail-too
|
||||
body.b.theme-white #appearance-view .wall-choice { background: var(--work-input); }
|
||||
body.b.theme-white .reference-rail .rail-tooltip { background: var(--glass-solid); }
|
||||
body.b.theme-white :is(.home-card-title, .home-card-open, .home-heading h1, .reference-title, .setting-panel-head h2, .preview-material strong) { color: var(--work-text); }
|
||||
body.b.theme-white :is(.home-card-desc, .home-heading p, .home-kicker, .home-card .home-preview-caption, .wall-choice span, .preview-values dt, .preview-material span, .preview-material small) { color: var(--work-muted); }
|
||||
body.b.theme-white :is(.home-card-desc, .home-heading p, .home-card .home-preview-caption, .wall-choice span, .preview-values dt, .preview-material span, .preview-material small) { color: var(--work-muted); }
|
||||
body.b.theme-white .home-card .mini.appearance { background: var(--work-input); }
|
||||
body.b.theme-white .gf-stage .maplibregl-ctrl-icon { filter: none; }
|
||||
@supports not ((backdrop-filter: blur(7px)) or (-webkit-backdrop-filter: blur(7px))) {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -6,7 +6,7 @@ let tileBuffer;
|
||||
let map, layer, latest, ids = [], selected = '', pending = false;
|
||||
let frameTimes = [], lastFrame = 0;
|
||||
let marker=null, history=[], lastTrail=0, generations=null, selectedGeneration=null;
|
||||
let centered=false, workerWasmBytes=0, resizeObserver;
|
||||
let centered=false, workerWasmBytes=0, resizeObserver, rawFocus=null;
|
||||
let basemap="imagery",tileRevision=0,mapCreations=0;
|
||||
const basemapLayers={road:["vec_w","cva_w"],imagery:["img_w","cia_w"]};
|
||||
function tileUrl(index){return `/api/maps/tile/${basemapLayers[basemap][index]}/{z}/{x}/{y}${tileRevision?`?v=${tileRevision}`:''}`;}
|
||||
@@ -17,6 +17,47 @@ function located(id,i=ids.indexOf(id)){return i>=0&&latest&&Number.isFinite(late
|
||||
function targetVisible(id,i=ids.indexOf(id)){return (!sourceIds||sourceIds.has(id))&&located(id,i)&&(listFilter==="all"||targetKind(id)===listFilter);}
|
||||
function setClassification(value,filter="all"){classification=new Map(Object.entries(value||{}).filter(([,kind])=>kind==="white"||kind==="black"));listFilter=["white","black","unknown"].includes(filter)?filter:"all";flush();}
|
||||
let occlusion={top:0,right:0,bottom:0,left:0};
|
||||
let fenceEntries=[],fenceMarkers=[];
|
||||
function clearFenceMarkers(){for(const marker of fenceMarkers)marker.remove();fenceMarkers=[];}
|
||||
function fenceRing(geometry){
|
||||
if(!geometry)return null;
|
||||
if(geometry.type==='polygon'&&Array.isArray(geometry.vertices)){
|
||||
const vertices=geometry.vertices.filter(point=>Array.isArray(point)&&Number.isFinite(point[0])&&Number.isFinite(point[1])&&Math.abs(point[0])<=180&&Math.abs(point[1])<=90);
|
||||
return vertices.length>=3?[...vertices,vertices[0]]:null;
|
||||
}
|
||||
const center=geometry.center,radius=geometry.radius_m;
|
||||
if(geometry.type!=='circle'||!Array.isArray(center)||!Number.isFinite(center[0])||!Number.isFinite(center[1])||Math.abs(center[0])>180||Math.abs(center[1])>90||!Number.isFinite(radius)||radius<1||radius>1000000)return null;
|
||||
const delta=radius/6371008.8,a=center[1]*Math.PI/180,b=center[0]*Math.PI/180,points=[];
|
||||
for(let i=0;i<=96;i++){const bearing=i/96*2*Math.PI,p=Math.asin(Math.sin(a)*Math.cos(delta)+Math.cos(a)*Math.sin(delta)*Math.cos(bearing));const q=b+Math.atan2(Math.sin(bearing)*Math.sin(delta)*Math.cos(a),Math.cos(delta)-Math.sin(a)*Math.sin(p));points.push([q*180/Math.PI,p*180/Math.PI]);}
|
||||
return points;
|
||||
}
|
||||
function fenceLabelPoint(geometry){
|
||||
if(geometry?.type==='circle'&&Array.isArray(geometry.center)&&geometry.center.every(Number.isFinite))return geometry.center;
|
||||
const ring=fenceRing(geometry);
|
||||
if(!ring)return null;
|
||||
const unique=ring.slice(0,-1),lon=unique.reduce((sum,point)=>sum+point[0],0)/unique.length,lat=unique.reduce((sum,point)=>sum+point[1],0)/unique.length;
|
||||
return Number.isFinite(lon)&&Number.isFinite(lat)?[lon,lat]:null;
|
||||
}
|
||||
function paintFences(){
|
||||
if(!map?.getSource('fences'))return;
|
||||
clearFenceMarkers();
|
||||
const features=[];
|
||||
for(const fence of fenceEntries){
|
||||
const ring=fenceRing(fence.geometry);
|
||||
if(!ring)continue;
|
||||
const enabled=fence.enabled!==false;
|
||||
features.push({type:'Feature',properties:{id:String(fence.id??''),name:String(fence.name??'围栏'),enabled},geometry:{type:'Polygon',coordinates:[ring]}});
|
||||
const point=fenceLabelPoint(fence.geometry);
|
||||
if(!point)continue;
|
||||
const element=document.createElement('div');
|
||||
element.className='rt-fence-label';
|
||||
element.textContent=fence.name||'围栏';
|
||||
element.dataset.enabled=enabled?'true':'false';
|
||||
fenceMarkers.push(new maplibre.Marker({element,anchor:'center'}).setLngLat(point).addTo(map));
|
||||
}
|
||||
map.getSource('fences').setData({type:'FeatureCollection',features});
|
||||
}
|
||||
function setFences(entries){fenceEntries=Array.isArray(entries)?entries.filter(fence=>fence&&fence.geometry):[];paintFences();}
|
||||
function shader(gl, type, source) {
|
||||
const s=gl.createShader(type);gl.shaderSource(s,source);gl.compileShader(s);
|
||||
if (!gl.getShaderParameter(s,gl.COMPILE_STATUS)) throw new Error(gl.getShaderInfoLog(s));return s;
|
||||
@@ -24,6 +65,7 @@ function shader(gl, type, source) {
|
||||
function create(container,initialBasemap="imagery",preferences=null) {
|
||||
basemap=initialBasemap==="road"?"road":"imagery";mapCreations++;
|
||||
tileBuffer?.destroy();
|
||||
clearFenceMarkers();
|
||||
if (map) map.remove();
|
||||
const initialCenter=preferences&&Number.isFinite(preferences.longitude)&&Number.isFinite(preferences.latitude)?[preferences.longitude,preferences.latitude]:[120.1538,30.2874];
|
||||
// A configured startup camera takes precedence over the legacy first-target fallback.
|
||||
@@ -92,7 +134,10 @@ function create(container,initialBasemap="imagery",preferences=null) {
|
||||
map.addLayer({id:'grid',type:'line',source:'grid',paint:{'line-color':'rgba(48,100,180,0.3)','line-width':1,'line-dasharray':[2,2]}});
|
||||
map.addSource('selected-trail',{type:'geojson',data:{type:'FeatureCollection',features:[]}});
|
||||
map.addLayer({id:'selected-trail',type:'line',source:'selected-trail',paint:{'line-color':'#38bdf8','line-width':3,'line-blur':1}});
|
||||
map.addLayer(layer);flush();
|
||||
map.addSource('fences',{type:'geojson',data:{type:'FeatureCollection',features:[]}});
|
||||
map.addLayer({id:'fence-fill',type:'fill',source:'fences',paint:{'fill-color':['case',['get','enabled'],'#5ba6ed','#8192a5'],'fill-opacity':['case',['get','enabled'],.18,.08]}});
|
||||
map.addLayer({id:'fence-line',type:'line',source:'fences',paint:{'line-color':['case',['get','enabled'],'#9fd4ff','#8192a5'],'line-width':['case',['get','enabled'],2,1.5]}});
|
||||
map.addLayer(layer);paintFences();flush();
|
||||
});
|
||||
map.on('click',event=>{
|
||||
if(!latest)return;let index=-1,distance=18;
|
||||
@@ -108,16 +153,33 @@ function flush(){
|
||||
gl.bindBuffer(gl.ARRAY_BUFFER,layer.instances);gl.bufferSubData(gl.ARRAY_BUFFER,0,data);layer.count=visible;map.triggerRepaint();
|
||||
const index=ids.indexOf(selected);
|
||||
if(index>=0&&targetVisible(selected)){
|
||||
rawFocus=null;
|
||||
const coordinate=[latest[index*4],latest[index*4+1]];
|
||||
if(!marker){const label=document.createElement('div');label.className='rt-target-label';marker=new maplibre.Marker({element:label,anchor:'bottom'}).setLngLat(coordinate).addTo(map);}
|
||||
marker.getElement().textContent=selected+(targetKind(selected)==="black"?" · 黑名单":targetKind(selected)==="white"?" · 白名单":"");marker.getElement().dataset.listKind=targetKind(selected);marker.setLngLat(coordinate);
|
||||
const kind=targetKind(selected);
|
||||
placeMarker(coordinate,selected+(kind==="black"?" · 黑名单":kind==="white"?" · 白名单":""),kind);
|
||||
const now=performance.now();if(now-lastTrail>=100){lastTrail=now;history.push({time:now,coordinate});history=history.filter(p=>now-p.time<30000).slice(-200);
|
||||
map.getSource('selected-trail')?.setData({type:'FeatureCollection',features:history.length<2?[]:[{type:'Feature',properties:{},geometry:{type:'LineString',coordinates:history.map(p=>p.coordinate)}}]});}
|
||||
}else{marker?.remove();marker=null;history=[];map.getSource('selected-trail')?.setData({type:'FeatureCollection',features:[]});}
|
||||
}else if(rawFocus){placeMarker(rawFocus,selected+' · 定位待核实','');history=[];map.getSource('selected-trail')?.setData({type:'FeatureCollection',features:[]});}
|
||||
else{marker?.remove();marker=null;history=[];map.getSource('selected-trail')?.setData({type:'FeatureCollection',features:[]});}
|
||||
}
|
||||
function update(positions,newIds,newGenerations){latest=positions;generations=newGenerations;if(newIds)ids=Array.from(newIds);const selectedIndex=ids.indexOf(selected);const generation=selectedIndex>=0?generations?.[selectedIndex]:null;if(!located(selected)||generation!==selectedGeneration){history=[];lastTrail=0;}selectedGeneration=generation;if(!centered){const i=ids.findIndex(located);if(i>=0){centered=true;focusCoordinate([latest[i*4],latest[i*4+1]], false);}}if(!pending){pending=true;requestAnimationFrame(flush);}}
|
||||
function select(id){if(selected!==id){selected=id;history=[];selectedGeneration=generations?.[ids.indexOf(id)]??null;flush();}const i=ids.indexOf(id);return located(id)?Array.from(latest.slice(i*4,i*4+4)):[];}
|
||||
function metrics(){const sorted=[...frameTimes].sort((a,b)=>a-b);const gl=layer?.gl;const ext=gl?.getExtension('WEBGL_debug_renderer_info');const projected=map&&located(selected)?map.project([latest[ids.indexOf(selected)*4],latest[ids.indexOf(selected)*4+1]]):null;return {tileBuffer:tileBuffer?.metrics(),basemap,mapCreations,camera:map?{center:map.getCenter().toArray(),zoom:map.getZoom(),pitch:map.getPitch(),bearing:map.getBearing()}:null,baseTiles:map?.getSource('tdt-base')?.tiles,labelTiles:map?.getSource('tdt-labels')?.tiles,selectedPixel:projected?{x:projected.x,y:projected.y}:null,occlusion:{...occlusion},mapReady:!!layer?.gl,styleReady:map?.isStyleLoaded()||false,mapCanvasWidth:map?.getCanvas().clientWidth||0,mapCanvasHeight:map?.getCanvas().clientHeight||0,samples:sorted.length,drawSubmissionIntervalP95Ms:sorted[Math.floor(sorted.length*.95)]||0,targets:ids.length,visibleTargets:ids.filter(targetVisible).length,listFilter,classifiedTargets:{white:ids.filter(id=>targetKind(id)==="white").length,black:ids.filter(id=>targetKind(id)==="black").length},renderer:ext?gl.getParameter(ext.UNMASKED_RENDERER_WEBGL):'unavailable',selectedTrailPoints:history.length,workerWasmBytes};}
|
||||
function placeMarker(coordinate,text,kind){
|
||||
if(!marker){
|
||||
const root=document.createElement('div');root.className='rt-target-pin';
|
||||
const label=document.createElement('div');label.className='rt-target-label';
|
||||
const icon=document.createElement('div');icon.className='rt-drone-icon';icon.innerHTML='<svg viewBox="0 0 32 32" width="22" height="22" aria-hidden="true"><path d="M7 7 L25 25 M25 7 L7 25" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round"/><circle cx="7" cy="7" r="3.1" fill="currentColor"/><circle cx="25" cy="7" r="3.1" fill="currentColor"/><circle cx="7" cy="25" r="3.1" fill="currentColor"/><circle cx="25" cy="25" r="3.1" fill="currentColor"/><circle cx="16" cy="16" r="3.3" fill="#f7fbff" stroke="currentColor" stroke-width="1.4"/></svg>';
|
||||
const point=document.createElement('i');point.className='rt-drone-point';
|
||||
root.append(label,icon,point);
|
||||
marker=new maplibre.Marker({element:root,anchor:'bottom'}).setLngLat(coordinate).addTo(map);
|
||||
}
|
||||
const el=marker.getElement();
|
||||
const label=el.querySelector('.rt-target-label');
|
||||
label.textContent=text;label.dataset.listKind=kind||'';el.dataset.listKind=kind||'';
|
||||
marker.setLngLat(coordinate);
|
||||
}
|
||||
function focusRaw(point){const lon=Number(point?.[0]),lat=Number(point?.[1]);if(!map||!selected||!Number.isFinite(lon)||!Number.isFinite(lat)||Math.abs(lon)>180||Math.abs(lat)>90)return;rawFocus=[lon,lat];focusCoordinate(rawFocus);placeMarker(rawFocus,selected+' · 定位待核实','');}
|
||||
function select(id){if(selected!==id){selected=id;history=[];rawFocus=null;selectedGeneration=generations?.[ids.indexOf(id)]??null;flush();}if(located(id)){rawFocus=null;centerSelected();}const i=ids.indexOf(id);return located(id)?Array.from(latest.slice(i*4,i*4+4)):[];}
|
||||
function metrics(){const sorted=[...frameTimes].sort((a,b)=>a-b);const gl=layer?.gl;const ext=gl?.getExtension('WEBGL_debug_renderer_info');const projected=map&&located(selected)?map.project([latest[ids.indexOf(selected)*4],latest[ids.indexOf(selected)*4+1]]):null;return {tileBuffer:tileBuffer?.metrics(),basemap,mapCreations,camera:map?{center:map.getCenter().toArray(),zoom:map.getZoom(),pitch:map.getPitch(),bearing:map.getBearing()}:null,baseTiles:map?.getSource('tdt-base')?.tiles,labelTiles:map?.getSource('tdt-labels')?.tiles,selectedPixel:projected?{x:projected.x,y:projected.y}:null,occlusion:{...occlusion},mapReady:!!layer?.gl,styleReady:map?.isStyleLoaded()||false,mapCanvasWidth:map?.getCanvas().clientWidth||0,mapCanvasHeight:map?.getCanvas().clientHeight||0,samples:sorted.length,drawSubmissionIntervalP95Ms:sorted[Math.floor(sorted.length*.95)]||0,targets:ids.length,visibleTargets:ids.filter(targetVisible).length,listFilter,classifiedTargets:{white:ids.filter(id=>targetKind(id)==="white").length,black:ids.filter(id=>targetKind(id)==="black").length},renderer:ext?gl.getParameter(ext.UNMASKED_RENDERER_WEBGL):'unavailable',selectedTrailPoints:history.length,workerWasmBytes,fences:fenceEntries.length};}
|
||||
function connection(connected){const canvas=document.getElementById('rt-map');if(canvas)canvas.dataset.stale=connected?'false':'true';}
|
||||
function refresh(){tileRevision++;tileBuffer?.schedule();for(const [i,id]of ['tdt-base','tdt-labels'].entries())map?.getSource(id)?.setTiles([tileUrl(i)]);}
|
||||
function setBasemap(value){const next=value==='road'?'road':'imagery';if(next!==basemap){basemap=next;for(const [i,id]of ['tdt-base','tdt-labels'].entries())map?.getSource(id)?.setTiles([tileUrl(i)]);tileBuffer?.schedule();}}
|
||||
@@ -146,4 +208,4 @@ function focusCoordinate(center,animate=true){
|
||||
if(animate)map.flyTo({...options,zoom:Math.max(map.getZoom(),13),duration:400});else map.easeTo({...options,duration:0});
|
||||
}
|
||||
function centerSelected(){if(!map||!latest||!selected)return;const i=ids.indexOf(selected);if(i>=0&&located(selected))focusCoordinate([latest[i*4],latest[i*4+1]]);}
|
||||
window.ridMap={setSources,workerMemory(bytes){if(Number.isFinite(bytes))workerWasmBytes=bytes;},create,update,select,metrics,connection,refresh,setBasemap,setClassification,baseReady,setOcclusion,focusVisible(){requestAnimationFrame(()=>requestAnimationFrame(centerSelected));},zoomIn(){if(map)map.zoomIn();},zoomOut(){if(map)map.zoomOut();},centerSelected,resetBearing(){if(map)map.resetNorthPitch({duration:400});},toggle3d(){if(!map)return;const p=map.getPitch();map.easeTo({pitch:p>10?0:55,duration:500});},destroy(){tileBuffer?.destroy();tileBuffer=null;resizeObserver?.disconnect();resizeObserver=null;marker?.remove();marker=null;history=[];generations=null;selectedGeneration=null;map?.remove();map=null;layer=null;latest=null;ids=[];centered=false;classification=new Map();listFilter="all";sourceIds=null;occlusion={top:0,right:0,bottom:0,left:0};}};
|
||||
window.ridMap={setSources,setFences,workerMemory(bytes){if(Number.isFinite(bytes))workerWasmBytes=bytes;},create,update,select,focusRaw,metrics,connection,refresh,setBasemap,setClassification,baseReady,setOcclusion,focusVisible(){requestAnimationFrame(()=>requestAnimationFrame(centerSelected));},zoomIn(){if(map)map.zoomIn();},zoomOut(){if(map)map.zoomOut();},centerSelected,resetBearing(){if(map)map.resetNorthPitch({duration:400});},toggle3d(){if(!map)return;const p=map.getPitch();map.easeTo({pitch:p>10?0:55,duration:500});},destroy(){clearFenceMarkers();fenceEntries=[];tileBuffer?.destroy();tileBuffer=null;resizeObserver?.disconnect();resizeObserver=null;marker?.remove();marker=null;history=[];rawFocus=null;generations=null;selectedGeneration=null;map?.remove();map=null;layer=null;latest=null;ids=[];centered=false;classification=new Map();listFilter="all";sourceIds=null;occlusion={top:0,right:0,bottom:0,left:0};}};
|
||||
|
||||
@@ -259,6 +259,28 @@ body {
|
||||
background-color: #060b14;
|
||||
}
|
||||
|
||||
.rt-fence-label {
|
||||
max-width: 160px;
|
||||
padding: 2px 8px;
|
||||
overflow: hidden;
|
||||
border: 1px solid rgba(159, 212, 255, 0.72);
|
||||
border-radius: 999px;
|
||||
background: rgba(6, 18, 33, 0.86);
|
||||
color: #e9f0fa;
|
||||
font-size: 11px;
|
||||
line-height: 1.5;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.rt-fence-label[data-enabled="false"] { opacity: 0.55; }
|
||||
body.b.theme-white .rt-fence-label {
|
||||
border-color: rgba(36, 93, 157, 0.45);
|
||||
background: rgba(255, 255, 255, 0.92);
|
||||
color: #1c3348;
|
||||
}
|
||||
|
||||
.mc-map-infobar {
|
||||
position: absolute;
|
||||
bottom: 16px;
|
||||
|
||||
@@ -39,3 +39,58 @@
|
||||
#rx-raw{max-height:min(180px,25dvh);margin:12px 0 0}
|
||||
@media(max-height:600px){.rx-drawer{padding:12px 16px}.rx-drawer-header{margin-bottom:10px}#rx-form{gap:8px}#rx-form input:not([type=checkbox]),#rx-form select{height:32px;min-height:32px}#rx-form .rx-note{padding:6px 8px}}
|
||||
@media(max-width:650px){.rx-toolbar label{flex-basis:100%}.rx-toolbar input{max-width:none}#rx-summary{margin-right:auto}.rx-surface{min-height:calc(100dvh - 195px)}}
|
||||
|
||||
/* Cards sit on a surface that is already translucent. The shared panel token is only 40% opaque, so the card and its buttons were the same wash and the warning text had nothing solid behind it. */
|
||||
.rx-card{background:var(--glass-solid,#0c1c2cf0)}
|
||||
.rx-page .rx-card .rx-actions button{background:color-mix(in srgb,var(--work-text) 8%,var(--glass-solid,#102235))}
|
||||
|
||||
/* Equal-height cards: seven fixed rows, so extra notices cannot change the height. */
|
||||
.rx-legend{display:flex;flex-wrap:wrap;gap:6px 14px;margin:0 0 12px;color:var(--work-muted,#9eb3c8);font-size:12px;line-height:1.4}
|
||||
.rx-legend span{display:inline-flex;align-items:center;min-width:0}
|
||||
.rx-dot{width:8px;height:8px;margin-right:5px;border-radius:99px;background:var(--work-muted,#9eb3c8);flex:none}
|
||||
.rx-dot.ok{background:var(--mc-success,#81d8af)}
|
||||
.rx-dot.info{background:var(--mc-accent,#8bbdff)}
|
||||
.rx-dot.warn{background:var(--mc-warning,#ffd08a)}
|
||||
.rx-cards{grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:14px}
|
||||
.rx-card{display:grid;grid-template-rows:22px 16px 24px 20px 22px auto auto;gap:6px;align-content:start;padding:14px;border-left-width:3px;overflow:hidden}
|
||||
.rx-card>*{min-width:0;min-height:0}
|
||||
.rx-card.rx-ok{border-left-color:var(--mc-success,#81d8af)}
|
||||
.rx-card.rx-warn{border-left-color:var(--mc-warning,#ffd08a)}
|
||||
.rx-card.rx-info{border-left-color:var(--mc-accent,#8bbdff)}
|
||||
.rx-card.rx-idle{border-left-color:color-mix(in srgb,var(--work-muted,#9eb3c8) 55%,transparent)}
|
||||
.rx-card:hover{border-top-color:color-mix(in srgb,var(--mc-accent,#8bbdff) 48%,var(--work-line,#bdd8ff22));border-right-color:color-mix(in srgb,var(--mc-accent,#8bbdff) 48%,var(--work-line,#bdd8ff22));border-bottom-color:color-mix(in srgb,var(--mc-accent,#8bbdff) 48%,var(--work-line,#bdd8ff22))}
|
||||
.rx-card h2{margin:0;height:22px;font-size:15px;font-weight:650;line-height:22px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
||||
.rx-card .rx-place,.rx-card .rx-meta{margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
||||
.rx-card .rx-place{height:16px;color:var(--work-muted,#9eb3c8);font-size:12px;line-height:16px}
|
||||
.rx-card .rx-meta{display:flex;justify-content:space-between;gap:10px;height:20px;font-size:13px;line-height:20px}
|
||||
.rx-card .rx-meta span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
||||
.rx-card .rx-protocol{flex:none;color:var(--work-muted,#9eb3c8)}
|
||||
.rx-pills{display:flex;align-items:center;gap:6px;height:24px;min-width:0}
|
||||
.rx-pill{max-width:100%;height:22px;padding:0 8px;border-radius:999px;font-size:12px;line-height:22px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
||||
.rx-pill.rx-ok{color:var(--mc-success,#81d8af);background:color-mix(in srgb,var(--mc-success,#81d8af) 16%,transparent)}
|
||||
.rx-pill.rx-warn{color:var(--mc-warning,#ffd08a);background:color-mix(in srgb,var(--mc-warning,#ffd08a) 16%,transparent)}
|
||||
.rx-pill.rx-info{color:var(--mc-accent,#8bbdff);background:color-mix(in srgb,var(--mc-accent,#8bbdff) 16%,transparent)}
|
||||
.rx-pill.rx-idle{color:var(--work-muted,#9eb3c8);background:color-mix(in srgb,var(--work-muted,#9eb3c8) 12%,transparent)}
|
||||
.rx-pill.rx-role{flex:none;color:var(--work-muted,#9eb3c8);background:transparent;border:1px solid var(--work-line,#bdd8ff22)}
|
||||
.rx-alert{display:flex;align-items:center;gap:8px;height:22px;min-width:0;color:var(--mc-warning,#ffd08a);font-size:12px}
|
||||
.rx-alert.quiet{color:var(--work-muted,#9eb3c8)}
|
||||
.rx-alert-text{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
||||
.rx-card .rx-more{flex:none;height:20px;padding:0 6px;border-radius:6px;background:transparent;color:var(--mc-warning,#ffd08a);font-size:12px;line-height:18px;white-space:nowrap}
|
||||
.rx-card .rx-metrics{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:0;padding-top:10px}
|
||||
.rx-card .rx-metrics strong{font-size:22px}
|
||||
.rx-card .rx-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:0}
|
||||
.rx-card .rx-actions button{height:32px;padding:0 10px;white-space:nowrap}
|
||||
.rx-pop{position:fixed;z-index:40;width:min(340px,calc(100vw - 24px));padding:10px 12px;border:1px solid var(--work-line,#bdd8ff22);border-radius:10px;background:#102033;color:var(--work-text,#e9f0fa);box-shadow:0 16px 40px #000a}
|
||||
.theme-white .rx-pop{background:#f7fbff;color:#20384f}
|
||||
.rx-pop p{margin:0 0 8px;font-size:12px;line-height:1.55}
|
||||
.rx-pop p:last-child{margin:0}
|
||||
.theme-white .rx-pill.rx-ok{color:#236647;background:#23664718}
|
||||
.theme-white .rx-card.rx-ok{border-left-color:#236647}
|
||||
.theme-white .rx-pill.rx-warn,.theme-white .rx-alert:not(.quiet),.theme-white .rx-card .rx-more{color:#875013}
|
||||
.theme-white .rx-pill.rx-warn{background:#87501316}
|
||||
.theme-white .rx-card.rx-warn{border-left-color:#875013}
|
||||
.theme-white .rx-pill.rx-info{color:#286299;background:#28629916}
|
||||
.theme-white .rx-card.rx-info{border-left-color:#286299}
|
||||
.theme-white .rx-dot.ok{background:#236647}
|
||||
.theme-white .rx-dot.warn{background:#875013}
|
||||
.theme-white .rx-dot.info{background:#286299}
|
||||
|
||||
@@ -5,15 +5,61 @@ const defaults = {enabled:false,transport:'serial',format:'raw',serialPort:'',ba
|
||||
const protocols = {'raw':'原始诊断','uid-json':'UID JSON','rid-device-json':'RID / uav','json-lines':'约定 JSON','postcard':'Postcard'};
|
||||
function state(row) {
|
||||
const s=row.status;
|
||||
if(s?.notice)return s.notice;
|
||||
if(!row.detector && row.deviceKind && !row.config.enabled)return '其他串口 · 未当作侦测机';
|
||||
if(!row.config.enabled)return '未启用';
|
||||
if(s.state==='disconnected')return '连接失败 · 自动重试';
|
||||
if(s.state==='connecting')return '正在连接';
|
||||
if(!s.receivedBytes)return '已连接 · 等待数据';
|
||||
if(!s.receivedBytes)return row.detector?'侦测串口已连接 · 还没有数据':'已连接 · 等待数据';
|
||||
if(Date.now()-(s.lastDataMs||0)>10000)return '连接中 · 暂无新数据';
|
||||
if(row.config.format==='raw')return '接收中 · 原始诊断';
|
||||
if(s.rejectedFrames && !s.decodedFrames)return '收到数据 · 协议不匹配';
|
||||
if(!s.acceptedObservations)return '接收中 · 暂无有效目标';
|
||||
return '接收中 · 已解析目标';
|
||||
if(!s.acceptedObservations)return '正在接收 · 暂无有效目标';
|
||||
return '正在接收 · 已解析目标';
|
||||
}
|
||||
const GB_NOTE='这台设备收到了报文,但帧头不符合它自己的 GB46750 要求,所以不会生成目标。';
|
||||
const UID_NOTE='坐标系待核实 · 原始坐标在目标详情中查看';
|
||||
let popFor=null;
|
||||
function tone(row){
|
||||
if(!row.config?.enabled)return 'idle';
|
||||
const s=row.status||{};
|
||||
if(s.notice||s.state==='disconnected')return 'warn';
|
||||
if(s.state==='connecting'||s.state==='stopped'||!s.receivedBytes)return 'info';
|
||||
if(Date.now()-(s.lastDataMs||0)>10000)return 'info';
|
||||
if(row.config.format==='raw')return 'ok';
|
||||
if(s.rejectedFrames&&!s.decodedFrames)return 'warn';
|
||||
if(!s.acceptedObservations)return 'info';
|
||||
return 'ok';
|
||||
}
|
||||
function cardStatus(row){return row.config?.enabled?state(row):'未启用';}
|
||||
function roleLabel(row){if(row.config.transport!=='serial')return '网络';if(row.detector)return '侦测机';if(row.deviceKind)return '其他串口';return '接收机';}
|
||||
function identity(row){
|
||||
const name=row.name||'未命名接收机',cut=name.indexOf(' · ');
|
||||
const head=cut<0?name:name.slice(0,cut);
|
||||
let place=cut<0?'':name.slice(cut+3);
|
||||
if(!place)place=row.devicePlace||(row.config.transport==='serial'?'—':'网络 · 手动添加');
|
||||
return {head,place};
|
||||
}
|
||||
function endpoint(row){const c=row.config;return c.transport==='serial'?`${c.serialPort||'尚未选择串口'} · ${c.baudRate}`:`${c.transport==='udp'?'UDP':'TCP'} · ${c.bindIp}:${c.port}`;}
|
||||
function faults(row){const list=[];if(row.status?.lastError)list.push(row.status.lastError);if(row.status?.notice)list.push(GB_NOTE);if(row.config.format==='uid-json')list.push(UID_NOTE);return list;}
|
||||
function closePop(){popFor=null;const pop=$('rx-pop');if(pop)pop.hidden=true;}
|
||||
function placePop(anchor){
|
||||
const pop=$('rx-pop');if(!pop||pop.hidden||!anchor)return;
|
||||
const card=anchor.closest('.rx-card');
|
||||
const bounds=(card||anchor).getBoundingClientRect();
|
||||
pop.style.width=`${Math.max(200,Math.min(340,bounds.width))}px`;
|
||||
const w=pop.offsetWidth,h=pop.offsetHeight;
|
||||
let left=Math.min(Math.max(8,bounds.left),window.innerWidth-w-8);
|
||||
let top=bounds.bottom+8;
|
||||
if(top+h>window.innerHeight-8)top=Math.max(8,bounds.top-h-8);
|
||||
pop.style.left=`${left}px`;pop.style.top=`${top}px`;
|
||||
}
|
||||
function openPop(row,anchor){const pop=$('rx-pop');if(!pop)return;pop.replaceChildren(...faults(row).map(text=>el('p',text)));pop.hidden=false;popFor=row.id;placePop(anchor);}
|
||||
function syncPop(list){
|
||||
if(!popFor)return;
|
||||
const row=list.find(item=>item.id===popFor);
|
||||
const anchor=$('rx-cards').querySelector(`[data-rx-alerts="${CSS.escape(popFor)}"]`);
|
||||
if(!row||!anchor)closePop();else openPop(row,anchor);
|
||||
}
|
||||
async function api(url,method='GET',body) {
|
||||
const r=await fetch(url,{method,headers:body?{'Content-Type':'application/json'}:undefined,body:body?JSON.stringify(body):undefined});
|
||||
@@ -23,17 +69,25 @@ function el(tag,text,className) {const e=document.createElement(tag);if(text!==u
|
||||
function render(){
|
||||
const focused=document.activeElement?.dataset.rxFocus;
|
||||
const query=$('rx-search').value.trim().toLowerCase();
|
||||
const list=rows.filter(r=>`${r.name} ${r.id} ${r.config.serialPort} ${r.config.bindIp}`.toLowerCase().includes(query));
|
||||
$('rx-summary').textContent=`${rows.length} 台接收机 · ${rows.filter(r=>r.config.enabled).length} 台已启用`;
|
||||
const list=rows.filter(r=>`${r.name} ${r.deviceKind||''} ${r.devicePlace||''} ${r.id} ${r.hardwareId||''} ${r.config.serialPort} ${r.config.bindIp}`.toLowerCase().includes(query));
|
||||
const watching=rows.filter(r=>r.detector&&r.config.enabled).length;
|
||||
$('rx-summary').textContent=`${rows.length} 个串口 · ${watching} 台侦测机已启用`;
|
||||
$('rx-cards').replaceChildren(...list.map(row=>{
|
||||
const c=el('article',undefined,'rx-card');c.append(el('h2',row.name),el('p',state(row),'rx-badge'));
|
||||
c.append(el('p',row.config.transport==='serial'?`${row.config.serialPort||'尚未选择串口'} · ${row.config.baudRate}`:`${row.config.transport.toUpperCase()} · ${row.config.bindIp}:${row.config.port}`));
|
||||
c.append(el('p',protocols[row.config.format]||row.config.format,'rx-footnote'));
|
||||
if(row.status.lastError)c.append(el('p',row.status.lastError,'rx-warn'));
|
||||
if(row.config.format==='uid-json')c.append(el('p','坐标系待核实 · 原始坐标在目标详情中查看','rx-warn'));
|
||||
const metrics=el('div',undefined,'rx-metrics');for(const [label,value] of [['接收字节',row.status.receivedBytes],['接受更新',row.status.acceptedObservations]]){const m=el('div');m.append(el('strong',Number(value).toLocaleString()),el('span',label));metrics.append(m);}c.append(metrics);
|
||||
const actions=el('div',undefined,'rx-actions'),manage=el('button','配置与诊断'),toggle=el('button',row.config.enabled?'停用':'启用');manage.dataset.rxFocus=row.id+'-manage';toggle.dataset.rxFocus=row.id+'-toggle';manage.onclick=()=>open(row);toggle.disabled=busy;toggle.onclick=async()=>{await mutate(async()=>{await api(`/api/receivers/${row.id}`,'PUT',{name:row.name,config:{...row.config,enabled:!row.config.enabled}});});};actions.append(manage,toggle);c.append(actions);return c;
|
||||
}));$('rx-empty').hidden=!!list.length;
|
||||
const idn=identity(row),toneName=tone(row),lines=faults(row);
|
||||
const c=el('article',undefined,`rx-card rx-${toneName}`);
|
||||
const title=el('h2',idn.head);title.title=row.name||idn.head;
|
||||
const place=el('p',idn.place,'rx-place');place.title=idn.place;
|
||||
const pills=el('div',undefined,'rx-pills'),statusText=cardStatus(row);
|
||||
const status=el('span',statusText,`rx-pill rx-${toneName}`);status.title=statusText;
|
||||
pills.append(status,el('span',roleLabel(row),'rx-pill rx-role'));
|
||||
const meta=el('p',undefined,'rx-meta'),portText=endpoint(row),protocolText=protocols[row.config.format]||row.config.format;
|
||||
const port=el('span',portText);port.title=portText;meta.append(port,el('span',protocolText,'rx-protocol'));
|
||||
const alert=el('div',undefined,lines.length?'rx-alert':'rx-alert quiet');
|
||||
const alertText=el('span',lines.length?lines[0]:'—','rx-alert-text');alertText.title=lines.length?lines[0]:'没有额外提示';alert.append(alertText);
|
||||
if(lines.length>1){const more=el('button',`另 ${lines.length-1} 条`,'rx-more');more.type='button';more.dataset.rxFocus=row.id+'-alerts';more.dataset.rxAlerts=row.id;more.setAttribute('aria-label',`另 ${lines.length-1} 条提示`);more.onclick=event=>{event.stopPropagation();if(popFor===row.id&&!$('rx-pop').hidden)closePop();else openPop(row,more);};alert.append(more);}
|
||||
const metrics=el('div',undefined,'rx-metrics');for(const [label,value] of [['接收字节',row.status?.receivedBytes||0],['接受更新',row.status?.acceptedObservations||0]]){const m=el('div');m.append(el('strong',Number(value).toLocaleString()),el('span',label));metrics.append(m);}
|
||||
const actions=el('div',undefined,'rx-actions'),manage=el('button','配置与诊断'),toggle=el('button',row.config.enabled?'停用':'启用');manage.type='button';toggle.type='button';manage.dataset.rxFocus=row.id+'-manage';toggle.dataset.rxFocus=row.id+'-toggle';manage.onclick=()=>open(row);toggle.disabled=busy;toggle.onclick=async()=>{await mutate(async()=>{await api(`/api/receivers/${row.id}`,'PUT',{name:row.name,config:{...row.config,enabled:!row.config.enabled}});});};actions.append(manage,toggle);c.append(title,place,pills,meta,alert,metrics,actions);return c;
|
||||
}));$('rx-empty').hidden=!!list.length;syncPop(list);
|
||||
if(focused){for(const button of $('rx-cards').querySelectorAll('button')){if(button.dataset.rxFocus===focused){button.focus({preventScroll:true});break;}}}
|
||||
if(selected)diagnostics();
|
||||
}
|
||||
@@ -41,13 +95,17 @@ async function refresh(){if(pending||!$('rx-cards'))return;pending=true;try{cons
|
||||
async function mutate(action){if(busy)return;busy=true;render();try{await action();await refresh();}catch(e){$('rx-error').hidden=false;$('rx-error').textContent=e.message;if($('rx-drawer').open)$('rx-message').textContent=e.message;}finally{busy=false;render();}}
|
||||
function fields(){const f=$('rx-form');$('rx-serial-fields').hidden=f.elements.transport.value!=='serial';$('rx-network-fields').hidden=f.elements.transport.value==='serial';$('rx-protocol-note').textContent=f.elements.format.value==='uid-json'?'UID 报文中的坐标系代码尚未核实:显示原始坐标,不在地图落点、不参与围栏。':f.elements.format.value==='raw'?'原始诊断只接收字节,不生成无人机目标。':'协议必须与设备实际输出一致;未知报文不会猜测为位置。';}
|
||||
function tab(diagnostic){$('rx-form').hidden=diagnostic;$('rx-diagnostic').hidden=!diagnostic;$('rx-config-tab').setAttribute('aria-pressed',String(!diagnostic));$('rx-diagnostic-tab').setAttribute('aria-pressed',String(diagnostic));diagnostics();}
|
||||
function diagnostics(){const row=rows.find(r=>r.id===selected);$('rx-status-label').textContent=row?state(row):'保存接收机后可查看诊断';const s=row?.status;const stats=s?[['接收字节',s.receivedBytes],['解码帧',s.decodedFrames],['接受更新',s.acceptedObservations],['拒绝帧',s.rejectedFrames],['忽略日志',s.ignoredLines],['无效目标',s.invalidTargets],['最近接收',s.lastDataMs?new Date(s.lastDataMs).toLocaleTimeString():'—'],['连接错误',s.lastError||'无']]:[];$('rx-stats').replaceChildren(...stats.flatMap(([k,v])=>[el('dt',k),el('dd',String(v))]));$('rx-capture').disabled=!row;}
|
||||
function open(row){selected=row?.id||null;dirty=false;$('rx-title').textContent=row?.name||'添加接收机';$('rx-message').textContent='';$('rx-raw').textContent='尚未读取。最多显示最近 4 KiB。';const f=$('rx-form'),config=row?.config||defaults;f.elements.name.value=row?.name||'';for(const [key,value] of Object.entries(config)){if(key==='enabled')f.elements[key].checked=value;else f.elements[key].value=value;}$('rx-delete').hidden=!selected||selected==='default';fields();tab(false);$('rx-drawer').showModal();f.elements.name.focus();api('/api/receiver/ports').then(v=>$('rx-port-options').replaceChildren(...v.ports.map(p=>{const o=el('option');o.value=p;return o;}))).catch(()=>{});}
|
||||
function diagnostics(){const row=rows.find(r=>r.id===selected);$('rx-status-label').textContent=row?state(row):'保存接收机后可查看诊断';const s=row?.status;const stats=s?[['设备种类',row.deviceKind||'—'],['插口位置',row.devicePlace||'—'],['设备 ID',row.hardwareId||row.id],['接收字节',s.receivedBytes],['解码帧',s.decodedFrames],['接受更新',s.acceptedObservations],['拒绝帧',s.rejectedFrames],['忽略日志',s.ignoredLines],['无效目标',s.invalidTargets],['最近接收',s.lastDataMs?new Date(s.lastDataMs).toLocaleTimeString():'—'],['连接错误',s.lastError||'无']]:[];$('rx-stats').replaceChildren(...stats.flatMap(([k,v])=>[el('dt',k),el('dd',String(v))]));$('rx-capture').disabled=!row;}
|
||||
function open(row){closePop();selected=row?.id||null;dirty=false;$('rx-title').textContent=row?.name||'添加接收机';$('rx-message').textContent='';$('rx-raw').textContent='尚未读取。最多显示最近 4 KiB。';const f=$('rx-form'),config=row?.config||defaults;f.elements.name.value=row?.name||'';for(const [key,value] of Object.entries(config)){if(key==='enabled')f.elements[key].checked=value;else f.elements[key].value=value;}$('rx-delete').hidden=!selected||selected==='default';fields();tab(false);$('rx-drawer').showModal();f.elements.name.focus();api('/api/receiver/ports').then(v=>$('rx-port-options').replaceChildren(...v.ports.map(p=>{const o=el('option');o.value=p;return o;}))).catch(()=>{});}
|
||||
function close(){if(dirty&&!confirm('尚有未保存的配置,放弃修改并关闭?'))return;$('rx-drawer').close();selected=null;dirty=false;}
|
||||
function init(){if(initialized||!$('rx-cards'))return;initialized=true;$('rx-add').onclick=()=>open(null);$('rx-refresh').onclick=refresh;$('rx-search').oninput=render;$('rx-close').onclick=close;$('rx-drawer').addEventListener('cancel',e=>{e.preventDefault();close();});$('rx-form').oninput=()=>{dirty=true;fields();};$('rx-form').onchange=()=>{dirty=true;fields();};$('rx-config-tab').onclick=()=>tab(false);$('rx-diagnostic-tab').onclick=()=>tab(true);
|
||||
$('rx-form').onsubmit=async e=>{e.preventDefault();if(busy)return;const f=e.target,config={};for(const key of Object.keys(defaults))config[key]=key==='enabled'?f.elements[key].checked:['baudRate','port'].includes(key)?Number(f.elements[key].value):f.elements[key].value;await mutate(async()=>{const v=await api(selected?`/api/receivers/${selected}`:'/api/receivers',selected?'PUT':'POST',{name:f.elements.name.value,config});selected=v.receiver.id;dirty=false;$('rx-message').textContent='配置已保存。接收状态以实时诊断为准。';$('rx-title').textContent=v.receiver.name;$('rx-delete').hidden=selected==='default';});};
|
||||
$('rx-delete').onclick=()=>{if(!selected||!confirm('删除此接收机配置并停止该接收任务?其他接收机不受影响。'))return;mutate(async()=>{await api(`/api/receivers/${selected}`,'DELETE');dirty=false;close();});};
|
||||
$('rx-capture').onclick=async()=>{if(!selected)return;try{const v=await api(`/api/receivers/${selected}/capture`);const bytes=Uint8Array.from((v.data.match(/[0-9a-f]{2}/ig)||[]).map(x=>parseInt(x,16)));$('rx-raw').textContent=`UTF-8(损坏字节以替代符显示)\n${new TextDecoder().decode(bytes)}\n\nHEX\n${v.data||'尚无数据'}`;}catch(e){$('rx-message').textContent=e.message;}};
|
||||
document.addEventListener('click',event=>{if(!popFor||event.target.closest('#rx-pop, [data-rx-alerts]'))return;closePop();});
|
||||
document.addEventListener('keydown',event=>{if(event.key==='Escape')closePop();});
|
||||
const movePop=()=>{if(!popFor)return;const anchor=document.querySelector(`[data-rx-alerts="${CSS.escape(popFor)}"]`);if(anchor)placePop(anchor);};
|
||||
window.addEventListener('resize',movePop);document.addEventListener('scroll',movePop,true);
|
||||
refresh();setInterval(()=>{if(document.body.dataset.screen==='receivers')refresh();},1500);
|
||||
}
|
||||
document.addEventListener('DOMContentLoaded',init);window.addEventListener('rid-workspace-view',()=>{init();if(document.body.dataset.screen==='receivers')refresh();});init();
|
||||
|
||||
@@ -75,3 +75,12 @@ body.b[data-screen=realtime] .live-panel-restores{top:64px;left:calc(var(--navig
|
||||
/* Keep location availability visible even when a long device identity is truncated. */
|
||||
.rt-device-id { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.rt-position-state { display: block; color: var(--work-muted); font-size: 11px; line-height: 1.5; }
|
||||
|
||||
/* A backdrop-filter on the panel itself makes Chromium paint the native source menu inside the filtered layer, so the open list is clipped and transparent. Frost the panel from a pseudo-element instead. */
|
||||
body.b .mc-layout-b .mc-floating-panel { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
|
||||
body.b .mc-layout-b .mc-floating-panel::before { content: ""; position: absolute; inset: 0; z-index: 0; border-radius: inherit; pointer-events: none; background: var(--glass-surface); backdrop-filter: var(--glass-filter); -webkit-backdrop-filter: var(--glass-filter); }
|
||||
body.b .mc-layout-b .mc-floating-panel > * { position: relative; z-index: 1; }
|
||||
body.b .mc-layout-b .live-list-controls select { display: block; width: 100%; height: 34px; min-height: 34px; margin: 4px 0 0; padding: 0 8px; box-sizing: border-box; border: 1px solid var(--work-line); border-radius: 8px; background-color: var(--work-input); color: var(--work-text); font: inherit; font-size: 12px; font-weight: 400; line-height: 1.4; overflow-wrap: normal; white-space: nowrap; color-scheme: dark; }
|
||||
body.b.theme-white .mc-layout-b .live-list-controls select { color-scheme: light; }
|
||||
body.b .mc-layout-b .live-list-controls select option { background-color: #061221; color: #e9f0fa; font-weight: 400; line-height: normal; }
|
||||
body.b.theme-white .mc-layout-b .live-list-controls select option { background-color: #f4f8ff; color: #243b57; }
|
||||
|
||||
@@ -8,7 +8,6 @@ body[data-screen=home] .home-launcher.homescreen {
|
||||
body[data-screen=home] :is(.reference-rail, #toggle-menu) { display: none; }
|
||||
.home-space { width: 100%; max-width: 1170px; }
|
||||
.home-heading { text-align: center; }
|
||||
.home-kicker { color: var(--work-muted); font-size: 11px; letter-spacing: .14em; margin-bottom: 10px; }
|
||||
.home-heading h1 { font-size: 27px; }
|
||||
.home-cards { gap: 20px; }
|
||||
.home-card { min-height: 370px; padding: 25px; }
|
||||
@@ -72,10 +71,17 @@ body:is([data-screen=register], [data-screen=archives]) .registry-workspace .reg
|
||||
body:is([data-screen=register], [data-screen=archives]) .registry-workspace #registration-result {
|
||||
padding: 0; margin: 0; overflow: auto; scroll-padding-top: 60px; scrollbar-width: thin;
|
||||
}
|
||||
#registration-result > h2 {
|
||||
#registration-result > .result-heading {
|
||||
position: sticky; top: 0; z-index: 2; padding: 17px 20px; min-height: 54px;
|
||||
background: var(--glass-solid); border-bottom: 1px solid var(--work-line);
|
||||
display: flex; align-items: center; justify-content: space-between; gap: 12px;
|
||||
}
|
||||
#registration-result > .result-heading h2 { margin: 0; font-size: 16px; }
|
||||
#close-archive-detail {
|
||||
height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--work-line);
|
||||
background: transparent; color: var(--work-text); font-size: 12px; flex-shrink: 0;
|
||||
}
|
||||
.result-fpv-label { margin: 0; font-size: 11px; letter-spacing: .04em; color: var(--work-muted); }
|
||||
.registry-workspace #registration-result .empty-state {
|
||||
display: flex; flex-direction: column; align-items: flex-start; padding: 24px 20px; gap: 16px;
|
||||
}
|
||||
@@ -175,7 +181,7 @@ body:is([data-screen=register], [data-screen=archives]) .registry-workspace #reg
|
||||
body:is([data-screen=register], [data-screen=archives]) .registry-workspace .registration-savebar { position: sticky; bottom: 0; padding: 14px 16px; z-index: 3; }
|
||||
.registry-workspace #register-button { width: 100%; }
|
||||
body:is([data-screen=register], [data-screen=archives]) .registry-workspace #registration-result { order: 2; flex-shrink: 0; overflow: visible; }
|
||||
#registration-result > h2 { position: static; }
|
||||
#registration-result > .result-heading { position: static; }
|
||||
.registry-workspace #registration-result .empty-state { flex-direction: column; }
|
||||
#appearance-view .settings-layout { display: flex; flex-direction: column; padding: 16px; gap: 16px; }
|
||||
#appearance-view .settings-sidebar { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; padding: 10px; flex-shrink: 0; }
|
||||
@@ -210,3 +216,31 @@ body[data-screen=archives] .registry-workspace .history-panel { grid-row: auto;
|
||||
body[data-screen=register] .registry-workspace #registration-result { grid-column: auto; }
|
||||
body[data-screen=archives] .registry-workspace .history-panel { min-height: 420px; }
|
||||
}
|
||||
body[data-screen=archives][data-archive-detail=open] .registry-workspace {
|
||||
display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr);
|
||||
grid-template-rows: minmax(0, 1fr); height: 100%; max-height: 100%; overflow: hidden;
|
||||
}
|
||||
body[data-screen=archives][data-archive-detail=open] .registry-workspace :is(.history-panel, #registration-result) {
|
||||
height: auto; max-height: none; min-height: 0; position: static;
|
||||
}
|
||||
body[data-screen=archives][data-archive-detail=open] #registration-result .record-result {
|
||||
display: grid; grid-template-columns: 220px minmax(280px, 480px); justify-content: center; align-items: start;
|
||||
column-gap: 36px; row-gap: 12px; padding: 28px 32px 36px;
|
||||
}
|
||||
body[data-screen=archives][data-archive-detail=open] #registration-result .qr-stage { grid-column: 1; grid-row: 1 / span 8; width: 200px; justify-self: center; }
|
||||
body[data-screen=archives][data-archive-detail=open] #registration-result .record-result > :not(.qr-stage) { grid-column: 2; min-width: 0; }
|
||||
body[data-screen=archives][data-archive-detail=open] #registration-result .result-fields { display: flex; flex-direction: column; gap: 14px; }
|
||||
body[data-screen=archives][data-archive-detail=open] #registration-result .result-fields dd { font-size: 15px; }
|
||||
body[data-screen=archives][data-archive-detail=open] #registration-result .result-actions { flex-direction: row; flex-wrap: wrap; }
|
||||
body[data-screen=archives][data-archive-detail=open] #registration-result .result-actions :is(button, a) { flex: 1 1 160px; width: auto; }
|
||||
@container workbench (max-width: 860px) {
|
||||
body[data-screen=archives][data-archive-detail=open] .registry-workspace {
|
||||
display: flex; flex-direction: column; height: auto; max-height: none; overflow: visible;
|
||||
}
|
||||
body[data-screen=archives][data-archive-detail=open] .registry-workspace #registration-result { order: 0; flex: none; overflow: visible; }
|
||||
body[data-screen=archives][data-archive-detail=open] .registry-workspace .history-panel {
|
||||
order: 1; height: 320px; min-height: 0; max-height: 320px; flex-shrink: 0;
|
||||
}
|
||||
body[data-screen=archives][data-archive-detail=open] #registration-result .record-result { display: flex; flex-direction: column; align-items: stretch; }
|
||||
body[data-screen=archives][data-archive-detail=open] #registration-result .qr-stage { width: 180px; align-self: flex-start; }
|
||||
}
|
||||
|
||||
@@ -6,6 +6,15 @@
|
||||
.mc-layout-b .mc-map-toolstrip{background:var(--work-panel);border-color:var(--work-line)}
|
||||
.mc-layout-b .mc-map-toolstrip button{color:var(--work-text)}
|
||||
.rt-target-label{color:#e4f0ff!important;background:#10223ed9;border:1px solid #8aaccb50;border-radius:6px;padding:4px 7px;font-size:13px}
|
||||
.rt-target-pin{display:flex;flex-direction:column;align-items:center;gap:4px;pointer-events:none}
|
||||
.rt-target-pin .rt-target-label{max-width:220px}
|
||||
.rt-drone-icon{display:grid;place-items:center;width:36px;height:36px;border-radius:50%;color:#d7f2ff;background:#0c2036ee;border:2px solid #7ec8ff;box-shadow:0 0 0 4px #38bdf833,0 8px 16px #0008}
|
||||
.rt-drone-icon svg{display:block}
|
||||
.rt-drone-point{width:8px;height:8px;margin-top:-2px;border-radius:50%;background:#fff;box-shadow:0 0 0 3px #38bdf8}
|
||||
.rt-target-pin[data-list-kind=black] .rt-drone-icon{color:#ffd4ce;border-color:#ffb1a9;box-shadow:0 0 0 4px #ff6b6333,0 8px 16px #0008}
|
||||
.rt-target-pin[data-list-kind=black] .rt-drone-point{box-shadow:0 0 0 3px #ffb1a9}
|
||||
.rt-target-pin[data-list-kind=white] .rt-drone-icon{color:#dff8ee;border-color:#9edac1;box-shadow:0 0 0 4px #69bd9733,0 8px 16px #0008}
|
||||
.rt-target-pin[data-list-kind=white] .rt-drone-point{box-shadow:0 0 0 3px #9edac1}
|
||||
.setting-row label{color:var(--work-text)!important;font-size:14px}
|
||||
.live-events{display:flex;flex-wrap:wrap;gap:10px 28px;list-style:none;padding:10px 0;margin:0;font-size:12px;line-height:1.8;color:var(--work-muted)}
|
||||
.live-events li{border-left:1px solid var(--work-line);padding-left:12px}
|
||||
|
||||
Reference in New Issue
Block a user