n8n/packages/nodes-base/nodes/DateTime/DateTime.node.ts
Elias Meire 600013a1ab
feat: Add support for dark mode node icons and colors (#9412)
Co-authored-by: Giulio Andreini <g.andreini@gmail.com>
2024-06-06 13:34:30 +02:00

28 lines
803 B
TypeScript

import type { INodeTypeBaseDescription, IVersionedNodeType } from 'n8n-workflow';
import { VersionedNodeType } from 'n8n-workflow';
import { DateTimeV1 } from './V1/DateTimeV1.node';
import { DateTimeV2 } from './V2/DateTimeV2.node';
export class DateTime extends VersionedNodeType {
constructor() {
const baseDescription: INodeTypeBaseDescription = {
displayName: 'Date & Time',
name: 'dateTime',
icon: 'fa:clock',
iconColor: 'green',
group: ['transform'],
defaultVersion: 2,
description: 'Allows you to manipulate date and time values',
subtitle: '={{$parameter["action"]}}',
};
const nodeVersions: IVersionedNodeType['nodeVersions'] = {
1: new DateTimeV1(baseDescription),
2: new DateTimeV2(baseDescription),
};
super(nodeVersions, baseDescription);
}
}