mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-02 17:50:39 +00:00
Allow dismissing a disconnected terminal w/ <esc>
This commit is contained in:
@@ -117,11 +117,17 @@ export function enterNode(nodeId) {
|
||||
}
|
||||
|
||||
export function hitEsc() {
|
||||
const controlPipe = AppStore.getControlPipe();
|
||||
if (controlPipe && controlPipe.status === 'PIPE_DELETED') {
|
||||
AppDispatcher.dispatch({
|
||||
type: ActionTypes.CLICK_CLOSE_TERMINAL,
|
||||
pipeId: controlPipe.id
|
||||
});
|
||||
// Dont deselect node on ESC if there is a controlPipe (keep terminal open)
|
||||
if (AppStore.getSelectedNodeId() && !AppStore.getControlPipe()) {
|
||||
} else if (AppStore.getSelectedNodeId() && !controlPipe) {
|
||||
AppDispatcher.dispatch({type: ActionTypes.DESELECT_NODE});
|
||||
updateRoute();
|
||||
}
|
||||
updateRoute();
|
||||
}
|
||||
|
||||
export function leaveEdge(edgeId) {
|
||||
|
||||
Reference in New Issue
Block a user