fix: stuck importing from edn/json

Also, this commit added the progress UI for importing and removed the
:file/writes core.async channel.
This commit is contained in:
Tienson Qin
2022-08-25 16:45:04 +08:00
parent 6807931ee8
commit f4aa08fbd3
17 changed files with 164 additions and 275 deletions

View File

@@ -12,8 +12,13 @@
(when-let [current-repo (state/get-current-repo)]
[:div.export
[:h1.title "Export"]
[:ul.mr-1
[:li.mb-4
[:a.font-medium {:on-click #(export/export-repo-as-edn-v2! current-repo)}
(t :export-edn)]]
[:li.mb-4
[:a.font-medium {:on-click #(export/export-repo-as-json-v2! current-repo)}
(t :export-json)]]
(when (util/electron?)
[:li.mb-4
[:a.font-medium {:on-click #(export/export-repo-as-html! current-repo)}
@@ -25,12 +30,6 @@
[:li.mb-4
[:a.font-medium {:on-click #(export/export-repo-as-opml! current-repo)}
(t :export-opml)]])
[:li.mb-4
[:a.font-medium {:on-click #(export/export-repo-as-edn-v2! current-repo)}
(t :export-edn)]]
[:li.mb-4
[:a.font-medium {:on-click #(export/export-repo-as-json-v2! current-repo)}
(t :export-json)]]
(when-not (mobile-util/native-platform?)
[:li.mb-4
[:a.font-medium {:on-click #(export/export-repo-as-roam-json! current-repo)}