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