feat(core): Add notice to alert users a new version is available

This commit is contained in:
Michael Kret 2023-05-02 11:45:04 +03:00 committed by GitHub
parent 839a56a682
commit cb497fbbec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 33 additions and 0 deletions

View file

@ -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',

View file

@ -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',

View file

@ -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',

View file

@ -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',

View file

@ -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',

View file

@ -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',

View file

@ -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',

View file

@ -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',

View 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: '',
};