enhance: disable git auto commit by default

Because many users have trouble with Git with sync services like
iCloud/OneDrive.
pull/2860/head
Tienson Qin 2021-09-22 18:49:43 +08:00
parent 7ea00869d9
commit c60fb5454a
2 changed files with 5 additions and 1 deletions

View File

@ -199,7 +199,7 @@
(rum/defcs switch-git-auto-commit-row < rum/reactive (rum/defcs switch-git-auto-commit-row < rum/reactive
[state t] [state t]
(let [enabled? (not (state/sub [:electron/user-cfgs :git/disable-auto-commit?]))] (let [enabled? (state/get-git-auto-commit-enabled?)]
[:div.it.sm:grid.sm:grid-cols-3.sm:gap-4.sm:items-start [:div.it.sm:grid.sm:grid-cols-3.sm:gap-4.sm:items-start
[:label.block.text-sm.font-medium.leading-5.opacity-70 [:label.block.text-sm.font-medium.leading-5.opacity-70
"Enable Git auto commit"] "Enable Git auto commit"]

View File

@ -1491,3 +1491,7 @@
(defn remove-watch-state [key] (defn remove-watch-state [key]
(remove-watch state key)) (remove-watch state key))
(defn get-git-auto-commit-enabled?
[]
(false? (sub [:electron/user-cfgs :git/disable-auto-commit?])))