mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
feat(core): Add notice to alert users a new version is available
This commit is contained in:
@@ -16,6 +16,8 @@ import { googleApiRequest, googleApiRequestAllItems, merge, simplify } from './G
|
|||||||
import moment from 'moment-timezone';
|
import moment from 'moment-timezone';
|
||||||
import type { IData } from './Interfaces';
|
import type { IData } from './Interfaces';
|
||||||
|
|
||||||
|
import { oldVersionNotice } from '../../../../utils/descriptions';
|
||||||
|
|
||||||
const versionDescription: INodeTypeDescription = {
|
const versionDescription: INodeTypeDescription = {
|
||||||
displayName: 'Google Analytics',
|
displayName: 'Google Analytics',
|
||||||
name: 'googleAnalytics',
|
name: 'googleAnalytics',
|
||||||
@@ -36,6 +38,7 @@ const versionDescription: INodeTypeDescription = {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
properties: [
|
properties: [
|
||||||
|
oldVersionNotice,
|
||||||
{
|
{
|
||||||
displayName: 'Resource',
|
displayName: 'Resource',
|
||||||
name: 'resource',
|
name: 'resource',
|
||||||
|
|||||||
@@ -20,6 +20,8 @@ import { recordFields, recordOperations } from './RecordDescription';
|
|||||||
|
|
||||||
import { v4 as uuid } from 'uuid';
|
import { v4 as uuid } from 'uuid';
|
||||||
|
|
||||||
|
import { oldVersionNotice } from '../../../../utils/descriptions';
|
||||||
|
|
||||||
const versionDescription: INodeTypeDescription = {
|
const versionDescription: INodeTypeDescription = {
|
||||||
displayName: 'Google BigQuery',
|
displayName: 'Google BigQuery',
|
||||||
name: 'googleBigQuery',
|
name: 'googleBigQuery',
|
||||||
@@ -54,6 +56,7 @@ const versionDescription: INodeTypeDescription = {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
properties: [
|
properties: [
|
||||||
|
oldVersionNotice,
|
||||||
{
|
{
|
||||||
displayName: 'Authentication',
|
displayName: 'Authentication',
|
||||||
name: 'authentication',
|
name: 'authentication',
|
||||||
|
|||||||
@@ -30,6 +30,8 @@ import { draftFields, draftOperations } from './DraftDescription';
|
|||||||
|
|
||||||
import isEmpty from 'lodash.isempty';
|
import isEmpty from 'lodash.isempty';
|
||||||
|
|
||||||
|
import { oldVersionNotice } from '../../../../utils/descriptions';
|
||||||
|
|
||||||
const versionDescription: INodeTypeDescription = {
|
const versionDescription: INodeTypeDescription = {
|
||||||
displayName: 'Gmail',
|
displayName: 'Gmail',
|
||||||
name: 'gmail',
|
name: 'gmail',
|
||||||
@@ -64,6 +66,7 @@ const versionDescription: INodeTypeDescription = {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
properties: [
|
properties: [
|
||||||
|
oldVersionNotice,
|
||||||
{
|
{
|
||||||
displayName: 'Authentication',
|
displayName: 'Authentication',
|
||||||
name: 'authentication',
|
name: 'authentication',
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
/* eslint-disable n8n-nodes-base/node-filename-against-convention */
|
/* eslint-disable n8n-nodes-base/node-filename-against-convention */
|
||||||
import type { INodeTypeDescription } from 'n8n-workflow';
|
import type { INodeTypeDescription } from 'n8n-workflow';
|
||||||
|
|
||||||
|
import { oldVersionNotice } from '../../../../utils/descriptions';
|
||||||
|
|
||||||
export const versionDescription: INodeTypeDescription = {
|
export const versionDescription: INodeTypeDescription = {
|
||||||
displayName: 'Google Sheets ',
|
displayName: 'Google Sheets ',
|
||||||
name: 'googleSheets',
|
name: 'googleSheets',
|
||||||
@@ -36,6 +38,7 @@ export const versionDescription: INodeTypeDescription = {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
properties: [
|
properties: [
|
||||||
|
oldVersionNotice,
|
||||||
{
|
{
|
||||||
displayName: 'Authentication',
|
displayName: 'Authentication',
|
||||||
name: 'authentication',
|
name: 'authentication',
|
||||||
|
|||||||
@@ -12,6 +12,8 @@ import type {
|
|||||||
} from 'n8n-workflow';
|
} from 'n8n-workflow';
|
||||||
import { deepCopy } from 'n8n-workflow';
|
import { deepCopy } from 'n8n-workflow';
|
||||||
|
|
||||||
|
import { oldVersionNotice } from '../../../utils/descriptions';
|
||||||
|
|
||||||
const versionDescription: INodeTypeDescription = {
|
const versionDescription: INodeTypeDescription = {
|
||||||
displayName: 'Merge',
|
displayName: 'Merge',
|
||||||
name: 'merge',
|
name: 'merge',
|
||||||
@@ -29,6 +31,7 @@ const versionDescription: INodeTypeDescription = {
|
|||||||
outputs: ['main'],
|
outputs: ['main'],
|
||||||
inputNames: ['Input 1', 'Input 2'],
|
inputNames: ['Input 1', 'Input 2'],
|
||||||
properties: [
|
properties: [
|
||||||
|
oldVersionNotice,
|
||||||
{
|
{
|
||||||
displayName: 'Mode',
|
displayName: 'Mode',
|
||||||
name: 'mode',
|
name: 'mode',
|
||||||
|
|||||||
@@ -17,6 +17,8 @@ import type mysql2 from 'mysql2/promise';
|
|||||||
import { copyInputItems, createConnection, searchTables } from './GenericFunctions';
|
import { copyInputItems, createConnection, searchTables } from './GenericFunctions';
|
||||||
import type { IExecuteFunctions } from 'n8n-core';
|
import type { IExecuteFunctions } from 'n8n-core';
|
||||||
|
|
||||||
|
import { oldVersionNotice } from '../../../utils/descriptions';
|
||||||
|
|
||||||
const versionDescription: INodeTypeDescription = {
|
const versionDescription: INodeTypeDescription = {
|
||||||
displayName: 'MySQL',
|
displayName: 'MySQL',
|
||||||
name: 'mySql',
|
name: 'mySql',
|
||||||
@@ -37,6 +39,7 @@ const versionDescription: INodeTypeDescription = {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
properties: [
|
properties: [
|
||||||
|
oldVersionNotice,
|
||||||
{
|
{
|
||||||
displayName: 'Operation',
|
displayName: 'Operation',
|
||||||
name: 'operation',
|
name: 'operation',
|
||||||
|
|||||||
@@ -16,6 +16,8 @@ import pgPromise from 'pg-promise';
|
|||||||
|
|
||||||
import { pgInsertV2, pgQueryV2, pgUpdate, wrapData } from './genericFunctions';
|
import { pgInsertV2, pgQueryV2, pgUpdate, wrapData } from './genericFunctions';
|
||||||
|
|
||||||
|
import { oldVersionNotice } from '../../../utils/descriptions';
|
||||||
|
|
||||||
const versionDescription: INodeTypeDescription = {
|
const versionDescription: INodeTypeDescription = {
|
||||||
displayName: 'Postgres',
|
displayName: 'Postgres',
|
||||||
name: 'postgres',
|
name: 'postgres',
|
||||||
@@ -36,6 +38,7 @@ const versionDescription: INodeTypeDescription = {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
properties: [
|
properties: [
|
||||||
|
oldVersionNotice,
|
||||||
{
|
{
|
||||||
displayName: 'Operation',
|
displayName: 'Operation',
|
||||||
name: 'operation',
|
name: 'operation',
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ import { userProfileFields, userProfileOperations } from './UserProfileDescripti
|
|||||||
import { slackApiRequest, slackApiRequestAllItems, validateJSON } from './GenericFunctions';
|
import { slackApiRequest, slackApiRequestAllItems, validateJSON } from './GenericFunctions';
|
||||||
import type { IAttachment } from './MessageInterface';
|
import type { IAttachment } from './MessageInterface';
|
||||||
|
|
||||||
|
import { oldVersionNotice } from '../../../utils/descriptions';
|
||||||
|
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
|
|
||||||
interface Attachment {
|
interface Attachment {
|
||||||
@@ -97,6 +99,7 @@ export class SlackV1 implements INodeType {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
properties: [
|
properties: [
|
||||||
|
oldVersionNotice,
|
||||||
{
|
{
|
||||||
displayName: 'Authentication',
|
displayName: 'Authentication',
|
||||||
name: 'authentication',
|
name: 'authentication',
|
||||||
|
|||||||
9
packages/nodes-base/utils/descriptions.ts
Normal file
9
packages/nodes-base/utils/descriptions.ts
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
import type { INodeProperties } from 'n8n-workflow';
|
||||||
|
|
||||||
|
export const oldVersionNotice: INodeProperties = {
|
||||||
|
displayName:
|
||||||
|
'<strong>New node version available:</strong> get the latest version with added features from the nodes panel.',
|
||||||
|
name: 'oldVersionNotice',
|
||||||
|
type: 'notice',
|
||||||
|
default: '',
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user