mirror of
https://github.com/penpot/penpot.git
synced 2025-07-28 23:27:22 +02:00
🐛 Fix component context menu
This commit is contained in:
parent
c2a27bb845
commit
3de50986e7
2 changed files with 4 additions and 2 deletions
|
@ -450,7 +450,8 @@
|
||||||
can-update-main? (or (not components-v2) touched?)
|
can-update-main? (or (not components-v2) touched?)
|
||||||
|
|
||||||
first-shape (first shapes)
|
first-shape (first shapes)
|
||||||
{:keys [id component-id component-file main-instance?]} first-shape
|
{:keys [id component-id component-file]} first-shape
|
||||||
|
main-instance? (ctk/main-instance? first-shape)
|
||||||
component-shapes (filter #(contains? % :component-id) shapes)
|
component-shapes (filter #(contains? % :component-id) shapes)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
(ns app.main.ui.workspace.sidebar.options.menus.component
|
(ns app.main.ui.workspace.sidebar.options.menus.component
|
||||||
(:require
|
(:require
|
||||||
[app.common.pages.helpers :as cph]
|
[app.common.pages.helpers :as cph]
|
||||||
|
[app.common.types.component :as ctk]
|
||||||
[app.common.types.components-list :as ctkl]
|
[app.common.types.components-list :as ctkl]
|
||||||
[app.common.types.file :as ctf]
|
[app.common.types.file :as ctf]
|
||||||
[app.main.data.modal :as modal]
|
[app.main.data.modal :as modal]
|
||||||
|
@ -158,7 +159,7 @@
|
||||||
library-id (:component-file values)
|
library-id (:component-file values)
|
||||||
show? (some? component-id)
|
show? (some? component-id)
|
||||||
main-instance? (if components-v2
|
main-instance? (if components-v2
|
||||||
(:main-instance values)
|
(ctk/main-instance? values)
|
||||||
true)
|
true)
|
||||||
main-component? (:main-instance values)
|
main-component? (:main-instance values)
|
||||||
lacks-annotation? (nil? (:annotation values))
|
lacks-annotation? (nil? (:annotation values))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue