From 9ef42a8241471ba0f92ef0f0ec54eb2d957f3f24 Mon Sep 17 00:00:00 2001 From: Miguel Ángel Moreno Date: Thu, 19 Dec 2024 03:01:10 +0100 Subject: feat: add navigation bar popovers for main player and queue --- src/frontend/tubo/navigation/views.cljs | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/src/frontend/tubo/navigation/views.cljs b/src/frontend/tubo/navigation/views.cljs index 25985fe..5b98786 100644 --- a/src/frontend/tubo/navigation/views.cljs +++ b/src/frontend/tubo/navigation/views.cljs @@ -8,7 +8,8 @@ [tubo.layout.views :as layout] [tubo.services.views :as services] [tubo.stream.views :as stream] - [tubo.playlist.views :as playlist])) + [tubo.playlist.views :as playlist] + [tubo.bg-player.views :as bg-player])) (defn search-form [] @@ -119,17 +120,20 @@ [:button.mx-3 {:on-click #(rf/dispatch [:search/show-form true])} [:i.fa-solid.fa-search]] - (when-not (or show-queue? show-main-player?) - [:div.xs:hidden - (case (-> match - :data - :name) - :channel-page [channel/metadata-popover - @(rf/subscribe [:channel])] - :stream-page [stream/metadata-popover @(rf/subscribe [:stream])] - :playlist-page [playlist/metadata-popover - @(rf/subscribe [:playlist])] - [:<>])]) + [:div.xs:hidden + (case (-> match + :data + :name) + :channel-page [channel/metadata-popover + @(rf/subscribe [:channel])] + :stream-page [stream/metadata-popover @(rf/subscribe [:stream])] + :playlist-page [playlist/metadata-popover + @(rf/subscribe [:playlist])] + (cond show-main-player? [stream/metadata-popover + @(rf/subscribe [:stream])] + show-queue? [bg-player/popover + @(rf/subscribe [:queue/current])] + :else [:<>]))] [:a.mx-3.hidden.lg:block {:href (rfe/href :settings-page)} [:i.fa-solid.fa-cog]] -- cgit v1.2.3