This is an automated email from the ASF dual-hosted git repository.

marat pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-karavan.git

commit e77de3a3a966474f19d1d20d21781e067db0b65d
Author: Marat Gubaidullin <ma...@talismancloud.io>
AuthorDate: Tue Jan 9 15:46:43 2024 -0500

    Icon fo direct
---
 .../src/designer/icons/ComponentIcons.tsx          | 22 +++++++++++++++++++++-
 karavan-designer/src/designer/utils/CamelUi.tsx    |  6 +++++-
 2 files changed, 26 insertions(+), 2 deletions(-)

diff --git a/karavan-designer/src/designer/icons/ComponentIcons.tsx 
b/karavan-designer/src/designer/icons/ComponentIcons.tsx
index 90d78ec8..c803bf11 100644
--- a/karavan-designer/src/designer/icons/ComponentIcons.tsx
+++ b/karavan-designer/src/designer/icons/ComponentIcons.tsx
@@ -16,6 +16,26 @@
  */
 import React from 'react';
 
+export function DirectIcon() {
+    return (
+        <svg
+            xmlns="http://www.w3.org/2000/svg";
+            viewBox="0 0 32 32"
+            className="icon" width="32px" height="32px"
+        >
+            <path
+                d="M25 11a5.008 5.008 0 0 0-4.899 4H11.9a5 5 0 1 0 0 2H20.1A5 
5 0 1 0 25 11Zm0 8a3 3 0 1 1 3-3 3.003 3.003 0 0 1-3 3Z"/>
+            <path
+                d="M0 0h32v32H0z"
+                data-name="&lt;Transparent Rectangle&gt;"
+                style={{
+                    fill: "none",
+                }}
+            />
+        </svg>
+    );
+}
+
 export function SpringIcon() {
     return (
         <svg
@@ -23,7 +43,7 @@ export function SpringIcon() {
             viewBox="0 0 32 32"
             className="icon" width="32px" height="32px">
             <g fill="none" fillRule="evenodd">
-                <path d="M0 0h32v32H0z"></path>
+            <path d="M0 0h32v32H0z"></path>
                 <path
                     fill="#70AD51"
                     d="M5.466 27.993a1.364 1.364 0 
10-.087-.076l-.266-.234C1.972 24.762 0 20.597 0 15.978 0 7.168 7.168 0 15.98 
0c4.48 0 8.53 1.857 11.435 4.836a14.681 14.681 0 001.7-3.015c2.036 6.118 3.233 
11.26 2.795 15.31-.592 8.274-7.508 14.83-15.93 14.83a15.903 15.903 0 
01-10.276-3.757l-.238-.21zm23.58-4.982c4.01-5.336 1.775-13.965-.085-19.48-1.657 
3.453-5.738 6.094-9.262 6.93-3.303.788-6.226.142-9.283 1.318-6.97 2.68-6.86 
10.992-3.02 12.86.002 0 .23.124.227.12 0-.002 5.644-1.122 8. [...]
diff --git a/karavan-designer/src/designer/utils/CamelUi.tsx 
b/karavan-designer/src/designer/utils/CamelUi.tsx
index 02acba92..35f32a7f 100644
--- a/karavan-designer/src/designer/utils/CamelUi.tsx
+++ b/karavan-designer/src/designer/utils/CamelUi.tsx
@@ -38,7 +38,7 @@ import {
     CloudIcon,
     ClusterIcon,
     DatabaseIcon,
-    DebeziumIcon,
+    DebeziumIcon, DirectIcon,
     DocumentIcon,
     FileIcon,
     GithubIcon,
@@ -556,6 +556,8 @@ export class CamelUi {
         const labels = label.split(",");
         if (title === "Ref") {
             return RefIcon();
+        } else if (title === "Direct") {
+            return DirectIcon();
         } else if (title === "Exec") {
             return TerminalIcon();
         } else if (title === "Grape") {
@@ -667,6 +669,8 @@ export class CamelUi {
             return k ? this.getIconFromSource(k.icon()) : 
CamelUi.getIconForDslName(element.dslName);
         } else if (element.dslName === "ToDefinition" && component && 
TopologyUtils.isComponentInternal(component.component.label)) {
             return this.getIconForComponent(component?.component.title, 
component?.component.label);
+        } else if (element.dslName === "ToDefinition" && component && 
TopologyUtils.hasDirectUri(element)) {
+            return this.getIconForComponent(component?.component.title, 
component?.component.label);
         } else {
             return this.getIconForDslName(element.dslName);
         }

Reply via email to