mirror of
https://github.com/heyarne/airsonic-ui.git
synced 2026-05-06 18:33:38 +02:00
Add library status to front page
This commit is contained in:
parent
2545ff3579
commit
096e1b4fb8
2 changed files with 8 additions and 2 deletions
|
|
@ -11,9 +11,14 @@
|
||||||
{:class-name "is-active"})
|
{:class-name "is-active"})
|
||||||
[:a {:href (apply url-for route)} label]]))]])
|
[:a {:href (apply url-for route)} label]]))]])
|
||||||
|
|
||||||
(defn main [route {:keys [album-list]}]
|
(defn main [route {:keys [scan-status album-list]}]
|
||||||
|
(println scan-status "status")
|
||||||
[:div
|
[:div
|
||||||
[:h2.title "Your library"]
|
[:h2.title "Your library"]
|
||||||
|
(if (:count scan-status)
|
||||||
|
[:p.subtitle.is-5.has-text-grey "Containing " [:strong (:count scan-status)] " items"]
|
||||||
|
(when (:scanning scan-status)
|
||||||
|
[:p.subtitle.is-5.has-text-grey "Scanning…"]))
|
||||||
(let [items [[[::routes/library {:criteria "recent"} nil] "Recently played"]
|
(let [items [[[::routes/library {:criteria "recent"} nil] "Recently played"]
|
||||||
[[::routes/library {:criteria "newest"} nil] "Newest additions"]
|
[[::routes/library {:criteria "newest"} nil] "Newest additions"]
|
||||||
[[::routes/library {:criteria "starred"} nil] "Starred"]]]
|
[[::routes/library {:criteria "starred"} nil] "Starred"]]]
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,8 @@
|
||||||
(defmethod -route-events ::library
|
(defmethod -route-events ::library
|
||||||
[route-id {:keys [criteria]} query]
|
[route-id {:keys [criteria]} query]
|
||||||
(if criteria
|
(if criteria
|
||||||
[:api/request "getAlbumList2" {:type criteria, :size 18}]
|
[[:api/request "getScanStatus"]
|
||||||
|
[:api/request "getAlbumList2" {:type criteria, :size 20}]]
|
||||||
[:routes/do-navigation [route-id {:criteria "recent"} query]]))
|
[:routes/do-navigation [route-id {:criteria "recent"} query]]))
|
||||||
|
|
||||||
(defmethod -route-events ::artist-view
|
(defmethod -route-events ::artist-view
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue