enhance: set notification's timeout to 1500

pull/3250/head
Tienson Qin 2021-11-23 19:43:12 +08:00
parent ad1af6e000
commit 537ff0727b
2 changed files with 7 additions and 6 deletions

View File

@ -157,11 +157,12 @@
(p/let [delete-blocks (db/delete-file-blocks! repo-url file)
[pages blocks] (extract-handler/extract-blocks-pages repo-url file content utf8-content)
_ (when-let [current-file (page-exists-in-another-file (first pages) file)]
(let [error (str "Page already exists with another file: " current-file)]
(state/pub-event! [:notification/show
{:content error
:status :error
:clear? false}])))
(when (not= file current-file)
(let [error (str "Page already exists with another file: " current-file ", current file: " file)]
(state/pub-event! [:notification/show
{:content error
:status :error
:clear? false}]))))
blocks (remove-non-exists-refs! blocks)
block-ids (map (fn [block] {:block/uuid (:block/uuid block)}) blocks)
pages (extract-handler/with-ref-pages pages blocks)]

View File

@ -24,6 +24,6 @@
:status status}))
(when clear?
(js/setTimeout #(clear! uid) 3000))
(js/setTimeout #(clear! uid) 1500))
uid)))