Fix repo loading bug, update dependencies
* fix UI getting frozen in manage repos view * update dependencies
This commit is contained in:
parent
cecbd6745b
commit
921b86ff7f
16
project.clj
16
project.clj
|
@ -4,13 +4,13 @@
|
||||||
:dependencies [[metosin/compojure-api "1.1.10"
|
:dependencies [[metosin/compojure-api "1.1.10"
|
||||||
:exclusions [joda-time]]
|
:exclusions [joda-time]]
|
||||||
[re-frame "0.9.2"]
|
[re-frame "0.9.2"]
|
||||||
[cljs-ajax "0.5.8"]
|
[cljs-ajax "0.5.9"]
|
||||||
[secretary "1.2.3"]
|
[secretary "1.2.3"]
|
||||||
[reagent-utils "0.2.1"]
|
[reagent-utils "0.2.1"]
|
||||||
[reagent "0.6.1"]
|
[reagent "0.6.1"]
|
||||||
[org.clojure/clojurescript "1.9.495"]
|
[org.clojure/clojurescript "1.9.518"]
|
||||||
[org.clojure/clojure "1.8.0"]
|
[org.clojure/clojure "1.8.0"]
|
||||||
[selmer "1.10.6"]
|
[selmer "1.10.7"]
|
||||||
[markdown-clj "0.9.98"]
|
[markdown-clj "0.9.98"]
|
||||||
[ring-middleware-format "0.7.2"]
|
[ring-middleware-format "0.7.2"]
|
||||||
[metosin/ring-http-response "0.8.2"]
|
[metosin/ring-http-response "0.8.2"]
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
[mpg "1.3.0"]
|
[mpg "1.3.0"]
|
||||||
[pandect "0.6.1"]
|
[pandect "0.6.1"]
|
||||||
[cljsjs/moment "2.17.1-0"]
|
[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"]
|
[com.cemerick/piggieback "0.2.1"]
|
||||||
[jarohen/chime "0.2.0"]
|
[jarohen/chime "0.2.0"]
|
||||||
[com.andrewmcveigh/cljs-time "0.4.0"]
|
[com.andrewmcveigh/cljs-time "0.4.0"]
|
||||||
|
@ -112,10 +112,10 @@
|
||||||
[pjstadig/humane-test-output "0.8.1"]
|
[pjstadig/humane-test-output "0.8.1"]
|
||||||
[doo "0.1.7"]
|
[doo "0.1.7"]
|
||||||
[binaryage/devtools "0.9.2"]
|
[binaryage/devtools "0.9.2"]
|
||||||
[figwheel-sidecar "0.5.9"]
|
[figwheel-sidecar "0.5.10"]
|
||||||
[org.clojure/tools.nrepl "0.2.12"]
|
[org.clojure/tools.nrepl "0.2.13"]
|
||||||
[com.cemerick/piggieback "0.2.1"]
|
[com.cemerick/piggieback "0.2.1"]
|
||||||
[sablono "0.7.7"]]
|
[sablono "0.8.0"]]
|
||||||
:plugins [[com.jakemccrary/lein-test-refresh "0.14.0"]
|
:plugins [[com.jakemccrary/lein-test-refresh "0.14.0"]
|
||||||
[lein-doo "0.1.7"]
|
[lein-doo "0.1.7"]
|
||||||
[lein-figwheel "0.5.9"]]
|
[lein-figwheel "0.5.9"]]
|
||||||
|
@ -140,7 +140,7 @@
|
||||||
:injections [(require 'pjstadig.humane-test-output)
|
:injections [(require 'pjstadig.humane-test-output)
|
||||||
(pjstadig.humane-test-output/activate!)]}
|
(pjstadig.humane-test-output/activate!)]}
|
||||||
:test {:resource-paths ["env/dev/resources" "env/test/resources"]
|
:test {:resource-paths ["env/dev/resources" "env/test/resources"]
|
||||||
:dependencies [[devcards "0.2.2"]]
|
:dependencies [[devcards "0.2.3"]]
|
||||||
:cljsbuild
|
:cljsbuild
|
||||||
{:builds
|
{:builds
|
||||||
{:test
|
{:test
|
||||||
|
|
|
@ -213,15 +213,17 @@
|
||||||
(reg-event-fx
|
(reg-event-fx
|
||||||
:load-user-repos
|
:load-user-repos
|
||||||
(fn [{:keys [db]} [_]]
|
(fn [{:keys [db]} [_]]
|
||||||
(conj {:db (assoc db :repos-loading? true)}
|
(let [token (get-admin-token db)]
|
||||||
(when-let [token (get-admin-token db)]
|
(conj {:db (if token (assoc db :repos-loading? true)
|
||||||
:http {:method GET
|
db)}
|
||||||
|
(when token
|
||||||
|
{:http {:method GET
|
||||||
:url "/api/user/repositories"
|
:url "/api/user/repositories"
|
||||||
:params {:token token}
|
:params {:token token}
|
||||||
:on-success #(dispatch [:set-user-repos (:repositories %)])
|
:on-success #(dispatch [:set-user-repos (:repositories %)])
|
||||||
:on-error #(dispatch [:set-flash-message
|
:on-error #(dispatch [:set-flash-message
|
||||||
:error "Failed to load repositories"])
|
:error "Failed to load repositories"])
|
||||||
:finally #(dispatch [:clear-repos-loading])}))))
|
:finally #(dispatch [:clear-repos-loading])}})))))
|
||||||
|
|
||||||
|
|
||||||
(defn update-repo-state [all-repos full-name data]
|
(defn update-repo-state [all-repos full-name data]
|
||||||
|
|
Loading…
Reference in New Issue