diff options
-rw-r--r-- | src/backend/tubo/routes.clj | 2 | ||||
-rw-r--r-- | src/frontend/tubo/events.cljs | 5 | ||||
-rw-r--r-- | src/frontend/tubo/routes.cljs | 7 | ||||
-rw-r--r-- | src/frontend/tubo/views/playlists.cljs (renamed from src/frontend/tubo/views/bookmarks.cljs) | 4 |
4 files changed, 12 insertions, 6 deletions
diff --git a/src/backend/tubo/routes.clj b/src/backend/tubo/routes.clj index 2bf56f8..1492139 100644 --- a/src/backend/tubo/routes.clj +++ b/src/backend/tubo/routes.clj @@ -20,7 +20,7 @@ ["/playlist" handler/index] ["/kiosk" handler/index] ["/settings" handler/index] - ["/bookmarks" handler/index] + ["/playlists" handler/index] ["/api" ["/services" ["" {:get handler/services}] diff --git a/src/frontend/tubo/events.cljs b/src/frontend/tubo/events.cljs index 0ee184d..889719d 100644 --- a/src/frontend/tubo/events.cljs +++ b/src/frontend/tubo/events.cljs @@ -656,3 +656,8 @@ (fn [{:keys [db store]} [_ key val]] {:db (assoc-in db [:settings key] val) :store (assoc store key val)})) + +(rf/reg-event-fx + ::get-playlists-page + (fn [_] + {::document-title! "Playlists"})) diff --git a/src/frontend/tubo/routes.cljs b/src/frontend/tubo/routes.cljs index 4cf97c3..b062544 100644 --- a/src/frontend/tubo/routes.cljs +++ b/src/frontend/tubo/routes.cljs @@ -4,10 +4,10 @@ [reitit.frontend.easy :as rfe] [re-frame.core :as rf] [tubo.events :as events] - [tubo.views.bookmarks :as bookmarks] [tubo.views.channel :as channel] [tubo.views.kiosk :as kiosk] [tubo.views.playlist :as playlist] + [tubo.views.playlists :as playlists] [tubo.views.search :as search] [tubo.views.settings :as settings] [tubo.views.stream :as stream])) @@ -45,8 +45,9 @@ (rf/dispatch [::events/get-kiosk-page serviceId kioskId]))}]}] ["/settings" {:view settings/settings-page :name ::settings}] - ["/bookmarks" {:view bookmarks/bookmarks-page - :name ::bookmarks}]])) + ["/playlists" {:view playlists/playlists-page + :name ::playlists + :controllers [{:start #(rf/dispatch [::events/get-playlists-page])}]}]])) (defn on-navigate [new-match] diff --git a/src/frontend/tubo/views/bookmarks.cljs b/src/frontend/tubo/views/playlists.cljs index 3f47c02..b640960 100644 --- a/src/frontend/tubo/views/bookmarks.cljs +++ b/src/frontend/tubo/views/playlists.cljs @@ -1,11 +1,11 @@ -(ns tubo.views.bookmarks +(ns tubo.views.playlists (:require [re-frame.core :as rf] [tubo.components.items :as items] [tubo.components.layout :as layout] [tubo.events :as events])) -(defn bookmarks-page +(defn playlists-page [] (let [service-color @(rf/subscribe [:service-color]) bookmarks @(rf/subscribe [:bookmarks])] |