mirror of
https://github.com/penpot/penpot.git
synced 2025-05-19 08:56:10 +02:00
Merge pull request #3352 from penpot/niwinz-bugfixes
✨ Improvements & bugfixes
This commit is contained in:
commit
5ea80c018f
13 changed files with 365 additions and 83 deletions
|
@ -78,7 +78,7 @@
|
|||
(rx/mapcat (fn [msg]
|
||||
(case (unchecked-get msg "type")
|
||||
"success" (rx/of (unchecked-get msg "payload"))
|
||||
"failure" (rx/throw (unchecked-get msg "payload")))))
|
||||
"failure" (rx/throw (js/Error. (unchecked-get msg "payload"))))))
|
||||
(rx/take 1))))
|
||||
|
||||
(defn init!
|
||||
|
@ -88,6 +88,6 @@
|
|||
(dom/set-attribute! iframe "src" origin)
|
||||
(dom/set-attribute! iframe "hidden" true)
|
||||
(dom/append-child! js/document.body iframe)
|
||||
|
||||
(.addEventListener js/window "message" on-message)
|
||||
(set! instance iframe)
|
||||
(.addEventListener js/window "message" on-message)))
|
||||
))
|
||||
|
|
|
@ -76,7 +76,12 @@
|
|||
(when (and visible? (not thumbnail-uri))
|
||||
(->> (ask-for-thumbnail file-id revn)
|
||||
(rx/subs (fn [url]
|
||||
(st/emit! (dd/set-file-thumbnail file-id url)))))))
|
||||
(st/emit! (dd/set-file-thumbnail file-id url)))
|
||||
(fn [cause]
|
||||
(log/error :hint "unable to render thumbnail"
|
||||
:file-if file-id
|
||||
:revn revn
|
||||
:message (ex-message cause)))))))
|
||||
|
||||
[:div.grid-item-th
|
||||
{:style {:background-color background-color}
|
||||
|
|
|
@ -229,8 +229,8 @@
|
|||
|
||||
(defn- send-failure!
|
||||
"Sends a failure message."
|
||||
[id payload]
|
||||
(send-answer! id "failure" payload))
|
||||
[id cause]
|
||||
(send-answer! id "failure" (ex-message cause)))
|
||||
|
||||
(defn- send-ready!
|
||||
"Sends a ready message."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue