mirror of
https://github.com/penpot/penpot.git
synced 2025-07-10 17:57:18 +02:00
Merge pull request #5394 from Friendly-Pixel/color_bullet_title
✨ Add path to color bullet title
This commit is contained in:
commit
ad421c3bcc
1 changed files with 6 additions and 4 deletions
|
@ -16,6 +16,8 @@
|
||||||
(defn- color-title
|
(defn- color-title
|
||||||
[color-item]
|
[color-item]
|
||||||
(let [name (:name color-item)
|
(let [name (:name color-item)
|
||||||
|
path (:path color-item)
|
||||||
|
path-and-name (if path (str path " / " name) name)
|
||||||
gradient (:gradient color-item)
|
gradient (:gradient color-item)
|
||||||
image (:image color-item)
|
image (:image color-item)
|
||||||
color (:color color-item)]
|
color (:color color-item)]
|
||||||
|
@ -23,16 +25,16 @@
|
||||||
(if (some? name)
|
(if (some? name)
|
||||||
(cond
|
(cond
|
||||||
(some? color)
|
(some? color)
|
||||||
(str/ffmt "% (%)" name color)
|
(str/ffmt "% (%)" path-and-name color)
|
||||||
|
|
||||||
(some? gradient)
|
(some? gradient)
|
||||||
(str/ffmt "% (%)" name (uc/gradient-type->string (:type gradient)))
|
(str/ffmt "% (%)" path-and-name (uc/gradient-type->string (:type gradient)))
|
||||||
|
|
||||||
(some? image)
|
(some? image)
|
||||||
(str/ffmt "% (%)" name (tr "media.image"))
|
(str/ffmt "% (%)" path-and-name (tr "media.image"))
|
||||||
|
|
||||||
:else
|
:else
|
||||||
name)
|
path-and-name)
|
||||||
|
|
||||||
(cond
|
(cond
|
||||||
(some? color)
|
(some? color)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue