mirror of
https://github.com/heyarne/airsonic-ui.git
synced 2026-05-06 18:33:38 +02:00
Move navigation to effect
This commit is contained in:
parent
fe0e250648
commit
6117b921a6
6 changed files with 63 additions and 46 deletions
|
|
@ -21,16 +21,16 @@
|
|||
[:div
|
||||
[:button {:on-click #(re-frame/dispatch [::events/authenticate @user @pass])} "Submit"]]])))
|
||||
|
||||
(defn app [current-page]
|
||||
(defn app [route]
|
||||
(let [login @(re-frame/subscribe [::subs/login])]
|
||||
[:div
|
||||
[:h2 (str "Currently logged in as " (:u login))]
|
||||
[:a {:on-click #(re-frame/dispatch [::events/initialize-db]) :href "#"} "Logout"]]))
|
||||
|
||||
(defn main-panel []
|
||||
(let [current-page @(re-frame/subscribe [::subs/current-page])]
|
||||
(let [[route params query] @(re-frame/subscribe [::subs/current-route])]
|
||||
[:div
|
||||
[:h1 "Airsonic"]
|
||||
(case current-page
|
||||
(case route
|
||||
::routes/login [login-form]
|
||||
[app current-page])]))
|
||||
[app route])]))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue