mirror of
https://github.com/penpot/penpot.git
synced 2025-01-25 07:58:49 -05:00
🐛 Fixed problem in handoff with images
This commit is contained in:
parent
e69d402b4f
commit
91db8a9247
1 changed files with 7 additions and 3 deletions
|
@ -29,7 +29,8 @@
|
|||
"image/jpeg" "jpg"
|
||||
"image/png" "png"
|
||||
"image/svg+xml" "svg"
|
||||
"image/webp" "webp"))
|
||||
"image/webp" "webp"
|
||||
nil))
|
||||
|
||||
(mf/defc image-panel [{:keys [shapes locale]}]
|
||||
(let [shapes (->> shapes (filter has-image?))]
|
||||
|
@ -50,8 +51,11 @@
|
|||
[:& copy-button {:data (cg/generate-css-props shape :height)}]]
|
||||
|
||||
(let [mtype (-> shape :metadata :mtype)
|
||||
name (:name shape)]
|
||||
name (:name shape)
|
||||
extension (mtype->extension mtype)]
|
||||
[:a.download-button {:target "_blank"
|
||||
:download (str name "." (mtype->extension mtype))
|
||||
:download (if extension
|
||||
(str name "." extension)
|
||||
name)
|
||||
:href (cfg/resolve-file-media (-> shape :metadata))}
|
||||
(t locale "handoff.attributes.image.download")])])))
|
||||
|
|
Loading…
Add table
Reference in a new issue