diff options
author | Miguel Ángel Moreno <mail@migalmoreno.com> | 2024-12-03 14:42:13 +0100 |
---|---|---|
committer | Miguel Ángel Moreno <mail@migalmoreno.com> | 2024-12-03 14:42:13 +0100 |
commit | 61b6b81808bc9e6956849c4cef3a51a44bb055d9 (patch) | |
tree | 6f34d4c24c580b58f5d14a6b01281e1be83c64e6 /src/frontend | |
parent | dcd4db55ffb93b63da6277f70d7e55d55a88702d (diff) |
feat: only show subscriber count for channel related items
Diffstat (limited to 'src/frontend')
-rw-r--r-- | src/frontend/tubo/items/views.cljs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/frontend/tubo/items/views.cljs b/src/frontend/tubo/items/views.cljs index ec4f7c8..959285c 100644 --- a/src/frontend/tubo/items/views.cljs +++ b/src/frontend/tubo/items/views.cljs @@ -60,7 +60,7 @@ (defn grid-item-content [{:keys [url name uploader-url uploader-name subscriber-count view-count - stream-count verified? thumbnails duration] + stream-count verified? thumbnails duration type] :as item} route bookmarks] [:div.w-full [:div.flex.flex-col.max-w-full.min-h-full.max-h-full @@ -90,7 +90,7 @@ (when (and uploader-url verified?) [:i.fa-solid.fa-circle-check.text-xs])] [item-popover item bookmarks]] - (when subscriber-count + (when (and (= type "channel") subscriber-count) [:div.flex.items-center [:i.fa-solid.fa-users.text-xs] [:span.mx-2 (utils/format-quantity subscriber-count)]]) @@ -107,7 +107,7 @@ (defn list-item-content [{:keys [url name uploader-url uploader-name subscriber-count view-count - stream-count verified? thumbnails duration upload-date] + stream-count verified? thumbnails duration upload-date type] :as item} route bookmarks] [:div.w-full [:div.flex.gap-x-3.xs:gap-x-5 @@ -156,7 +156,7 @@ [:span (utils/format-date-ago upload-date)]]) (when (or subscriber-count stream-count) [:div.flex.text-xs.xs:text-sm.flex-col.xs:flex-row - (when subscriber-count + (when (and (= type "channel") subscriber-count) [:<> [:div.flex.items-center.h-full [:p |