Файли
openidea/src/deploymentWindowBoot.ts
T
f49302d365 fix(windows): stop menu items doing nothing in diff and other auxiliary windows (#8112)
Auxiliary windows (diff, comparison, editor, Sync with Deployed) boot a fixed set of features, so application actions they never register looked enabled in the menu but did nothing, some key equivalents were dropped because the page appeared to decline them, and Sync with Deployed had no menu bridge. Application actions now run in the project window (raised when it shows their result), Toggle Full Screen stays in the focused window, and menu enablement is cached per window so parent-routed items follow the destination window's state.

Supersedes #7280.

Co-authored-by: albince-mi <[email protected]>
Co-authored-by: arookieofc-ai <[email protected]>
2026-12-05 02:38:47 +08:00

24 рядки
1.0 KiB
TypeScript

import type { ComponentType } from "react";
import { installLocaleSync } from "./features/app/locale";
import { installMenuBridge } from "./features/app/menuBridge";
import { activateDeploymentWindow, DeploymentWindow } from "./features/deployment/window";
import { trackRuntimeSettings } from "./features/settings/runtime";
import { activateDiffViewer } from "./features/vcs/diffViewer";
import { activateList } from "./windowBoot";
/**
* Sync with Deployed window of project window `parent`: local files next to
* their copies on a deployment server, with the diff viewer but no workbench.
*/
export function bootDeploymentWindow(parent: string): ComponentType {
activateList("deployment window", [
["locale", installLocaleSync],
["settings", trackRuntimeSettings],
// Without it, menu items chosen here did nothing: they run in this window, as in the diff window.
["menu", installMenuBridge],
["diff", activateDiffViewer],
["deployment", () => activateDeploymentWindow(parent)],
]);
return DeploymentWindow;
}