From d9a6def0cdc0ec4a4512af112b2d279d36aa9794 Mon Sep 17 00:00:00 2001 From: Alejandro Gomez Date: Thu, 6 Jul 2023 22:00:33 +0200 Subject: [PATCH 1/3] feat: animated gradient for huge zaps --- src/element/live-chat.css | 18 ++++++++++++++++++ src/element/live-chat.tsx | 3 ++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src/element/live-chat.css b/src/element/live-chat.css index 46165bc..453122d 100644 --- a/src/element/live-chat.css +++ b/src/element/live-chat.css @@ -224,6 +224,24 @@ color: #FF8D2B; } +.zap-container.big-zap:before { + background: linear-gradient(60deg, #2BD9FF, #8C8DED, #F838D9, #F83838, #FF902B, #DDF838); + animation: animatedgradient 3s ease alternate infinite; + background-size: 300% 300%; +} + +@keyframes animatedgradient { + 0% { + background-position: 0% 50%; + } + 50% { + background-position: 100% 50%; + } + 100% { + background-position: 0% 50%; + } +} + .zap-content { margin-top: 8px; } diff --git a/src/element/live-chat.tsx b/src/element/live-chat.tsx index 84bef3d..0e4c376 100644 --- a/src/element/live-chat.tsx +++ b/src/element/live-chat.tsx @@ -155,9 +155,10 @@ function ChatZap({ zap }: { zap: ParsedZap }) { if (!zap.valid) { return null; } + const isBig = zap.amount >= 1_000_000; return ( -
+
Date: Thu, 6 Jul 2023 23:30:38 +0200 Subject: [PATCH 2/3] fix: smaller threshold for big zaps --- src/element/live-chat.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/element/live-chat.tsx b/src/element/live-chat.tsx index 0e4c376..4505638 100644 --- a/src/element/live-chat.tsx +++ b/src/element/live-chat.tsx @@ -155,7 +155,7 @@ function ChatZap({ zap }: { zap: ParsedZap }) { if (!zap.valid) { return null; } - const isBig = zap.amount >= 1_000_000; + const isBig = zap.amount >= 10_000; return (
From bede5f44a1af1e38e1466385cee99e4ec8fdf319 Mon Sep 17 00:00:00 2001 From: Alejandro Gomez Date: Fri, 7 Jul 2023 08:37:00 +0200 Subject: [PATCH 3/3] fix: 100k sats --- src/element/live-chat.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/element/live-chat.tsx b/src/element/live-chat.tsx index 4505638..5e1fe81 100644 --- a/src/element/live-chat.tsx +++ b/src/element/live-chat.tsx @@ -151,11 +151,13 @@ export function LiveChat({ ); } +const BIG_ZAP_THRESHOLD = 100_000; + function ChatZap({ zap }: { zap: ParsedZap }) { if (!zap.valid) { return null; } - const isBig = zap.amount >= 10_000; + const isBig = zap.amount >= BIG_ZAP_THRESHOLD; return (