0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-08 08:09:14 -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 {
display: flex;
flex-shrink: 0;

View file

@ -12,6 +12,7 @@
[app.main.data.workspace :as dw]
[app.main.store :as st]
[app.main.ui.context :as ctx]
[app.util.debug :as dbg]
[app.util.dom :as dom]
[app.util.keyboard :as kbd]
[cuerdas.core :as str]
@ -97,20 +98,22 @@
:on-key-down on-key-down
:auto-focus true
:default-value (d/nilv shape-name "")}]
[:span
{:class (if ^boolean new-css-system
(stl/css-case
:element-name true
:left-ellipsis has-path?
:selected selected?
:hidden hidden?
:type-comp type-comp
:type-frame type-frame)
(stl/css-case
"element-name" true
:left-ellipsis has-path?))
:style {"--depth" depth "--parent-size" parent-size}
:ref ref
:on-double-click start-edit}
(d/nilv shape-name "")
(when ^boolean shape-touched? " *")])))
[:*
[:span
{:class (if ^boolean new-css-system
(stl/css-case
:element-name true
:left-ellipsis has-path?
:selected selected?
:hidden hidden?
:type-comp type-comp
:type-frame type-frame)
(stl/css-case
"element-name" true
:left-ellipsis has-path?))
:style {"--depth" depth "--parent-size" parent-size}
:ref ref
:on-double-click start-edit}
(d/nilv shape-name "")]
(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);
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
:shape-titles
;; Show an asterisk for touched copies
:show-touched
;;
:grid-layout
})
@ -92,9 +95,3 @@
(if (enabled? option)
(disable! option)
(enable! option)))