mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
feat(editor): Hide focus panel while node panel is open (no-changelog) (#17333)
This commit is contained in:
@@ -973,6 +973,10 @@ function onUpdateNodeOutputs(id: string) {
|
||||
}
|
||||
|
||||
function onClickNodeAdd(source: string, sourceHandle: string) {
|
||||
if (isFocusPanelFeatureEnabled.value && focusPanelStore.focusPanelActive) {
|
||||
focusPanelStore.hideFocusPanel();
|
||||
}
|
||||
|
||||
nodeCreatorStore.openNodeCreatorForConnectingNode({
|
||||
connection: {
|
||||
source,
|
||||
@@ -1182,7 +1186,7 @@ async function onRevertAddNode({ node }: { node: INodeUi }) {
|
||||
await revertAddNode(node.name);
|
||||
}
|
||||
|
||||
async function onSwitchActiveNode(nodeName: string) {
|
||||
function onSwitchActiveNode(nodeName: string) {
|
||||
const node = workflowsStore.getNodeByName(nodeName);
|
||||
if (!node) return;
|
||||
|
||||
@@ -1190,7 +1194,7 @@ async function onSwitchActiveNode(nodeName: string) {
|
||||
selectNodes([node.id]);
|
||||
}
|
||||
|
||||
async function onOpenSelectiveNodeCreator(
|
||||
function onOpenSelectiveNodeCreator(
|
||||
node: string,
|
||||
connectionType: NodeConnectionType,
|
||||
connectionIndex: number = 0,
|
||||
@@ -1198,24 +1202,24 @@ async function onOpenSelectiveNodeCreator(
|
||||
nodeCreatorStore.openSelectiveNodeCreator({ node, connectionType, connectionIndex });
|
||||
}
|
||||
|
||||
function onOpenNodeCreatorForTriggerNodes(source: NodeCreatorOpenSource) {
|
||||
nodeCreatorStore.openNodeCreatorForTriggerNodes(source);
|
||||
function onToggleNodeCreator(options: ToggleNodeCreatorOptions) {
|
||||
nodeCreatorStore.setNodeCreatorState(options);
|
||||
|
||||
if (isFocusPanelFeatureEnabled.value && focusPanelStore.focusPanelActive) {
|
||||
focusPanelStore.hideFocusPanel(options.createNodeActive);
|
||||
}
|
||||
|
||||
if (!options.createNodeActive && !options.hasAddedNodes) {
|
||||
uiStore.resetLastInteractedWith();
|
||||
}
|
||||
}
|
||||
|
||||
function onOpenNodeCreatorFromCanvas(source: NodeCreatorOpenSource) {
|
||||
onToggleNodeCreator({ createNodeActive: true, source });
|
||||
}
|
||||
|
||||
function onToggleNodeCreator(options: ToggleNodeCreatorOptions) {
|
||||
nodeCreatorStore.setNodeCreatorState(options);
|
||||
|
||||
if (options.createNodeActive) {
|
||||
focusPanelStore.closeFocusPanel();
|
||||
}
|
||||
|
||||
if (!options.createNodeActive && !options.hasAddedNodes) {
|
||||
uiStore.resetLastInteractedWith();
|
||||
}
|
||||
function onOpenNodeCreatorForTriggerNodes(source: NodeCreatorOpenSource) {
|
||||
nodeCreatorStore.openNodeCreatorForTriggerNodes(source);
|
||||
}
|
||||
|
||||
function onToggleFocusPanel() {
|
||||
@@ -1229,6 +1233,10 @@ function onToggleFocusPanel() {
|
||||
function closeNodeCreator() {
|
||||
if (nodeCreatorStore.isCreateNodeActive) {
|
||||
nodeCreatorStore.isCreateNodeActive = false;
|
||||
|
||||
if (isFocusPanelFeatureEnabled.value && focusPanelStore.focusPanelActive) {
|
||||
focusPanelStore.hideFocusPanel(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user