From 12345da1e169b1fc085026b9fb961f75f13ec4bd Mon Sep 17 00:00:00 2001 From: Alejandro Gomez Date: Sat, 1 Jul 2023 18:44:50 +0200 Subject: [PATCH] video tile fixes --- public/index.html | 4 ++-- src/element/video-tile.tsx | 6 ++++-- src/pages/profile-page.css | 16 ++++++++++++++++ src/pages/profile-page.tsx | 20 +++++++++++++++----- 4 files changed, 37 insertions(+), 9 deletions(-) diff --git a/public/index.html b/public/index.html index c003a64..a2044b9 100644 --- a/public/index.html +++ b/public/index.html @@ -12,10 +12,10 @@ Nostr stream - +
- \ No newline at end of file + diff --git a/src/element/video-tile.tsx b/src/element/video-tile.tsx index a803af6..6463701 100644 --- a/src/element/video-tile.tsx +++ b/src/element/video-tile.tsx @@ -9,9 +9,11 @@ import { StreamState } from "index"; export function VideoTile({ ev, showAuthor = true, + showStatus = true, }: { ev: NostrEvent; showAuthor?: boolean; + showStatus?: boolean; }) { const { inView, ref } = useInView({ triggerOnce: true }); const id = ev.tags.find((a) => a[0] === "d")?.[1]!; @@ -29,13 +31,13 @@ export function VideoTile({ ev.pubkey ); return ( - +
- + {showStatus && }

{title}

{showAuthor &&
{inView && }
} diff --git a/src/pages/profile-page.css b/src/pages/profile-page.css index 5ce2463..29966a1 100644 --- a/src/pages/profile-page.css +++ b/src/pages/profile-page.css @@ -197,3 +197,19 @@ flex-direction: column; gap: 4px; } + +.stream-item .video-tile h3 { + font-size: 20px; + font-style: normal; + font-weight: 600; + line-height: normal; + margin: 6px 0 0 0; +} + +.stream-item .timestamp { + color: #ADADAD; + font-size: 16px; + font-style: normal; + font-weight: 500; + line-height: 24px; +} diff --git a/src/pages/profile-page.tsx b/src/pages/profile-page.tsx index 51c4541..6594f63 100644 --- a/src/pages/profile-page.tsx +++ b/src/pages/profile-page.tsx @@ -1,5 +1,6 @@ import "./profile-page.css"; import { useMemo } from "react"; +import moment from "moment"; import { useNavigate, useParams } from "react-router-dom"; import * as Tabs from "@radix-ui/react-tabs"; import { @@ -17,7 +18,6 @@ import { FollowButton } from "element/follow-button"; import { useProfile } from "hooks/profile"; import useTopZappers from "hooks/top-zappers"; import { Text } from "element/text"; -import { Tags } from "element/tags"; import { StreamState, System } from "index"; import { findTag } from "utils"; import { formatSats } from "number"; @@ -165,8 +165,13 @@ export function ProfilePage() {
{pastStreams.map((ev) => (
- - + + + Streamed on{" "} + {moment(Number(ev.created_at) * 1000).format( + "MMM DD, YYYY" + )} +
))}
@@ -175,8 +180,13 @@ export function ProfilePage() {
{futureStreams.map((ev) => (
- - + + + Scheduled for{" "} + {moment(Number(ev.created_at) * 1000).format( + "MMM DD, YYYY h:mm:ss a" + )} +
))}