diff options
author | Miguel Ángel Moreno <mail@migalmoreno.com> | 2024-12-19 03:01:10 +0100 |
---|---|---|
committer | Miguel Ángel Moreno <mail@migalmoreno.com> | 2024-12-19 03:12:53 +0100 |
commit | 9ef42a8241471ba0f92ef0f0ec54eb2d957f3f24 (patch) | |
tree | e074efeade09f66900b96ea9dfa49af73a662a05 | |
parent | 74c2f331093c8e0acf6ad055fb37197fe33a06a3 (diff) |
feat: add navigation bar popovers for main player and queue
-rw-r--r-- | src/frontend/tubo/navigation/views.cljs | 28 |
1 files 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]] |