feat: add git auto push option to settings

Also, add ctrl-s for auto-pushing
This commit is contained in:
Tienson Qin
2021-01-12 22:52:42 +08:00
parent 4dc336ae52
commit 1b38b9deb1
6 changed files with 31 additions and 4 deletions

View File

@@ -2101,4 +2101,11 @@
(defn periodically-save!
[]
(js/setInterval save-current-block-when-idle! 1000))
(js/setInterval save-current-block-when-idle! 500))
(defn save!
[]
(when-let [repo (state/get-current-repo)]
(save-current-block-when-idle! {:check-idle? false})
(when (string/starts-with? repo "https://") ; git repo
(repo-handler/auto-push!))))