feat(n8n Form Trigger Node): New node (#7130)

Github issue / Community forum post (link here to close automatically):

based on https://github.com/joffcom/n8n-nodes-form-trigger

---------

Co-authored-by: Giulio Andreini <g.andreini@gmail.com>
This commit is contained in:
Michael Kret
2023-10-17 07:09:30 +03:00
committed by GitHub
parent 869b8f14ca
commit 3ddc176dfa
26 changed files with 1328 additions and 32 deletions

View File

@@ -45,3 +45,22 @@ export const executionFilterToQueryFilter = (
}
return queryFilter;
};
export const openPopUpWindow = (
url: string,
options?: { width?: number; height?: number; alwaysInNewTab?: boolean },
) => {
const windowWidth = window.innerWidth;
const smallScreen = windowWidth <= 800;
if (options?.alwaysInNewTab || smallScreen) {
window.open(url, '_blank');
} else {
const height = options?.width || 700;
const width = options?.height || window.innerHeight - 50;
const left = (window.innerWidth - height) / 2;
const top = 50;
const features = `width=${height},height=${width},left=${left},top=${top},resizable=yes,scrollbars=yes`;
window.open(url, '_blank', features);
}
};