mirror of
https://github.com/heyarne/airsonic-ui.git
synced 2026-05-06 18:33:38 +02:00
Cache API responses and make sure we remember more than just one
Closes #21. Squashed commit of the following: commit 964b29cf127cf51de86543d040bcb6c674b36d7e Author: Arne Schlüter <arne@schlueter.is> Date: Wed Aug 22 17:56:48 2018 +0200 Pass content for current route nicely to views commit b469a0a4b69457ddf3a679ac1acc82fbaffdc8fd Author: Arne Schlüter <arne@schlueter.is> Date: Wed Aug 22 16:01:04 2018 +0200 Add response cache in app-db commit da9faf89138f42ee544efc64c2e46787091b3dc7 Author: Arne Schlüter <arne@schlueter.is> Date: Wed Aug 22 13:40:57 2018 +0200 Move api helpers and tests to own namespace
This commit is contained in:
parent
dc6d883d5e
commit
2cdae0d683
13 changed files with 222 additions and 94 deletions
|
|
@ -26,7 +26,7 @@
|
|||
(defn most-recent [content]
|
||||
[:div
|
||||
[:h2.title "Recently played"]
|
||||
[album/listing (:album content)]])
|
||||
[album/listing (get-in content [:album-list :album])]])
|
||||
|
||||
(defn sidebar [user]
|
||||
[:aside.menu.section
|
||||
|
|
@ -49,7 +49,8 @@
|
|||
|
||||
(defn app [route-id params query]
|
||||
(let [user @(subscribe [::subs/user])
|
||||
content @(subscribe [::subs/current-content])]
|
||||
route-events @(subscribe [:routes/events-for-current-route])
|
||||
content @(subscribe [:api/route-data route-events])]
|
||||
[:div
|
||||
[:main.columns
|
||||
[:div.column.is-2.sidebar
|
||||
|
|
@ -66,7 +67,7 @@
|
|||
(defn main-panel []
|
||||
(let [notifications @(subscribe [::subs/notifications])
|
||||
is-booting? @(subscribe [::subs/is-booting?])
|
||||
[route-id params query] @(subscribe [::subs/current-route])]
|
||||
[route-id params query] @(subscribe [:routes/current-route])]
|
||||
[:div
|
||||
[notification-list notifications]
|
||||
(if is-booting?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue