0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-12 18:18:24 -05:00

Hide asterisk for overriden copies, except when debugging

This commit is contained in:
Andrés Moya 2023-10-24 17:33:00 +02:00 committed by Andrey Antukh
parent 5111c3f0d2
commit 9ff3095568
4 changed files with 30 additions and 23 deletions

View file

@ -274,6 +274,10 @@ span.element-name {
} }
} }
span.element-name-touched {
color: $color-component;
}
.element-actions { .element-actions {
display: flex; display: flex;
flex-shrink: 0; flex-shrink: 0;

View file

@ -12,6 +12,7 @@
[app.main.data.workspace :as dw] [app.main.data.workspace :as dw]
[app.main.store :as st] [app.main.store :as st]
[app.main.ui.context :as ctx] [app.main.ui.context :as ctx]
[app.util.debug :as dbg]
[app.util.dom :as dom] [app.util.dom :as dom]
[app.util.keyboard :as kbd] [app.util.keyboard :as kbd]
[cuerdas.core :as str] [cuerdas.core :as str]
@ -97,6 +98,7 @@
:on-key-down on-key-down :on-key-down on-key-down
:auto-focus true :auto-focus true
:default-value (d/nilv shape-name "")}] :default-value (d/nilv shape-name "")}]
[:*
[:span [:span
{:class (if ^boolean new-css-system {:class (if ^boolean new-css-system
(stl/css-case (stl/css-case
@ -112,5 +114,6 @@
:style {"--depth" depth "--parent-size" parent-size} :style {"--depth" depth "--parent-size" parent-size}
:ref ref :ref ref
:on-double-click start-edit} :on-double-click start-edit}
(d/nilv shape-name "") (d/nilv shape-name "")]
(when ^boolean shape-touched? " *")]))) (when (and (dbg/enabled? :show-touched) ^boolean shape-touched?)
[:span {:class (stl/css new-css-system :element-name-touched)} "*"])])))

View file

@ -38,3 +38,6 @@
border: 1px solid var(--input-border-color-focus); border: 1px solid var(--input-border-color-focus);
color: var(--layer-row-foreground-color); color: var(--layer-row-foreground-color);
} }
.element-name-touched {
color: var(--layer-row-component-foreground-color);
}

View file

@ -70,6 +70,9 @@
;; Show shape name and id ;; Show shape name and id
:shape-titles :shape-titles
;; Show an asterisk for touched copies
:show-touched
;; ;;
:grid-layout :grid-layout
}) })
@ -92,9 +95,3 @@
(if (enabled? option) (if (enabled? option)
(disable! option) (disable! option)
(enable! option))) (enable! option)))