0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-21 06:02:32 -05:00

Add path to color bullet title

This way the title is more clear as the group name is included, and this more closely matches the display in the "assets" sidebar.

Signed-off-by: Simon Epskamp <simon@friendlypixel.nl>
This commit is contained in:
Simon Epskamp 2024-11-28 20:27:10 +01:00
parent 8fa334265c
commit 206fd68a92

View file

@ -16,6 +16,8 @@
(defn- color-title
[color-item]
(let [name (:name color-item)
path (:path color-item)
path-and-name (if path (str path " / " name) name)
gradient (:gradient color-item)
image (:image color-item)
color (:color color-item)]
@ -23,16 +25,16 @@
(if (some? name)
(cond
(some? color)
(str/ffmt "% (%)" name color)
(str/ffmt "% (%)" path-and-name color)
(some? gradient)
(str/ffmt "% (%)" name (uc/gradient-type->string (:type gradient)))
(str/ffmt "% (%)" path-and-name (uc/gradient-type->string (:type gradient)))
(some? image)
(str/ffmt "% (%)" name (tr "media.image"))
(str/ffmt "% (%)" path-and-name (tr "media.image"))
:else
name)
path-and-name)
(cond
(some? color)