mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 04:34:06 -08:00
fix(Wait Node): Append n8n attribution option (#10585)
This commit is contained in:
parent
ccb553a550
commit
81f4322d45
|
@ -14,6 +14,7 @@ import { createTransport } from 'nodemailer';
|
||||||
import type SMTPTransport from 'nodemailer/lib/smtp-transport';
|
import type SMTPTransport from 'nodemailer/lib/smtp-transport';
|
||||||
|
|
||||||
import { updateDisplayOptions } from '@utils/utilities';
|
import { updateDisplayOptions } from '@utils/utilities';
|
||||||
|
import { appendAttributionOption } from '../../../utils/descriptions';
|
||||||
|
|
||||||
const properties: INodeProperties[] = [
|
const properties: INodeProperties[] = [
|
||||||
// TODO: Add choice for text as text or html (maybe also from name)
|
// TODO: Add choice for text as text or html (maybe also from name)
|
||||||
|
@ -137,11 +138,7 @@ const properties: INodeProperties[] = [
|
||||||
default: {},
|
default: {},
|
||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
// eslint-disable-next-line n8n-nodes-base/node-param-display-name-miscased
|
...appendAttributionOption,
|
||||||
displayName: 'Append n8n Attribution',
|
|
||||||
name: 'appendAttribution',
|
|
||||||
type: 'boolean',
|
|
||||||
default: true,
|
|
||||||
description:
|
description:
|
||||||
'Whether to include the phrase “This email was sent automatically with n8n” to the end of the email',
|
'Whether to include the phrase “This email was sent automatically with n8n” to the end of the email',
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import type { INodeProperties } from 'n8n-workflow';
|
import type { INodeProperties } from 'n8n-workflow';
|
||||||
|
import { appendAttributionOption } from '../../utils/descriptions';
|
||||||
|
|
||||||
export const webhookPath: INodeProperties = {
|
export const webhookPath: INodeProperties = {
|
||||||
displayName: 'Form Path',
|
displayName: 'Form Path',
|
||||||
|
@ -314,3 +315,8 @@ export const respondWithOptions: INodeProperties = {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const appendAttributionToForm: INodeProperties = {
|
||||||
|
...appendAttributionOption,
|
||||||
|
description: 'Whether to include the link “Form automated with n8n” at the bottom of the form',
|
||||||
|
};
|
||||||
|
|
|
@ -10,6 +10,7 @@ import {
|
||||||
|
|
||||||
import { formWebhook } from '../utils';
|
import { formWebhook } from '../utils';
|
||||||
import {
|
import {
|
||||||
|
appendAttributionToForm,
|
||||||
formDescription,
|
formDescription,
|
||||||
formFields,
|
formFields,
|
||||||
formRespondMode,
|
formRespondMode,
|
||||||
|
@ -116,15 +117,7 @@ const descriptionV2: INodeTypeDescription = {
|
||||||
placeholder: 'Add option',
|
placeholder: 'Add option',
|
||||||
default: {},
|
default: {},
|
||||||
options: [
|
options: [
|
||||||
{
|
appendAttributionToForm,
|
||||||
// eslint-disable-next-line n8n-nodes-base/node-param-display-name-miscased
|
|
||||||
displayName: 'Append n8n Attribution',
|
|
||||||
name: 'appendAttribution',
|
|
||||||
type: 'boolean',
|
|
||||||
default: true,
|
|
||||||
description:
|
|
||||||
'Whether to include the link “Form automated with n8n” at the bottom of the form',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
...respondWithOptions,
|
...respondWithOptions,
|
||||||
displayOptions: {
|
displayOptions: {
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import type { INodeProperties } from 'n8n-workflow';
|
import type { INodeProperties } from 'n8n-workflow';
|
||||||
|
import { appendAttributionOption } from '../../../../utils/descriptions';
|
||||||
|
|
||||||
export const messageOperations: INodeProperties[] = [
|
export const messageOperations: INodeProperties[] = [
|
||||||
{
|
{
|
||||||
|
@ -200,11 +201,7 @@ export const messageFields: INodeProperties[] = [
|
||||||
default: {},
|
default: {},
|
||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
// eslint-disable-next-line n8n-nodes-base/node-param-display-name-miscased
|
...appendAttributionOption,
|
||||||
displayName: 'Append n8n Attribution',
|
|
||||||
name: 'appendAttribution',
|
|
||||||
type: 'boolean',
|
|
||||||
default: true,
|
|
||||||
description:
|
description:
|
||||||
'Whether to include the phrase “This email was sent automatically with n8n” to the end of the email',
|
'Whether to include the phrase “This email was sent automatically with n8n” to the end of the email',
|
||||||
},
|
},
|
||||||
|
|
|
@ -11,6 +11,7 @@ import type {
|
||||||
import { BINARY_ENCODING, NodeConnectionType, NodeOperationError } from 'n8n-workflow';
|
import { BINARY_ENCODING, NodeConnectionType, NodeOperationError } from 'n8n-workflow';
|
||||||
|
|
||||||
import { addAdditionalFields, apiRequest, getPropertyName } from './GenericFunctions';
|
import { addAdditionalFields, apiRequest, getPropertyName } from './GenericFunctions';
|
||||||
|
import { appendAttributionOption } from '../../utils/descriptions';
|
||||||
|
|
||||||
export class Telegram implements INodeType {
|
export class Telegram implements INodeType {
|
||||||
description: INodeTypeDescription = {
|
description: INodeTypeDescription = {
|
||||||
|
@ -1508,11 +1509,7 @@ export class Telegram implements INodeType {
|
||||||
default: {},
|
default: {},
|
||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
// eslint-disable-next-line n8n-nodes-base/node-param-display-name-miscased
|
...appendAttributionOption,
|
||||||
displayName: 'Append n8n Attribution',
|
|
||||||
name: 'appendAttribution',
|
|
||||||
type: 'boolean',
|
|
||||||
default: true,
|
|
||||||
description:
|
description:
|
||||||
'Whether to include the phrase “This message was sent automatically with n8n” to the end of the message',
|
'Whether to include the phrase “This message was sent automatically with n8n” to the end of the message',
|
||||||
displayOptions: {
|
displayOptions: {
|
||||||
|
|
|
@ -27,6 +27,7 @@ import {
|
||||||
respondWithOptions,
|
respondWithOptions,
|
||||||
formRespondMode,
|
formRespondMode,
|
||||||
formTitle,
|
formTitle,
|
||||||
|
appendAttributionToForm,
|
||||||
} from '../Form/common.descriptions';
|
} from '../Form/common.descriptions';
|
||||||
import { formWebhook } from '../Form/utils';
|
import { formWebhook } from '../Form/utils';
|
||||||
import { updateDisplayOptions } from '../../utils/utilities';
|
import { updateDisplayOptions } from '../../utils/utilities';
|
||||||
|
@ -436,7 +437,7 @@ export class Wait extends Webhook {
|
||||||
responseMode: ['responseNode'],
|
responseMode: ['responseNode'],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
options: [respondWithOptions, webhookSuffix],
|
options: [appendAttributionToForm, respondWithOptions, webhookSuffix],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Options',
|
displayName: 'Options',
|
||||||
|
@ -452,7 +453,7 @@ export class Wait extends Webhook {
|
||||||
responseMode: ['onReceived', 'lastNode'],
|
responseMode: ['onReceived', 'lastNode'],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
options: [webhookSuffix],
|
options: [appendAttributionToForm, webhookSuffix],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
|
@ -41,6 +41,14 @@ export const looseTypeValidationProperty: INodeProperties = {
|
||||||
default: true,
|
default: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const appendAttributionOption: INodeProperties = {
|
||||||
|
// eslint-disable-next-line n8n-nodes-base/node-param-display-name-miscased
|
||||||
|
displayName: 'Append n8n Attribution',
|
||||||
|
name: 'appendAttribution',
|
||||||
|
type: 'boolean',
|
||||||
|
default: true,
|
||||||
|
};
|
||||||
|
|
||||||
export const encodeDecodeOptions: INodePropertyOptions[] = [
|
export const encodeDecodeOptions: INodePropertyOptions[] = [
|
||||||
{
|
{
|
||||||
name: 'armscii8',
|
name: 'armscii8',
|
||||||
|
|
Loading…
Reference in a new issue