- 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.
79 lines
2.1 KiB
TypeScript
79 lines
2.1 KiB
TypeScript
import type { ComponentType } from "react";
|
|
|
|
import type { UserProfileUpdateRequest, UserThemePreferenceRequest, UserThemePreferenceResponse } from "../api/types";
|
|
import type { CurrentUserView, WorkspaceCapability } from "./workspace";
|
|
import type { OperationTracker } from "../stores/operations";
|
|
|
|
export type PageId = "home" | "servers" | "serverDetail" | "pluginPage" | "plugins" | "users" | "aiProviders" | "maintenance" | "profileSettings";
|
|
|
|
export interface PageParams {
|
|
serverId?: string;
|
|
pluginId?: string;
|
|
routeKey?: string;
|
|
pageQuery?: Record<string, string>;
|
|
}
|
|
|
|
export interface PageRoute {
|
|
id: PageId;
|
|
label: string;
|
|
path: string;
|
|
hash: string;
|
|
description: string;
|
|
requiredCapability: WorkspaceCapability;
|
|
showInNav: boolean;
|
|
}
|
|
|
|
export interface PageComponentProps {
|
|
session: CurrentUserView;
|
|
params: PageParams;
|
|
operations: OperationTracker;
|
|
onNavigate: (pageId: PageId, params?: PageParams) => void;
|
|
onLogout: () => Promise<void>;
|
|
onProfileSave: (request: UserProfileUpdateRequest) => Promise<CurrentUserView>;
|
|
onThemePreferenceSave: (request: UserThemePreferenceRequest) => Promise<UserThemePreferenceResponse>;
|
|
}
|
|
|
|
export type PageComponent = ComponentType<PageComponentProps>;
|
|
|
|
export interface PageMetric {
|
|
label: string;
|
|
value: string;
|
|
tone: "neutral" | "success" | "warning";
|
|
}
|
|
|
|
export interface ShellSummaryItem {
|
|
label: string;
|
|
value: string;
|
|
detail: string;
|
|
tone: PageMetric["tone"];
|
|
}
|
|
|
|
export interface ServerInstanceView {
|
|
id: string;
|
|
name: string;
|
|
plugin: string;
|
|
runEndpoint: string;
|
|
state: "draft" | "installing" | "ready" | "running" | "stopped" | "failed" | "deleted";
|
|
pendingJobs: number;
|
|
latestLog: string;
|
|
}
|
|
|
|
export interface PluginCatalogItem {
|
|
id: string;
|
|
name: string;
|
|
version: string;
|
|
serverType: string;
|
|
status: "installed" | "disabled" | "invalid" | "updating";
|
|
permissions: string[];
|
|
bridgeActions: string[];
|
|
validation: string;
|
|
}
|
|
|
|
export interface UserAccessView {
|
|
id: string;
|
|
displayName: string;
|
|
status: "active" | "disabled" | "pending";
|
|
roles: string[];
|
|
review: string;
|
|
}
|