Send user trajectories from the user list into a focused live map

- Open 「用户轨迹」 straight on the live map instead of a drawer, carrying the
  server, the focused user and a start/end window through the plugin page hash.
- Default that window to one hour before the user's last seen time and keep the
  plugin page query available to bundles through the host context.
- Replace the time range preset gate with always visible start/end datetime
  fields plus a quick-range select, so the user list rebuilds from the window.
- Drop the bulky trajectory list and draw one compact colour legend under the
  map, keeping a stable colour per identity and restricting vehicle tracks to
  the vehicles the selected users actually rode.
This commit is contained in:
npc0-hue
2026-09-16 19:35:31 +08:00
parent 6488f6b31d
commit bc45188be9
13 changed files with 220 additions and 74 deletions
@@ -49,6 +49,7 @@ describe("plugin bridge host utilities", () => {
pluginId: "game.example",
routeKey: "logs",
serverInstanceId: "server-1",
pageQuery: {},
themeTokens: { colorScheme: "dark", accentColor: "#22c55e" },
permissions: ["server.logs.read", "server.files.read", "server.artifacts.read", "ai.invoke"],
bridgeActions: ["logs.query", "files.request", "artifacts.open", "ai.invoke"],
+2
View File
@@ -13,6 +13,7 @@ export function createPluginBridgeHostContext(input: {
plugin: PluginBridgeManifestContract;
routeKey: string;
serverInstanceId?: string;
pageQuery?: Record<string, string>;
themeTokens: PluginBridgeThemeTokens;
}): PluginBridgeHostContext {
const page = input.plugin.pages.find((candidate) => candidate.key === input.routeKey);
@@ -26,6 +27,7 @@ export function createPluginBridgeHostContext(input: {
pluginId: input.plugin.id,
routeKey: input.routeKey,
serverInstanceId: input.serverInstanceId,
pageQuery: { ...(input.pageQuery ?? {}) },
themeTokens: input.themeTokens,
permissions,
bridgeActions,