feat: redesign floating workspace interactions

This commit is contained in:
2026-08-19 14:12:08 +08:00
parent 1068304da5
commit be7b4149f2
9 changed files with 210 additions and 281 deletions
@@ -7,6 +7,7 @@ import {
Eye,
EyeOff,
FlaskConical,
Sparkles,
type LucideIcon
} from "lucide-react";
import { MAP_ICON_CELL_RADIUS_CLASS_NAME } from "@/features/map/core";
@@ -40,6 +41,7 @@ export type WorkbenchTopBarProps = {
onCompareScenario: () => void;
onExportScenarioReport: () => void;
onAnalyzeAlertsWithAgent: () => void | Promise<void>;
onCreateTestAnalysis?: () => void;
onShowDataStatus: () => void;
onRefreshTiles: () => void;
onShowShortcuts: () => void;
@@ -70,6 +72,7 @@ export function WorkbenchTopBar({
onCompareScenario,
onExportScenarioReport,
onAnalyzeAlertsWithAgent,
onCreateTestAnalysis,
onShowDataStatus,
onRefreshTiles,
onShowShortcuts,
@@ -141,6 +144,23 @@ export function WorkbenchTopBar({
</div>
<div className="flex shrink-0 items-center gap-2">
{onCreateTestAnalysis ? (
<div className="hidden lg:block">
<button
type="button"
aria-label="测试打开 Agent 多图表窗口"
title="测试打开 Agent 多图表窗口"
data-selection-tone="soft"
onClick={onCreateTestAnalysis}
className={cn("group px-2", headerControlButtonClassName)}
>
<span className={headerControlIconClassName}>
<Sparkles size={14} aria-hidden="true" />
</span>
<span className={compactHeaderTextClassName}></span>
</button>
</div>
) : null}
{devPanelEnabled ? (
<div className="hidden lg:block">
<button