mirror of
https://github.com/penpot/penpot.git
synced 2025-06-03 08:21:39 +02:00
🐛 Fix incorrect params for notifications
This commit is contained in:
parent
215f6fc0ab
commit
aa39de4ea8
6 changed files with 22 additions and 22 deletions
|
@ -75,8 +75,8 @@
|
||||||
(rx/of (ntf/dialog
|
(rx/of (ntf/dialog
|
||||||
:content (tr "notifications.by-code.upgrade-version")
|
:content (tr "notifications.by-code.upgrade-version")
|
||||||
:controls :inline-actions
|
:controls :inline-actions
|
||||||
:notification-type :inline
|
:type :inline
|
||||||
:type level
|
:level level
|
||||||
:actions [{:label "Refresh" :callback force-reload!}]
|
:actions [{:label "Refresh" :callback force-reload!}]
|
||||||
:tag :notification)))
|
:tag :notification)))
|
||||||
|
|
||||||
|
|
|
@ -47,8 +47,8 @@
|
||||||
(defn notify-start-loading
|
(defn notify-start-loading
|
||||||
[]
|
[]
|
||||||
(st/emit! (ntf/show {:content (tr "media.loading")
|
(st/emit! (ntf/show {:content (tr "media.loading")
|
||||||
:notification-type :toast
|
:type :toast
|
||||||
:type :info
|
:level :info
|
||||||
:timeout nil})))
|
:timeout nil})))
|
||||||
|
|
||||||
(defn notify-finished-loading
|
(defn notify-finished-loading
|
||||||
|
|
|
@ -221,8 +221,8 @@
|
||||||
(watch [_ _ _]
|
(watch [_ _ _]
|
||||||
(rx/concat
|
(rx/concat
|
||||||
(rx/of (ntf/show {:content (tr "media.loading")
|
(rx/of (ntf/show {:content (tr "media.loading")
|
||||||
:notification-type :toast
|
:type :toast
|
||||||
:type :info
|
:level :info
|
||||||
:timeout nil
|
:timeout nil
|
||||||
:tag :media-loading}))
|
:tag :media-loading}))
|
||||||
(->> (if (seq uris)
|
(->> (if (seq uris)
|
||||||
|
@ -449,8 +449,8 @@
|
||||||
|
|
||||||
(rx/concat
|
(rx/concat
|
||||||
(rx/of (ntf/show {:content (tr "media.loading")
|
(rx/of (ntf/show {:content (tr "media.loading")
|
||||||
:notification-type :toast
|
:type :toast
|
||||||
:type :info
|
:level :info
|
||||||
:timeout nil
|
:timeout nil
|
||||||
:tag :media-loading}))
|
:tag :media-loading}))
|
||||||
(->> (rp/cmd! :clone-file-media-object params)
|
(->> (rp/cmd! :clone-file-media-object params)
|
||||||
|
|
|
@ -124,8 +124,8 @@
|
||||||
(let [message (tr "errors.paste-data-validation")]
|
(let [message (tr "errors.paste-data-validation")]
|
||||||
(st/async-emit!
|
(st/async-emit!
|
||||||
(ntf/show {:content message
|
(ntf/show {:content message
|
||||||
:notification-type :toast
|
:type :toast
|
||||||
:type :error
|
:level :error
|
||||||
:timeout 3000})))
|
:timeout 3000})))
|
||||||
|
|
||||||
:else
|
:else
|
||||||
|
@ -139,8 +139,8 @@
|
||||||
[error]
|
[error]
|
||||||
(ts/schedule
|
(ts/schedule
|
||||||
#(st/emit! (ntf/show {:content "Internal Assertion Error"
|
#(st/emit! (ntf/show {:content "Internal Assertion Error"
|
||||||
:notification-type :toast
|
:type :toast
|
||||||
:type :error
|
:level :error
|
||||||
:timeout 3000})))
|
:timeout 3000})))
|
||||||
|
|
||||||
(print-group! "Internal Assertion Error"
|
(print-group! "Internal Assertion Error"
|
||||||
|
@ -155,8 +155,8 @@
|
||||||
(ts/schedule
|
(ts/schedule
|
||||||
#(st/emit!
|
#(st/emit!
|
||||||
(ntf/show {:content "Something wrong has happened (on worker)."
|
(ntf/show {:content "Something wrong has happened (on worker)."
|
||||||
:notification-type :toast
|
:type :toast
|
||||||
:type :error
|
:level :error
|
||||||
:timeout 3000})))
|
:timeout 3000})))
|
||||||
|
|
||||||
(print-group! "Internal Worker Error"
|
(print-group! "Internal Worker Error"
|
||||||
|
@ -169,8 +169,8 @@
|
||||||
[_]
|
[_]
|
||||||
(ts/schedule
|
(ts/schedule
|
||||||
#(st/emit! (ntf/show {:content "SVG is invalid or malformed"
|
#(st/emit! (ntf/show {:content "SVG is invalid or malformed"
|
||||||
:notification-type :toast
|
:type :toast
|
||||||
:type :error
|
:level :error
|
||||||
:timeout 3000}))))
|
:timeout 3000}))))
|
||||||
|
|
||||||
;; TODO: should be handled in the event and not as general error handler
|
;; TODO: should be handled in the event and not as general error handler
|
||||||
|
@ -178,8 +178,8 @@
|
||||||
[_]
|
[_]
|
||||||
(ts/schedule
|
(ts/schedule
|
||||||
#(st/emit! (ntf/show {:content "There was an error with the comment"
|
#(st/emit! (ntf/show {:content "There was an error with the comment"
|
||||||
:notification-type :toast
|
:type :toast
|
||||||
:type :error
|
:level :error
|
||||||
:timeout 3000}))))
|
:timeout 3000}))))
|
||||||
|
|
||||||
;; That are special case server-errors that should be treated
|
;; That are special case server-errors that should be treated
|
||||||
|
|
|
@ -99,8 +99,8 @@
|
||||||
(fn [event]
|
(fn [event]
|
||||||
(dom/prevent-default event)
|
(dom/prevent-default event)
|
||||||
(wapi/write-to-clipboard (:token created))
|
(wapi/write-to-clipboard (:token created))
|
||||||
(st/emit! (ntf/show {:type :info
|
(st/emit! (ntf/show {:level :info
|
||||||
:notification-type :toast
|
:type :toast
|
||||||
:content (tr "dashboard.access-tokens.copied-success")
|
:content (tr "dashboard.access-tokens.copied-success")
|
||||||
:timeout 7000}))))]
|
:timeout 7000}))))]
|
||||||
|
|
||||||
|
|
|
@ -134,8 +134,8 @@
|
||||||
copy-link
|
copy-link
|
||||||
(fn [_]
|
(fn [_]
|
||||||
(wapi/write-to-clipboard current-link)
|
(wapi/write-to-clipboard current-link)
|
||||||
(st/emit! (ntf/show {:type :info
|
(st/emit! (ntf/show {:level :info
|
||||||
:notification-type :toast
|
:type :toast
|
||||||
:content (tr "common.share-link.link-copied-success")
|
:content (tr "common.share-link.link-copied-success")
|
||||||
:timeout 1000})))
|
:timeout 1000})))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue