From 22cd895473596d49fc3ece8f4c05acb252e4db03 Mon Sep 17 00:00:00 2001 From: Miguel Ángel Moreno Date: Thu, 1 Feb 2024 21:39:50 +0100 Subject: feat(frontend): revert to bookmarks instead of playlists --- src/frontend/tubo/events.cljs | 4 ++-- src/frontend/tubo/routes.cljs | 6 +++--- src/frontend/tubo/views/bookmarks.cljs | 16 ++++++++++++++++ src/frontend/tubo/views/playlists.cljs | 16 ---------------- 4 files changed, 21 insertions(+), 21 deletions(-) create mode 100644 src/frontend/tubo/views/bookmarks.cljs delete mode 100644 src/frontend/tubo/views/playlists.cljs (limited to 'src/frontend') diff --git a/src/frontend/tubo/events.cljs b/src/frontend/tubo/events.cljs index f960baf..dcadf88 100644 --- a/src/frontend/tubo/events.cljs +++ b/src/frontend/tubo/events.cljs @@ -736,6 +736,6 @@ ::document-title! "Settings")))) (rf/reg-event-fx - ::get-playlists-page + ::get-bookmarks-page (fn [_] - {::document-title! "Playlists"})) + {::document-title! "Bookmarks"})) diff --git a/src/frontend/tubo/routes.cljs b/src/frontend/tubo/routes.cljs index 96b14a4..edbcb00 100644 --- a/src/frontend/tubo/routes.cljs +++ b/src/frontend/tubo/routes.cljs @@ -7,7 +7,7 @@ [tubo.views.channel :as channel] [tubo.views.kiosk :as kiosk] [tubo.views.playlist :as playlist] - [tubo.views.playlists :as playlists] + [tubo.views.bookmarks :as bookmarks] [tubo.views.search :as search] [tubo.views.settings :as settings] [tubo.views.stream :as stream])) @@ -45,9 +45,9 @@ ["/settings" {:view settings/settings-page :name ::settings :controllers [{:start #(rf/dispatch [::events/get-settings-page])}]}] - ["/playlists" {:view playlists/playlists-page + ["/bookmarks" {:view bookmarks/bookmarks-page :name ::playlists - :controllers [{:start #(rf/dispatch [::events/get-playlists-page])}]}]])) + :controllers [{:start #(rf/dispatch [::events/get-bookmarks-page])}]}]])) (defn on-navigate [new-match] diff --git a/src/frontend/tubo/views/bookmarks.cljs b/src/frontend/tubo/views/bookmarks.cljs new file mode 100644 index 0000000..3f47c02 --- /dev/null +++ b/src/frontend/tubo/views/bookmarks.cljs @@ -0,0 +1,16 @@ +(ns tubo.views.bookmarks + (:require + [re-frame.core :as rf] + [tubo.components.items :as items] + [tubo.components.layout :as layout] + [tubo.events :as events])) + +(defn bookmarks-page + [] + (let [service-color @(rf/subscribe [:service-color]) + bookmarks @(rf/subscribe [:bookmarks])] + [layout/content-container + [layout/content-header "Bookmarks" + [layout/primary-button "Enqueue" + #(rf/dispatch [::events/enqueue-related-streams bookmarks service-color]) "fa-solid fa-headphones"]] + [items/related-streams bookmarks]])) diff --git a/src/frontend/tubo/views/playlists.cljs b/src/frontend/tubo/views/playlists.cljs deleted file mode 100644 index b640960..0000000 --- a/src/frontend/tubo/views/playlists.cljs +++ /dev/null @@ -1,16 +0,0 @@ -(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 playlists-page - [] - (let [service-color @(rf/subscribe [:service-color]) - bookmarks @(rf/subscribe [:bookmarks])] - [layout/content-container - [layout/content-header "Bookmarks" - [layout/primary-button "Enqueue" - #(rf/dispatch [::events/enqueue-related-streams bookmarks service-color]) "fa-solid fa-headphones"]] - [items/related-streams bookmarks]])) -- cgit v1.2.3