Browse Source

fix: only write config.edn when it doesn't exists

Tienson Qin 4 years ago
parent
commit
fca063f004

+ 1 - 3
resources/css/common.css

@@ -731,10 +731,8 @@ a.fade-link:hover {
 
 /* < > buttons */
 
-a[title="Go Back"],
-a[title="Go Forward"] {
+a.navigation {
     border-radius: 3px;
-    opacity: 1;
     transition: .3s;
 }
 

+ 2 - 2
src/main/frontend/components/header.cljs

@@ -168,12 +168,12 @@
        (logo {:white? white?})
 
        (when (util/electron?)
-         [:a.mr-1.opacity-50.hover:opacity-100.it
+         [:a.mr-1.opacity-30.hover:opacity-100.it.navigation
           {:style {:margin-left -10}
            :title "Go Back" :on-click #(js/window.history.back)} (svg/arrow-left)])
 
        (when (util/electron?)
-         [:a.opacity-50.hover:opacity-100.it
+         [:a.opacity-30.hover:opacity-100.it.navigation
           {:style {:margin-right 15}
            :title "Go Forward" :on-click #(js/window.history.forward)} (svg/arrow-right)])
 

File diff suppressed because it is too large
+ 0 - 1
src/main/frontend/config.cljs


+ 6 - 9
src/main/frontend/handler/repo.cljs

@@ -59,16 +59,13 @@
         app-dir config/app-name
         dir (str repo-dir "/" app-dir)]
     (p/let [_ (fs/mkdir-if-not-exists dir)]
-      (let [default-content config/config-default-content]
+      (let [default-content config/config-default-content
+            path (str app-dir "/" config/config-file)]
         (p/let [file-exists? (fs/create-if-not-exists repo-url repo-dir (str app-dir "/" config/config-file) default-content)]
-          (let [path (str app-dir "/" config/config-file)
-                old-content (when file-exists?
-                              (db/get-file repo-url path))
-                content (or old-content default-content)]
-            (file-handler/reset-file! repo-url path content)
-            (common-handler/reset-config! repo-url content)
-            (when-not (= content old-content)
-              (git-handler/git-add repo-url path))))))))
+          (when-not file-exists?
+            (file-handler/reset-file! repo-url path default-content)
+            (common-handler/reset-config! repo-url default-content)
+            (git-handler/git-add repo-url path)))))))
 
 (defn create-contents-file
   [repo-url]

Some files were not shown because too many files changed in this diff