From 9172ebdb0fe2c3a4bfba518a0d93f1054ebd4e61 Mon Sep 17 00:00:00 2001 From: Eduard Klimenko Date: Thu, 10 Aug 2023 22:11:43 +0300 Subject: [PATCH] added option: Items for color generator --- src/components/SimplePanel.tsx | 2 +- src/module.ts | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/components/SimplePanel.tsx b/src/components/SimplePanel.tsx index 99ec7bb..c48bb7d 100644 --- a/src/components/SimplePanel.tsx +++ b/src/components/SimplePanel.tsx @@ -211,7 +211,7 @@ export const SimplePanel: React.FC = ({ options, data, width, height }: a return labelItem[optionArr]; }; return { - messageID: `${_(options.source) || ''}${_(options.title) || ''}` || 'Title', + messageID: _(options.colorGenerator) || 'Title', subTitle: options.showbody && message, source: _(options.source) || '...', destination: _(options.destination) || '...', diff --git a/src/module.ts b/src/module.ts index 374f8bc..4921edf 100644 --- a/src/module.ts +++ b/src/module.ts @@ -82,6 +82,14 @@ export const plugin = new PanelPlugin(SimplePanel).setPanelOption ] }, }) + .addCustomEditor({ + id: 'colorGenerator', + path: 'colorGenerator', + name: 'Items for color generator', + description: 'String label(s) for color (Labels[key])', + defaultValue: '', + editor: SimpleEditor, + }) .addBooleanSwitch({ path: 'showbody', name: 'Show body [Line] value',