From a6ff88f5ca2a835cfda849e5dee56a4a11190a69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Aaron?= <100827540+reneaaron@users.noreply.github.com> Date: Thu, 6 Feb 2025 10:55:53 +0100 Subject: [PATCH] feat: support alby (#1059) * feat: draft page * fix: sidebar card content font size * fix: onboarding item * fix: copy * fix: spacing * fix: hub lightning address * fix: exclude radix-ui imports * feat: progress on alby support page * fix: update copy, preset amounts * fix: replace success screen with toast for now * fix: extract constants, address review feedback * fix: use constant * chore: minor spacing improvements * fix: add required on support alby amount field --------- Co-authored-by: Roland Bewick --- .vscode/settings.json | 1 + frontend/src/components/SidebarHint.tsx | 4 +- frontend/src/constants.ts | 3 + frontend/src/hooks/useOnboardingData.ts | 15 + frontend/src/routes.tsx | 5 + frontend/src/screens/alby/SupportAlby.tsx | 335 ++++++++++++++++++ .../src/screens/internal-apps/ZapPlanner.tsx | 3 +- .../screens/wallet/OnboardingChecklist.tsx | 2 +- 8 files changed, 365 insertions(+), 3 deletions(-) create mode 100644 frontend/src/screens/alby/SupportAlby.tsx diff --git a/.vscode/settings.json b/.vscode/settings.json index d979d797..84a94474 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -5,6 +5,7 @@ }, "editor.formatOnSave": true, "typescript.preferences.importModuleSpecifier": "non-relative", + "typescript.preferences.autoImportFileExcludePatterns": ["@radix-ui"], "editor.codeActionsOnSave": { "source.organizeImports": "always" } diff --git a/frontend/src/components/SidebarHint.tsx b/frontend/src/components/SidebarHint.tsx index 059ec548..d7afa81b 100644 --- a/frontend/src/components/SidebarHint.tsx +++ b/frontend/src/components/SidebarHint.tsx @@ -91,7 +91,9 @@ function SidebarHintCard({ {title} -
{description}
+
+ {description} +
+ + + Maybe later + + + +
+ + Become a Supporter + + A new app connection will be established to facilitate + monthly payments to Alby. You can cancel it anytime through + the connections page. + + + +
+
+ +
+ setAmount(e.target.value)} + /> +
+ + + +
+
+
+
+ + setSenderName(e.target.value)} + placeholder={`Nickname, npub, @twitter, etc.`} + className="col-span-3" + /> +
+
+ + + Cancel + + Complete Setup + + +
+
+ + + + + ); +} + +export default SupportAlby; diff --git a/frontend/src/screens/internal-apps/ZapPlanner.tsx b/frontend/src/screens/internal-apps/ZapPlanner.tsx index 55f309c2..d07474e1 100644 --- a/frontend/src/screens/internal-apps/ZapPlanner.tsx +++ b/frontend/src/screens/internal-apps/ZapPlanner.tsx @@ -34,6 +34,7 @@ import { Input } from "src/components/ui/input"; import { Label } from "src/components/ui/label"; import { LoadingButton } from "src/components/ui/loading-button"; import { Textarea } from "src/components/ui/textarea"; +import { SUPPORT_ALBY_LIGHTNING_ADDRESS } from "src/constants"; import { request } from "src/utils/request"; type Recipient = { @@ -49,7 +50,7 @@ const recipients: Recipient[] = [ logo: alby, description: "Support the open-source development of Hub, Go, Lightning Browser Extension, developer tools and open protocols.", - lightningAddress: "hello@getalby.com", + lightningAddress: SUPPORT_ALBY_LIGHTNING_ADDRESS, }, { name: "HRF", diff --git a/frontend/src/screens/wallet/OnboardingChecklist.tsx b/frontend/src/screens/wallet/OnboardingChecklist.tsx index b27d7636..8750bf83 100644 --- a/frontend/src/screens/wallet/OnboardingChecklist.tsx +++ b/frontend/src/screens/wallet/OnboardingChecklist.tsx @@ -91,7 +91,7 @@ function ChecklistItem({ {!checked && ( -
{description}
+
{description}
)} );