1
0
Fork 0
mirror of https://github.com/heyarne/airsonic-ui.git synced 2026-05-06 18:33:38 +02:00

Add tabs for newest and starred tracks

This commit is contained in:
Arne Schlüter 2018-08-28 18:12:11 +02:00
commit 2545ff3579
5 changed files with 40 additions and 20 deletions

View file

@ -11,7 +11,8 @@
[airsonic-ui.views.login :refer [login-form]]
[airsonic-ui.views.album :as album]
[airsonic-ui.views.song :as song]
[airsonic-ui.components.search.views :as search]))
[airsonic-ui.components.search.views :as search]
[airsonic-ui.components.library.views :as library]))
;; TODO: Find better names and places for these.
@ -26,11 +27,6 @@
[:div.content>p {:dangerouslySetInnerHTML {:__html (:biography artist-info)}}]
[album/listing (:album artist)]])
(defn most-recent [{:keys [album-list]}]
[:div
[:h2.title "Recently played"]
[album/listing (:album album-list)]])
(defn sidebar [user]
[:aside.menu.section
[search/form]
@ -53,6 +49,7 @@
(defn app [route-id params query]
(let [user @(subscribe [::subs/user])
;; TODO: Move this to a layer 3 subscription ↓
route-events @(subscribe [:routes/events-for-current-route])
content @(subscribe [:api/route-data route-events])]
[:div
@ -63,7 +60,7 @@
[:section.section
[breadcrumbs content]
(case route-id
::routes/main [most-recent content]
::routes/library [library/main [route-id params query] content]
::routes/artist-view [artist-detail content]
::routes/album-view [album-detail content]
::routes/search [search/results content])]]]