mirror of
https://github.com/logseq/logseq.git
synced 2026-05-28 14:39:48 +00:00
enhance(plugin): suppress API rate-limit notices; replace loader
x
This commit is contained in:
@@ -1668,7 +1668,7 @@
|
||||
[:div
|
||||
[:div (t :plugin/checking-for-updates)]
|
||||
(when sub-content [:p.opacity-60 sub-content])]
|
||||
(ui/loading ""))
|
||||
:info)
|
||||
(when uid (notification/clear! uid))))
|
||||
[check-pending? sub-content])
|
||||
|
||||
|
||||
@@ -354,6 +354,7 @@
|
||||
[(t :plugin/up-to-date ":)") :success]
|
||||
|
||||
[error-code :error])
|
||||
rate-limit-error? (some-> msg str (string/includes? "API rate limit"))
|
||||
pending? (seq (:plugin/updates-pending @state/state))]
|
||||
|
||||
(if (and only-check pending?)
|
||||
@@ -365,11 +366,12 @@
|
||||
(state/consume-updates-from-coming-plugin! payload true))
|
||||
|
||||
;; notify human tips
|
||||
(notification/show!
|
||||
(str
|
||||
(if (= :error type) "[Error]" "")
|
||||
"<" (:id payload) "> "
|
||||
msg) type)))
|
||||
(when-not rate-limit-error?
|
||||
(notification/show!
|
||||
(str
|
||||
(if (= :error type) "[Error]" "")
|
||||
"<" (:id payload) "> "
|
||||
msg) type))))
|
||||
|
||||
(when-not fake-error?
|
||||
(js/console.error "Update Error:" (:error-code payload))))
|
||||
|
||||
Reference in New Issue
Block a user