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