From 3dc45104dbb9025c13c7e122e2f13a4333d5f3d7 Mon Sep 17 00:00:00 2001 From: Eva Date: Thu, 18 Jan 2024 10:31:57 +0100 Subject: [PATCH] :bug: Fix component icons --- .../images/icons/component-refactor.svg | 4 +- .../resources/images/icons/copy-refactor.svg | 4 +- .../app/main/ui/components/shape_icon.cljs | 50 ------------------- .../main/ui/workspace/viewport/widgets.cljs | 2 +- 4 files changed, 5 insertions(+), 55 deletions(-) delete mode 100644 frontend/src/app/main/ui/components/shape_icon.cljs diff --git a/frontend/resources/images/icons/component-refactor.svg b/frontend/resources/images/icons/component-refactor.svg index 0cb789e57..289bba9b7 100644 --- a/frontend/resources/images/icons/component-refactor.svg +++ b/frontend/resources/images/icons/component-refactor.svg @@ -1,3 +1,3 @@ - - \ No newline at end of file + + diff --git a/frontend/resources/images/icons/copy-refactor.svg b/frontend/resources/images/icons/copy-refactor.svg index d6b3b53f5..787024177 100644 --- a/frontend/resources/images/icons/copy-refactor.svg +++ b/frontend/resources/images/icons/copy-refactor.svg @@ -1,3 +1,3 @@ - - \ No newline at end of file + + diff --git a/frontend/src/app/main/ui/components/shape_icon.cljs b/frontend/src/app/main/ui/components/shape_icon.cljs deleted file mode 100644 index af02b820f..000000000 --- a/frontend/src/app/main/ui/components/shape_icon.cljs +++ /dev/null @@ -1,50 +0,0 @@ -;; This Source Code Form is subject to the terms of the Mozilla Public -;; License, v. 2.0. If a copy of the MPL was not distributed with this -;; file, You can obtain one at http://mozilla.org/MPL/2.0/. -;; -;; Copyright (c) KALEIDOS INC - -(ns app.main.ui.components.shape-icon - (:require - [app.common.types.component :as ctk] - [app.common.types.shape :as cts] - [app.common.types.shape.layout :as ctl] - [app.main.ui.icons :as i] - [rumext.v2 :as mf])) - - -(mf/defc element-icon - [{:keys [shape main-instance?] :as props}] - (if (ctk/instance-head? shape) - (if main-instance? - i/component - i/component-copy) - (case (:type shape) - :frame (cond - (and (ctl/flex-layout? shape) (ctl/col? shape)) - i/layout-columns - - (and (ctl/flex-layout? shape) (ctl/row? shape)) - i/layout-rows - - (ctl/grid-layout? shape) - i/grid-layout-mode - - :else - i/artboard) - :image i/image - :line (if (cts/has-images? shape) i/image i/line) - :circle (if (cts/has-images? shape) i/image i/circle) - :path (if (cts/has-images? shape) i/image i/curve) - :rect (if (cts/has-images? shape) i/image i/box) - :text i/text - :group (if (:masked-group shape) - i/mask - i/folder) - :bool (case (:bool-type shape) - :difference i/bool-difference - :exclude i/bool-exclude - :intersection i/bool-intersection - #_:default i/bool-union) - :svg-raw i/file-svg - nil))) diff --git a/frontend/src/app/main/ui/workspace/viewport/widgets.cljs b/frontend/src/app/main/ui/workspace/viewport/widgets.cljs index ccd92afc3..bc0cc5a5b 100644 --- a/frontend/src/app/main/ui/workspace/viewport/widgets.cljs +++ b/frontend/src/app/main/ui/workspace/viewport/widgets.cljs @@ -155,7 +155,7 @@ [:use {:href "#icon-grid-layout-mode"}] main-instance? - [:use {:href "#icon-component"}])]) + [:use {:href "#icon-component-refactor"}])]) [:text {:x text-pos-x :y 0