mirror of
https://github.com/hansjone/netx.git
synced 2026-10-10 06:03:17 +08:00
Raise physical canvas capacity and keep region==canvas rules consistent.
Pass view kind into membership so metro maps are not capped at core=80, add region-scoped neighbor projection, and align UI/tests with one physical canvas per region. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
a9a45d39d4
commit
75d03f5f9b
8 changed files with 342 additions and 157 deletions
|
|
@ -1767,9 +1767,14 @@ pre {
|
|||
|
||||
.system-page .token-once {
|
||||
padding: 12px 14px;
|
||||
border: 1px solid #cdd6e2;
|
||||
border: 1px solid rgba(148, 163, 184, 0.22);
|
||||
border-radius: 8px;
|
||||
background: #eef2f7;
|
||||
background: rgba(15, 23, 42, 0.85);
|
||||
color: #e2e8f0;
|
||||
}
|
||||
|
||||
.system-page .token-once .panel__hint {
|
||||
color: #94a3b8;
|
||||
}
|
||||
|
||||
.system-page .token-once code {
|
||||
|
|
@ -1777,7 +1782,11 @@ pre {
|
|||
margin: 8px 0;
|
||||
word-break: break-all;
|
||||
font-size: 12px;
|
||||
color: var(--nm-brand);
|
||||
padding: 8px 10px;
|
||||
border-radius: 6px;
|
||||
border: 1px solid rgba(148, 163, 184, 0.2);
|
||||
background: #0b1220;
|
||||
color: #93c5fd;
|
||||
}
|
||||
|
||||
.system-page .token-create {
|
||||
|
|
@ -1791,9 +1800,10 @@ pre {
|
|||
flex-direction: column;
|
||||
gap: 10px;
|
||||
padding: 12px 14px;
|
||||
border: 1px solid #cdd6e2;
|
||||
border: 1px solid rgba(148, 163, 184, 0.22);
|
||||
border-radius: 8px;
|
||||
background: #f8fafc;
|
||||
background: rgba(15, 23, 42, 0.85);
|
||||
color: #e2e8f0;
|
||||
}
|
||||
|
||||
.system-page .token-scopes__head {
|
||||
|
|
@ -1813,7 +1823,7 @@ pre {
|
|||
align-items: center;
|
||||
gap: 8px;
|
||||
font-size: 13px;
|
||||
color: #334155;
|
||||
color: #cbd5e1;
|
||||
}
|
||||
|
||||
.system-page .token-scopes__grid {
|
||||
|
|
@ -1831,7 +1841,7 @@ pre {
|
|||
align-items: center;
|
||||
gap: 6px;
|
||||
font-size: 12px;
|
||||
color: #334155;
|
||||
color: #cbd5e1;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
|
|
@ -1841,7 +1851,7 @@ pre {
|
|||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-size: 12px;
|
||||
color: #475569;
|
||||
color: #94a3b8;
|
||||
}
|
||||
|
||||
.token-page__title {
|
||||
|
|
|
|||
|
|
@ -1574,7 +1574,11 @@ export function TopologyPage() {
|
|||
}
|
||||
return views.find((v) => !isWorldFlatViewName(v.name)) || null;
|
||||
}
|
||||
return views[0] || null;
|
||||
// Region / 根图: the physical view is the canvas. Custom siblings are rare
|
||||
// extras — never prefer them over physical for the default open target.
|
||||
const physical =
|
||||
views.find((v) => String(v.kind) === "physical") || null;
|
||||
return physical || views[0] || null;
|
||||
}, []);
|
||||
|
||||
const goRegion = useCallback(
|
||||
|
|
@ -2084,11 +2088,12 @@ export function TopologyPage() {
|
|||
folder.external_ref === "ume:world" || folder.name === "UME World";
|
||||
const drillFolder = isWorldDrillFolder(folder);
|
||||
const umeNav = isUmeWorldNavFolder(folder);
|
||||
// Region === canvas: hide physical/custom view rows; only child regions.
|
||||
// Region === canvas: hide the physical primary row (region click opens it),
|
||||
// but keep sibling custom canvases visible (e.g. MCP LPG-Full next to 根图).
|
||||
// UME World container: only「世界地图」as a sibling view.
|
||||
const canvasRegion = isRegionCanvasFolder(folder, String(treeRoot?.id || ""));
|
||||
const visibleViews = canvasRegion
|
||||
? []
|
||||
? (folder.views || []).filter((v) => String(v.kind) !== "physical")
|
||||
: containerFolder
|
||||
? (folder.views || []).filter((v) => isWorldFlatViewName(v.name))
|
||||
: folder.views || [];
|
||||
|
|
|
|||
|
|
@ -360,7 +360,8 @@ export default function TopologyReactFlowView(props: TopologyReactFlowViewProps)
|
|||
connectionLineStyle={{ stroke: "#38bdf8", strokeWidth: 2 }}
|
||||
defaultEdgeOptions={{ type: "straight", labelShowBg: false }}
|
||||
proOptions={{ hideAttribution: true }}
|
||||
minZoom={isWorldFlatCanvas ? 0.002 : 0.05}
|
||||
// Composed metro canvases can span 40k–70k; default 0.05 clips fitView.
|
||||
minZoom={isWorldFlatCanvas || nodes.length >= 400 ? 0.002 : 0.05}
|
||||
maxZoom={isWorldFlatCanvas ? 12 : 4}
|
||||
nodesDraggable={
|
||||
isWorldFlatCanvas
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue