aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiguel Ángel Moreno <mail@migalmoreno.com>2023-10-16 01:25:11 +0200
committerMiguel Ángel Moreno <mail@migalmoreno.com>2023-10-16 01:25:11 +0200
commitda6ff3a55f77182709ad569d4e6b7149480e9bd2 (patch)
tree8212a30c63e4efc75cfee5b485ef3efad9885c44
parent2fd4dbf2f8f20a18965ee219a3294077bac71b85 (diff)
feat(frontend): refine item cards content
-rw-r--r--src/frontend/tubo/components/items.cljs12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/frontend/tubo/components/items.cljs b/src/frontend/tubo/components/items.cljs
index 110af0c..75c811b 100644
--- a/src/frontend/tubo/components/items.cljs
+++ b/src/frontend/tubo/components/items.cljs
@@ -26,16 +26,18 @@
item-route service-color]
[:<>
(when name
- [:div.my-2
+ [:div.flex.items-center.my-2
[:a {:href item-route :title name}
- [:h1.line-clamp-2.my-1 name]]])
+ [:h1.line-clamp-2.my-1 name]]
+ (when (and verified? (not uploader-url))
+ [:i.fa-solid.fa-circle-check.pl-2])])
[:div.flex.justify-between
[:div.flex.items-center.my-2
(if uploader-url
[:a {:href (rfe/href :tubo.routes/channel nil {:url uploader-url}) :title uploader-name}
[:h1.line-clamp-1.text-neutral-800.dark:text-gray-300.font-bold.pr-2 uploader-name]]
[:h1.line-clamp-1.text-neutral-800.dark:text-gray-300.font-bold.pr-2 uploader-name])
- (when verified?
+ (when (and uploader-url verified?)
[:i.fa-solid.fa-circle-check])]
(when (= type "stream")
[:button.pl-4.focus:outline-none
@@ -49,11 +51,11 @@
(when subscriber-count
[:div.flex.items-center
[:i.fa-solid.fa-users.text-xs]
- [:p.mx-2 subscriber-count]])
+ [:p.mx-2 (util/format-quantity subscriber-count)]])
(when stream-count
[:div.flex.items-center
[:i.fa-solid.fa-video.text-xs]
- [:p.mx-2 stream-count]])
+ [:p.mx-2 (util/format-quantity stream-count)]])
[:div.flex.my-1.justify-between
[:p (util/format-date upload-date)]
(when view-count