mirror of
https://github.com/wavetermdev/waveterm.git
synced 2024-12-21 16:38:23 +01:00
add restart controller to context menu
This commit is contained in:
parent
74f551b212
commit
8aa4025907
@ -36,7 +36,7 @@ function handleHeaderContextMenu(
|
||||
e.stopPropagation();
|
||||
let menu: ContextMenuItem[] = [
|
||||
{
|
||||
label: magnified ? "Un-magnify Block" : "Magnify Block",
|
||||
label: magnified ? "Un-Magnify Block" : "Magnify Block",
|
||||
click: () => {
|
||||
onMagnifyToggle();
|
||||
},
|
||||
@ -60,6 +60,14 @@ function handleHeaderContextMenu(
|
||||
},
|
||||
},
|
||||
];
|
||||
const blockController = blockData?.meta?.controller;
|
||||
if (!util.isBlank(blockController)) {
|
||||
menu.push({ type: "separator" });
|
||||
menu.push({
|
||||
label: "Restart Controller",
|
||||
click: () => WshServer.ControllerRestartCommand({ blockid: blockData.oid }),
|
||||
});
|
||||
}
|
||||
const extraItems = viewModel?.getSettingsMenuItems?.();
|
||||
if (extraItems && extraItems.length > 0) menu.push({ type: "separator" }, ...extraItems);
|
||||
menu.push(
|
||||
|
Loading…
Reference in New Issue
Block a user