enhance: encrypt the default files before writing to the disk

This commit is contained in:
Tienson Qin
2021-02-07 22:14:47 +08:00
parent 191278c27f
commit 432f874c0c
2 changed files with 10 additions and 5 deletions

View File

@@ -73,6 +73,9 @@
(t :no)]]]]))
(defn encryption-setup-dialog
[repo-url]
(fn [close-fn]
(encryption-setup-dialog-inner repo-url close-fn)))
[repo-url close-fn]
(fn [close-modal-fn]
(let [close-fn (fn []
(close-fn)
(close-modal-fn))]
(encryption-setup-dialog-inner repo-url close-fn))))

View File

@@ -198,8 +198,10 @@
(:file/content %)) files)]
(file-handler/restore-config! repo-url content true))))
(when first-clone?
(create-default-files! repo-url)
(state/set-modal! (encryption/encryption-setup-dialog repo-url)))
(state/set-modal!
(encryption/encryption-setup-dialog
repo-url
#(create-default-files! repo-url))))
(when re-render?
(ui-handler/re-render-root! re-render-opts))
(state/set-importing-to-db! false)))