mirror of
https://github.com/penpot/penpot.git
synced 2025-05-10 23:26:39 +02:00
🐛 Fix upload image alert message
This commit is contained in:
parent
42b68a786e
commit
9645ffba40
6 changed files with 17 additions and 5 deletions
|
@ -47,6 +47,7 @@
|
||||||
(defn notify-start-loading
|
(defn notify-start-loading
|
||||||
[]
|
[]
|
||||||
(st/emit! (msg/show {:content (tr "media.loading")
|
(st/emit! (msg/show {:content (tr "media.loading")
|
||||||
|
:notification-type :toast
|
||||||
:type :info
|
:type :info
|
||||||
:timeout nil})))
|
:timeout nil})))
|
||||||
|
|
||||||
|
|
|
@ -211,6 +211,7 @@
|
||||||
(watch [_ _ _]
|
(watch [_ _ _]
|
||||||
(rx/concat
|
(rx/concat
|
||||||
(rx/of (msg/show {:content (tr "media.loading")
|
(rx/of (msg/show {:content (tr "media.loading")
|
||||||
|
:notification-type :toast
|
||||||
:type :info
|
:type :info
|
||||||
:timeout nil
|
:timeout nil
|
||||||
:tag :media-loading}))
|
:tag :media-loading}))
|
||||||
|
@ -440,6 +441,7 @@
|
||||||
|
|
||||||
(rx/concat
|
(rx/concat
|
||||||
(rx/of (msg/show {:content (tr "media.loading")
|
(rx/of (msg/show {:content (tr "media.loading")
|
||||||
|
:notification-type :toast
|
||||||
:type :info
|
:type :info
|
||||||
:timeout nil
|
:timeout nil
|
||||||
:tag :media-loading}))
|
:tag :media-loading}))
|
||||||
|
|
|
@ -124,6 +124,7 @@
|
||||||
(let [message (tr "errors.paste-data-validation")]
|
(let [message (tr "errors.paste-data-validation")]
|
||||||
(st/async-emit!
|
(st/async-emit!
|
||||||
(msg/show {:content message
|
(msg/show {:content message
|
||||||
|
:notification-type :toast
|
||||||
:type :error
|
:type :error
|
||||||
:timeout 3000})))
|
:timeout 3000})))
|
||||||
|
|
||||||
|
@ -138,6 +139,7 @@
|
||||||
[error]
|
[error]
|
||||||
(ts/schedule
|
(ts/schedule
|
||||||
#(st/emit! (msg/show {:content "Internal Assertion Error"
|
#(st/emit! (msg/show {:content "Internal Assertion Error"
|
||||||
|
:notification-type :toast
|
||||||
:type :error
|
:type :error
|
||||||
:timeout 3000})))
|
:timeout 3000})))
|
||||||
|
|
||||||
|
@ -153,6 +155,7 @@
|
||||||
(ts/schedule
|
(ts/schedule
|
||||||
#(st/emit!
|
#(st/emit!
|
||||||
(msg/show {:content "Something wrong has happened (on worker)."
|
(msg/show {:content "Something wrong has happened (on worker)."
|
||||||
|
:notification-type :toast
|
||||||
:type :error
|
:type :error
|
||||||
:timeout 3000})))
|
:timeout 3000})))
|
||||||
|
|
||||||
|
@ -166,6 +169,7 @@
|
||||||
[_]
|
[_]
|
||||||
(ts/schedule
|
(ts/schedule
|
||||||
#(st/emit! (msg/show {:content "SVG is invalid or malformed"
|
#(st/emit! (msg/show {:content "SVG is invalid or malformed"
|
||||||
|
:notification-type :toast
|
||||||
:type :error
|
:type :error
|
||||||
:timeout 3000}))))
|
:timeout 3000}))))
|
||||||
|
|
||||||
|
@ -174,6 +178,7 @@
|
||||||
[_]
|
[_]
|
||||||
(ts/schedule
|
(ts/schedule
|
||||||
#(st/emit! (msg/show {:content "There was an error with the comment"
|
#(st/emit! (msg/show {:content "There was an error with the comment"
|
||||||
|
:notification-type :toast
|
||||||
:type :error
|
:type :error
|
||||||
:timeout 3000}))))
|
:timeout 3000}))))
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
:links (:links message)
|
:links (:links message)
|
||||||
:content (:content message)}
|
:content (:content message)}
|
||||||
|
|
||||||
|
is-context-msg (and (nil? (:timeout message)) (nil? (:actions message)))
|
||||||
is-toast-msg (or (= :toast (:notification-type message)) (some? (:timeout message)))
|
is-toast-msg (or (= :toast (:notification-type message)) (some? (:timeout message)))
|
||||||
is-inline-msg (or (= :inline (:notification-type message)) (and (some? (:position message)) (= :floating (:position message))))]
|
is-inline-msg (or (= :inline (:notification-type message)) (and (some? (:position message)) (= :floating (:position message))))]
|
||||||
|
|
||||||
|
@ -42,5 +43,7 @@
|
||||||
[:& toast-notification toast-message]
|
[:& toast-notification toast-message]
|
||||||
is-inline-msg
|
is-inline-msg
|
||||||
[:& inline-notification inline-message]
|
[:& inline-notification inline-message]
|
||||||
|
is-context-msg
|
||||||
|
[:& context-notification context-message]
|
||||||
:else
|
:else
|
||||||
[:& context-notification context-message]))))
|
[:& toast-notification toast-message]))))
|
||||||
|
|
|
@ -44,10 +44,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.info {
|
.info {
|
||||||
--bg-color: var(--alert-background-color-info);
|
--toast-notification-bg-color: var(--alert-background-color-info);
|
||||||
--fg-color: var(--alert-text-foreground-color-info);
|
--toast-notification-fg-color: var(--alert-text-foreground-color-info);
|
||||||
--icon-color: var(--alert-icon-foreground-color-info);
|
--toast-notification-icon-color: var(--alert-icon-foreground-color-info);
|
||||||
--border-color: var(--alert-border-color-info);
|
--toast-notification-border-color: var(--alert-border-color-info);
|
||||||
}
|
}
|
||||||
|
|
||||||
.default {
|
.default {
|
||||||
|
|
|
@ -135,6 +135,7 @@
|
||||||
(fn [_]
|
(fn [_]
|
||||||
(wapi/write-to-clipboard current-link)
|
(wapi/write-to-clipboard current-link)
|
||||||
(st/emit! (msg/show {:type :info
|
(st/emit! (msg/show {:type :info
|
||||||
|
:notification-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