From 486f2b6ba509413d66658a705ad2677fc7fd3898 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Moya?= Date: Fri, 30 Oct 2020 09:42:06 +0100 Subject: [PATCH] :sparkles: Allow create nested component directly --- frontend/src/app/main/ui/workspace/context_menu.cljs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/main/ui/workspace/context_menu.cljs b/frontend/src/app/main/ui/workspace/context_menu.cljs index 00043faea3..e4ebff1744 100644 --- a/frontend/src/app/main/ui/workspace/context_menu.cljs +++ b/frontend/src/app/main/ui/workspace/context_menu.cljs @@ -139,14 +139,16 @@ [:& menu-entry {:title (t locale "workspace.shape.menu.lock") :on-click do-lock-shape}]) - (when (nil? (:shape-ref shape)) + (when (or (nil? (:shape-ref shape)) + (> (count selected) 1)) [:* [:& menu-separator] [:& menu-entry {:title (t locale "workspace.shape.menu.create-component") :shortcut "Ctrl + K" :on-click do-add-component}]]) - (when (:component-id shape) + (when (and (:component-id shape) + (= (count selected) 1)) [:* [:& menu-separator] [:& menu-entry {:title (t locale "workspace.shape.menu.detach-instance")