From 98414653a4b7a14607f71b446c782ae49b08b2d8 Mon Sep 17 00:00:00 2001
From: Robin Leber <rleber98@gmail.com>
Date: Sun, 7 Jul 2024 19:09:18 +0200
Subject: [PATCH] context menu for connections

---
 src/functions/contextmenu.js | 4 ++--
 src/style.css                | 6 ++++++
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/functions/contextmenu.js b/src/functions/contextmenu.js
index e16fab2..fe6ab3d 100644
--- a/src/functions/contextmenu.js
+++ b/src/functions/contextmenu.js
@@ -12,7 +12,7 @@ export const initContextmenu = (instance) => {
       window.selectedConnection = component;
       $(
         `<div class='custom-menu'>
-          <button style='background-color: red; color: white; border: none; padding: 6px 12px;' class='delete-connection'>
+          <button class='custom-menu-button' id='delete-connection'>
             Delete connection
           </button>
         </div>`
@@ -22,7 +22,7 @@ export const initContextmenu = (instance) => {
     }
   });
 
-  $("body").on("click", ".delete-connection", (event) => {
+  $("body").on("click", "#delete-connection", (event) => {
     instance.deleteConnection(window.selectedConnection);
   });
   $(document).bind("click", (event) => {
diff --git a/src/style.css b/src/style.css
index 1bc66da..9e31c78 100644
--- a/src/style.css
+++ b/src/style.css
@@ -98,6 +98,7 @@ body {
 
 #delete-pipe:hover {
   background-color: red;
+  color: white;
 }
 
 #delete-filter:hover {
@@ -105,6 +106,11 @@ body {
   color: white;
 }
 
+#delete-connection:hover {
+  background-color: red;
+  color: white;
+}
+
 #scale-out:hover {
   background-color: blue;
   color: white;
-- 
GitLab