mirror of
https://github.com/penpot/penpot.git
synced 2026-09-19 02:16:14 +00:00
🐛 Fixed problem in handoff with images
This commit is contained in:
parent
e69d402b4f
commit
91db8a9247
@ -29,7 +29,8 @@
|
|||||||
"image/jpeg" "jpg"
|
"image/jpeg" "jpg"
|
||||||
"image/png" "png"
|
"image/png" "png"
|
||||||
"image/svg+xml" "svg"
|
"image/svg+xml" "svg"
|
||||||
"image/webp" "webp"))
|
"image/webp" "webp"
|
||||||
|
nil))
|
||||||
|
|
||||||
(mf/defc image-panel [{:keys [shapes locale]}]
|
(mf/defc image-panel [{:keys [shapes locale]}]
|
||||||
(let [shapes (->> shapes (filter has-image?))]
|
(let [shapes (->> shapes (filter has-image?))]
|
||||||
@ -50,8 +51,11 @@
|
|||||||
[:& copy-button {:data (cg/generate-css-props shape :height)}]]
|
[:& copy-button {:data (cg/generate-css-props shape :height)}]]
|
||||||
|
|
||||||
(let [mtype (-> shape :metadata :mtype)
|
(let [mtype (-> shape :metadata :mtype)
|
||||||
name (:name shape)]
|
name (:name shape)
|
||||||
|
extension (mtype->extension mtype)]
|
||||||
[:a.download-button {:target "_blank"
|
[: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))}
|
:href (cfg/resolve-file-media (-> shape :metadata))}
|
||||||
(t locale "handoff.attributes.image.download")])])))
|
(t locale "handoff.attributes.image.download")])])))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user