From dd35d342e61f55f4a3e0d980b9acbc12a3753422 Mon Sep 17 00:00:00 2001 From: Alexander Tiderko Date: Wed, 3 Apr 2024 13:53:17 +0200 Subject: [PATCH] topicPanel: copy topic type on double click --- .../components/TopicTreeView/TopicTreeItem.jsx | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/fkie_mas_gui/src/renderer/components/TopicTreeView/TopicTreeItem.jsx b/fkie_mas_gui/src/renderer/components/TopicTreeView/TopicTreeItem.jsx index d0a24bdf..765e2e83 100644 --- a/fkie_mas_gui/src/renderer/components/TopicTreeView/TopicTreeItem.jsx +++ b/fkie_mas_gui/src/renderer/components/TopicTreeView/TopicTreeItem.jsx @@ -147,8 +147,18 @@ const TopicTreeItem = React.forwardRef(function TopicTreeItem( }} > {labelInfo && ( - - [{labelInfo}] + { + if (e.detail === 2) { + navigator.clipboard.writeText(labelInfo); + logCtx.success(`${labelInfo} copied!`); + } + }} + > + {labelInfo} )} {labelCount > 0 && (