mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
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:
@@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user