From fce327a72558b41ce6a7303b38c804bfada694a1 Mon Sep 17 00:00:00 2001 From: Miguel Ángel Moreno Date: Thu, 29 Dec 2022 23:03:32 +0100 Subject: feat(frontend): Modularize related streams and add responsive styles --- src/frontend/tau/views/kiosk.cljs | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'src/frontend/tau/views/kiosk.cljs') diff --git a/src/frontend/tau/views/kiosk.cljs b/src/frontend/tau/views/kiosk.cljs index 6aea258..672430a 100644 --- a/src/frontend/tau/views/kiosk.cljs +++ b/src/frontend/tau/views/kiosk.cljs @@ -12,7 +12,6 @@ next-page-url (:url next-page) service-color @(rf/subscribe [:service-color]) page-loading? @(rf/subscribe [:show-page-loading]) - pagination-loading? @(rf/subscribe [:show-pagination-loading]) page-scroll @(rf/subscribe [:page-scroll]) scrolled-to-bottom? (= page-scroll (.-scrollHeight js/document.body))] (when scrolled-to-bottom? @@ -20,16 +19,8 @@ [:div.flex.flex-col.items-center.px-5.py-2.flex-auto (if page-loading? [loading/page-loading-icon service-color] - [:div + [:div.flex.flex-col.flex-auto.w-full {:class "lg:w-4/5"} [:div.flex.justify-center.items-center.my-4.mx-2 [:div.m-4 [:h1.text-2xl id]]] - [:div.flex.justify-center.items-center.align-center - [:div.flex.justify-start.flex-wrap - (for [[i item] (map-indexed vector related-streams)] - (case (:type item) - "stream" [items/stream-item (assoc item :key i)] - "channel" [items/channel-item (assoc item :key i)] - "playlist" [items/playlist-item (assoc item :key i)]))]] - (when-not (empty? next-page-url) - [loading/items-pagination-loading-icon service-color pagination-loading?])])])) + [items/related-streams related-streams next-page-url]])])) -- cgit v1.2.3