0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-13 10:38:13 -05:00

🐛 Fix upload image alert message

This commit is contained in:
Eva Marco 2024-02-29 16:12:47 +01:00
parent 42b68a786e
commit 9645ffba40
6 changed files with 17 additions and 5 deletions

View file

@ -47,6 +47,7 @@
(defn notify-start-loading
[]
(st/emit! (msg/show {:content (tr "media.loading")
:notification-type :toast
:type :info
:timeout nil})))

View file

@ -211,6 +211,7 @@
(watch [_ _ _]
(rx/concat
(rx/of (msg/show {:content (tr "media.loading")
:notification-type :toast
:type :info
:timeout nil
:tag :media-loading}))
@ -440,6 +441,7 @@
(rx/concat
(rx/of (msg/show {:content (tr "media.loading")
:notification-type :toast
:type :info
:timeout nil
:tag :media-loading}))

View file

@ -124,6 +124,7 @@
(let [message (tr "errors.paste-data-validation")]
(st/async-emit!
(msg/show {:content message
:notification-type :toast
:type :error
:timeout 3000})))
@ -138,6 +139,7 @@
[error]
(ts/schedule
#(st/emit! (msg/show {:content "Internal Assertion Error"
:notification-type :toast
:type :error
:timeout 3000})))
@ -153,6 +155,7 @@
(ts/schedule
#(st/emit!
(msg/show {:content "Something wrong has happened (on worker)."
:notification-type :toast
:type :error
:timeout 3000})))
@ -166,6 +169,7 @@
[_]
(ts/schedule
#(st/emit! (msg/show {:content "SVG is invalid or malformed"
:notification-type :toast
:type :error
:timeout 3000}))))
@ -174,6 +178,7 @@
[_]
(ts/schedule
#(st/emit! (msg/show {:content "There was an error with the comment"
:notification-type :toast
:type :error
:timeout 3000}))))

View file

@ -33,6 +33,7 @@
:links (:links 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-inline-msg (or (= :inline (:notification-type message)) (and (some? (:position message)) (= :floating (:position message))))]
@ -42,5 +43,7 @@
[:& toast-notification toast-message]
is-inline-msg
[:& inline-notification inline-message]
is-context-msg
[:& context-notification context-message]
:else
[:& context-notification context-message]))))
[:& toast-notification toast-message]))))

View file

@ -44,10 +44,10 @@
}
.info {
--bg-color: var(--alert-background-color-info);
--fg-color: var(--alert-text-foreground-color-info);
--icon-color: var(--alert-icon-foreground-color-info);
--border-color: var(--alert-border-color-info);
--toast-notification-bg-color: var(--alert-background-color-info);
--toast-notification-fg-color: var(--alert-text-foreground-color-info);
--toast-notification-icon-color: var(--alert-icon-foreground-color-info);
--toast-notification-border-color: var(--alert-border-color-info);
}
.default {

View file

@ -135,6 +135,7 @@
(fn [_]
(wapi/write-to-clipboard current-link)
(st/emit! (msg/show {:type :info
:notification-type :toast
:content (tr "common.share-link.link-copied-success")
:timeout 1000})))