diff options
author | Miguel Ángel Moreno <mail@migalmoreno.com> | 2022-12-29 23:03:32 +0100 |
---|---|---|
committer | Miguel Ángel Moreno <mail@migalmoreno.com> | 2022-12-29 23:03:32 +0100 |
commit | fce327a72558b41ce6a7303b38c804bfada694a1 (patch) | |
tree | 29b641622a2de287c09efd0f43655ae8926162c3 /src/frontend/tau/views/kiosk.cljs | |
parent | 8c46de38348c421c0c9f102d604fcfc18807c0bb (diff) |
feat(frontend): Modularize related streams and add responsive styles
Diffstat (limited to 'src/frontend/tau/views/kiosk.cljs')
-rw-r--r-- | src/frontend/tau/views/kiosk.cljs | 13 |
1 files changed, 2 insertions, 11 deletions
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]])])) |