mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-09 22:24:05 -08:00
feat(core): Add notice to alert users a new version is available
This commit is contained in:
parent
839a56a682
commit
cb497fbbec
|
@ -16,6 +16,8 @@ import { googleApiRequest, googleApiRequestAllItems, merge, simplify } from './G
|
|||
import moment from 'moment-timezone';
|
||||
import type { IData } from './Interfaces';
|
||||
|
||||
import { oldVersionNotice } from '../../../../utils/descriptions';
|
||||
|
||||
const versionDescription: INodeTypeDescription = {
|
||||
displayName: 'Google Analytics',
|
||||
name: 'googleAnalytics',
|
||||
|
@ -36,6 +38,7 @@ const versionDescription: INodeTypeDescription = {
|
|||
},
|
||||
],
|
||||
properties: [
|
||||
oldVersionNotice,
|
||||
{
|
||||
displayName: 'Resource',
|
||||
name: 'resource',
|
||||
|
|
|
@ -20,6 +20,8 @@ import { recordFields, recordOperations } from './RecordDescription';
|
|||
|
||||
import { v4 as uuid } from 'uuid';
|
||||
|
||||
import { oldVersionNotice } from '../../../../utils/descriptions';
|
||||
|
||||
const versionDescription: INodeTypeDescription = {
|
||||
displayName: 'Google BigQuery',
|
||||
name: 'googleBigQuery',
|
||||
|
@ -54,6 +56,7 @@ const versionDescription: INodeTypeDescription = {
|
|||
},
|
||||
],
|
||||
properties: [
|
||||
oldVersionNotice,
|
||||
{
|
||||
displayName: 'Authentication',
|
||||
name: 'authentication',
|
||||
|
|
|
@ -30,6 +30,8 @@ import { draftFields, draftOperations } from './DraftDescription';
|
|||
|
||||
import isEmpty from 'lodash.isempty';
|
||||
|
||||
import { oldVersionNotice } from '../../../../utils/descriptions';
|
||||
|
||||
const versionDescription: INodeTypeDescription = {
|
||||
displayName: 'Gmail',
|
||||
name: 'gmail',
|
||||
|
@ -64,6 +66,7 @@ const versionDescription: INodeTypeDescription = {
|
|||
},
|
||||
],
|
||||
properties: [
|
||||
oldVersionNotice,
|
||||
{
|
||||
displayName: 'Authentication',
|
||||
name: 'authentication',
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
/* eslint-disable n8n-nodes-base/node-filename-against-convention */
|
||||
import type { INodeTypeDescription } from 'n8n-workflow';
|
||||
|
||||
import { oldVersionNotice } from '../../../../utils/descriptions';
|
||||
|
||||
export const versionDescription: INodeTypeDescription = {
|
||||
displayName: 'Google Sheets ',
|
||||
name: 'googleSheets',
|
||||
|
@ -36,6 +38,7 @@ export const versionDescription: INodeTypeDescription = {
|
|||
},
|
||||
],
|
||||
properties: [
|
||||
oldVersionNotice,
|
||||
{
|
||||
displayName: 'Authentication',
|
||||
name: 'authentication',
|
||||
|
|
|
@ -12,6 +12,8 @@ import type {
|
|||
} from 'n8n-workflow';
|
||||
import { deepCopy } from 'n8n-workflow';
|
||||
|
||||
import { oldVersionNotice } from '../../../utils/descriptions';
|
||||
|
||||
const versionDescription: INodeTypeDescription = {
|
||||
displayName: 'Merge',
|
||||
name: 'merge',
|
||||
|
@ -29,6 +31,7 @@ const versionDescription: INodeTypeDescription = {
|
|||
outputs: ['main'],
|
||||
inputNames: ['Input 1', 'Input 2'],
|
||||
properties: [
|
||||
oldVersionNotice,
|
||||
{
|
||||
displayName: 'Mode',
|
||||
name: 'mode',
|
||||
|
|
|
@ -17,6 +17,8 @@ import type mysql2 from 'mysql2/promise';
|
|||
import { copyInputItems, createConnection, searchTables } from './GenericFunctions';
|
||||
import type { IExecuteFunctions } from 'n8n-core';
|
||||
|
||||
import { oldVersionNotice } from '../../../utils/descriptions';
|
||||
|
||||
const versionDescription: INodeTypeDescription = {
|
||||
displayName: 'MySQL',
|
||||
name: 'mySql',
|
||||
|
@ -37,6 +39,7 @@ const versionDescription: INodeTypeDescription = {
|
|||
},
|
||||
],
|
||||
properties: [
|
||||
oldVersionNotice,
|
||||
{
|
||||
displayName: 'Operation',
|
||||
name: 'operation',
|
||||
|
|
|
@ -16,6 +16,8 @@ import pgPromise from 'pg-promise';
|
|||
|
||||
import { pgInsertV2, pgQueryV2, pgUpdate, wrapData } from './genericFunctions';
|
||||
|
||||
import { oldVersionNotice } from '../../../utils/descriptions';
|
||||
|
||||
const versionDescription: INodeTypeDescription = {
|
||||
displayName: 'Postgres',
|
||||
name: 'postgres',
|
||||
|
@ -36,6 +38,7 @@ const versionDescription: INodeTypeDescription = {
|
|||
},
|
||||
],
|
||||
properties: [
|
||||
oldVersionNotice,
|
||||
{
|
||||
displayName: 'Operation',
|
||||
name: 'operation',
|
||||
|
|
|
@ -22,6 +22,8 @@ import { userProfileFields, userProfileOperations } from './UserProfileDescripti
|
|||
import { slackApiRequest, slackApiRequestAllItems, validateJSON } from './GenericFunctions';
|
||||
import type { IAttachment } from './MessageInterface';
|
||||
|
||||
import { oldVersionNotice } from '../../../utils/descriptions';
|
||||
|
||||
import moment from 'moment';
|
||||
|
||||
interface Attachment {
|
||||
|
@ -97,6 +99,7 @@ export class SlackV1 implements INodeType {
|
|||
},
|
||||
],
|
||||
properties: [
|
||||
oldVersionNotice,
|
||||
{
|
||||
displayName: '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: '',
|
||||
};
|
Loading…
Reference in a new issue