From 7a0491f3b71b99e36efc6924b985be70f635fa73 Mon Sep 17 00:00:00 2001 From: verbiricha Date: Fri, 4 Aug 2023 19:32:00 +0200 Subject: [PATCH 1/2] feat: add following title --- src/hooks/live-streams.ts | 24 +++++++++++++----------- src/pages/root.css | 6 ++++++ src/pages/root.tsx | 13 ++++++++----- 3 files changed, 27 insertions(+), 16 deletions(-) diff --git a/src/hooks/live-streams.ts b/src/hooks/live-streams.ts index d4a6277..5a1322a 100644 --- a/src/hooks/live-streams.ts +++ b/src/hooks/live-streams.ts @@ -42,17 +42,19 @@ export function useStreamsFeed(tag?: string) { return []; }, [feed.data]); - const live = feedSorted.filter( - (a) => findTag(a, "status") === StreamState.Live - ).sort(sortStarts); - const planned = feedSorted.filter( - (a) => findTag(a, "status") === StreamState.Planned - ).sort(sortStarts); - const ended = feedSorted.filter((a) => { - const hasEnded = findTag(a, "status") === StreamState.Ended; - const recording = findTag(a, "recording") ?? ""; - return hasEnded && recording?.length > 0; - }).sort(sortCreatedAt); + const live = feedSorted + .filter((a) => findTag(a, "status") === StreamState.Live) + .sort(sortStarts); + const planned = feedSorted + .filter((a) => findTag(a, "status") === StreamState.Planned) + .sort(sortStarts); + const ended = feedSorted + .filter((a) => { + const hasEnded = findTag(a, "status") === StreamState.Ended; + const recording = findTag(a, "recording") ?? ""; + return hasEnded && recording?.length > 0; + }) + .sort(sortCreatedAt); return { live, planned, ended }; } diff --git a/src/pages/root.css b/src/pages/root.css index f333cba..6b0725b 100644 --- a/src/pages/root.css +++ b/src/pages/root.css @@ -38,6 +38,12 @@ display: flex; } +@media (max-width: 1020px) { + .divider { + padding: 0 8px; + } +} + .divider:after { content: ""; flex: 1; diff --git a/src/pages/root.tsx b/src/pages/root.tsx index 090dfc2..6284764 100644 --- a/src/pages/root.tsx +++ b/src/pages/root.tsx @@ -32,11 +32,14 @@ export function RootPage() { return (
{hasFollowingLive && ( -
- {following.map((e) => ( - - ))} -
+ <> +

Following

+
+ {following.map((e) => ( + + ))} +
+ )} {!hasFollowingLive && (
From 68218c591200d068c55cb28fd2e33c025b897ed0 Mon Sep 17 00:00:00 2001 From: verbiricha Date: Fri, 4 Aug 2023 19:42:18 +0200 Subject: [PATCH 2/2] fix: zap content link color --- src/element/live-chat.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/element/live-chat.css b/src/element/live-chat.css index d55d04c..27b0f64 100644 --- a/src/element/live-chat.css +++ b/src/element/live-chat.css @@ -111,6 +111,10 @@ flex-wrap: wrap; } +.live-chat .zap-content a { + color: var(--text-link); +} + .top-zappers { display: flex; flex-direction: column;