mirror of
https://github.com/heyarne/airsonic-ui.git
synced 2026-05-07 02:33:39 +02:00
Make login-flow more robust and add more tests
This commit is contained in:
parent
84450479ae
commit
852a3193ab
9 changed files with 123 additions and 65 deletions
|
|
@ -2,6 +2,14 @@
|
|||
(:require [re-frame.core :as re-frame :refer [subscribe]]
|
||||
[airsonic-ui.utils.api :as api]))
|
||||
|
||||
(defn is-booting?
|
||||
"Predicate to tell whether our app is still in the process of initialization"
|
||||
[{:keys [credentials]} _]
|
||||
(and (not (map? credentials))
|
||||
(not (#{:credentials/not-found :credentials/verification-failure :credentials/logged-out} credentials))))
|
||||
|
||||
(re-frame/reg-sub ::is-booting? is-booting?)
|
||||
|
||||
;; can be used to query the user's credentials
|
||||
|
||||
(re-frame/reg-sub
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue