Quellcode durchsuchen

fix: refresh button's background should not spin when refreshing

Peng Xiao vor 4 Jahren
Ursprung
Commit
3fa04b4c5f
2 geänderte Dateien mit 4 neuen und 2 gelöschten Zeilen
  1. 2 0
      resources/css/common.css
  2. 2 2
      src/main/frontend/components/repo.cljs

+ 2 - 0
resources/css/common.css

@@ -726,10 +726,12 @@ li p:last-child,
 
 .loader-reverse {
     -webkit-animation: spin 2s infinite linear reverse;
+    animation: spin 2s infinite linear reverse;
 }
 
 .loader {
     -webkit-animation: spin 2s infinite linear;
+    animation: spin 2s infinite linear;
 }
 
 .canceled,

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

@@ -99,12 +99,12 @@
       (when-not (= repo config/local-repo)
         (if (and nfs-repo? (nfs-handler/supported?))
           (let [syncing? (state/sub :graph/syncing?)]
-            [:div.opacity-60.refresh.hover:opacity-100 {:class (if syncing? "loader-reverse" "initial")}
+            [:div.opacity-60.refresh.hover:opacity-100
              [:a.button
               {:on-click #(nfs-handler/refresh! repo refresh-cb)
                :title (str "Import files from the local directory: " (config/get-local-dir repo) ".\nVersion: "
                            version/version)}
-              svg/refresh]])
+              [:div {:class (if syncing? "loader-reverse" "initial")} svg/refresh]]])
           (let [changed-files (state/sub [:repo/changed-files repo])
                 should-push? (seq changed-files)
                 git-status (state/sub [:git/status repo])