From 4ec2dfef62495dbd853830e322028b0e200becf3 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 21 Jan 2026 22:43:49 +0000 Subject: [PATCH] refactor: improve Support tab UI and wording - Remove "sats" suffixes from all amounts - Remove "zap" terminology, use "contribute" instead - Add contribution tier buttons (210, 2100, 21000, 42000, 210000) - Remove borders and background from leaderboard - Add trophy icon for #1 contributor (instead of flame) - Make amounts larger with primary color - Reduce padding in leaderboard items - Remove "Send Lightning Zap" section --- src/components/SettingsViewer.tsx | 81 +++++++++++++++++-------------- 1 file changed, 44 insertions(+), 37 deletions(-) diff --git a/src/components/SettingsViewer.tsx b/src/components/SettingsViewer.tsx index 861a2b3..e0da63a 100644 --- a/src/components/SettingsViewer.tsx +++ b/src/components/SettingsViewer.tsx @@ -9,7 +9,7 @@ import { import { Switch } from "./ui/switch"; import { useSettings } from "@/hooks/useSettings"; import { useTheme } from "@/lib/themes"; -import { Palette, FileEdit, Heart, Zap } from "lucide-react"; +import { Palette, FileEdit, Heart, Trophy } from "lucide-react"; import { Button } from "./ui/button"; import { Progress } from "./ui/progress"; import { useLiveQuery } from "dexie-react-hooks"; @@ -51,17 +51,20 @@ export function SettingsViewer() { // Calculate monthly donation progress const goalProgress = (monthlyDonations / MONTHLY_GOAL_SATS) * 100; - // Format sats for display - function formatSats(sats: number): string { - if (sats >= 1_000_000) { - return `${(sats / 1_000_000).toFixed(1)}M`; - } else if (sats >= 1_000) { - return `${Math.floor(sats / 1_000)}k`; + // Format amount for display + function formatAmount(amount: number): string { + if (amount >= 1_000_000) { + return `${(amount / 1_000_000).toFixed(1)}M`; + } else if (amount >= 1_000) { + return `${Math.floor(amount / 1_000)}k`; } - return sats.toLocaleString(); + return amount.toLocaleString(); } - function openZapWindow() { + // Contribution tiers + const contributionTiers = [210, 2100, 21000, 42000, 210000]; + + function openSupportWindow() { addWindow( "zap", { @@ -186,7 +189,7 @@ export function SettingsViewer() {

Support Grimoire

- Help support development with Lightning zaps + Help support development

@@ -202,57 +205,61 @@ export function SettingsViewer() {
- {formatSats(monthlyDonations)} sats + {formatAmount(monthlyDonations)} {" raised"} - {formatSats(MONTHLY_GOAL_SATS)} sats + {formatAmount(MONTHLY_GOAL_SATS)}
- {/* Top Donors This Month */} + {/* Contribution Tiers */} +
+

Contribute

+
+ {contributionTiers.map((amount) => ( + + ))} +
+
+ + {/* Top Contributors This Month */} {topDonors && topDonors.length > 0 && (
-

Top Donors This Month

+

Top Contributors

{topDonors.map((donor, index) => (
- - #{index + 1} - + {index === 0 ? ( + + ) : ( + + {index + 1} + + )}
- - {formatSats(donor.sats)} sats + + {formatAmount(donor.sats)}
))}
)} - - {/* Quick Zap Button */} -
-

Send Lightning Zap

-

- Support Grimoire development with Bitcoin over Lightning -

- -