Fix repo loading bug, update dependencies

* fix UI getting frozen in manage repos view
* update dependencies
This commit is contained in:
Teemu Patja 2017-04-13 12:18:39 +03:00
parent cecbd6745b
commit 921b86ff7f
No known key found for this signature in database
GPG Key ID: F5B7035E6580FD4C
2 changed files with 19 additions and 17 deletions

View File

@ -4,13 +4,13 @@
:dependencies [[metosin/compojure-api "1.1.10"
:exclusions [joda-time]]
[re-frame "0.9.2"]
[cljs-ajax "0.5.8"]
[cljs-ajax "0.5.9"]
[secretary "1.2.3"]
[reagent-utils "0.2.1"]
[reagent "0.6.1"]
[org.clojure/clojurescript "1.9.495"]
[org.clojure/clojurescript "1.9.518"]
[org.clojure/clojure "1.8.0"]
[selmer "1.10.6"]
[selmer "1.10.7"]
[markdown-clj "0.9.98"]
[ring-middleware-format "0.7.2"]
[metosin/ring-http-response "0.8.2"]
@ -42,7 +42,7 @@
[mpg "1.3.0"]
[pandect "0.6.1"]
[cljsjs/moment "2.17.1-0"]
[org.clojure/tools.nrepl "0.2.12"]
[org.clojure/tools.nrepl "0.2.13"]
[com.cemerick/piggieback "0.2.1"]
[jarohen/chime "0.2.0"]
[com.andrewmcveigh/cljs-time "0.4.0"]
@ -112,10 +112,10 @@
[pjstadig/humane-test-output "0.8.1"]
[doo "0.1.7"]
[binaryage/devtools "0.9.2"]
[figwheel-sidecar "0.5.9"]
[org.clojure/tools.nrepl "0.2.12"]
[figwheel-sidecar "0.5.10"]
[org.clojure/tools.nrepl "0.2.13"]
[com.cemerick/piggieback "0.2.1"]
[sablono "0.7.7"]]
[sablono "0.8.0"]]
:plugins [[com.jakemccrary/lein-test-refresh "0.14.0"]
[lein-doo "0.1.7"]
[lein-figwheel "0.5.9"]]
@ -140,7 +140,7 @@
:injections [(require 'pjstadig.humane-test-output)
(pjstadig.humane-test-output/activate!)]}
:test {:resource-paths ["env/dev/resources" "env/test/resources"]
:dependencies [[devcards "0.2.2"]]
:dependencies [[devcards "0.2.3"]]
:cljsbuild
{:builds
{:test

View File

@ -213,15 +213,17 @@
(reg-event-fx
:load-user-repos
(fn [{:keys [db]} [_]]
(conj {:db (assoc db :repos-loading? true)}
(when-let [token (get-admin-token db)]
:http {:method GET
:url "/api/user/repositories"
:params {:token token}
:on-success #(dispatch [:set-user-repos (:repositories %)])
:on-error #(dispatch [:set-flash-message
:error "Failed to load repositories"])
:finally #(dispatch [:clear-repos-loading])}))))
(let [token (get-admin-token db)]
(conj {:db (if token (assoc db :repos-loading? true)
db)}
(when token
{:http {:method GET
:url "/api/user/repositories"
:params {:token token}
:on-success #(dispatch [:set-user-repos (:repositories %)])
:on-error #(dispatch [:set-flash-message
:error "Failed to load repositories"])
:finally #(dispatch [:clear-repos-loading])}})))))
(defn update-repo-state [all-repos full-name data]