diff --git a/apps/miniapp/src/App.tsx b/apps/miniapp/src/App.tsx index 1806e6f..bd7b1c9 100644 --- a/apps/miniapp/src/App.tsx +++ b/apps/miniapp/src/App.tsx @@ -42,6 +42,9 @@ import { ProfileCard } from './components/layout/profile-card' import { TopBar } from './components/layout/top-bar' import { FinanceSummaryCards } from './components/finance/finance-summary-cards' import { FinanceVisuals } from './components/finance/finance-visuals' +import { BlockedState } from './components/session/blocked-state' +import { LoadingState } from './components/session/loading-state' +import { OnboardingState } from './components/session/onboarding-state' import { demoAdminSettings, demoCycleState, @@ -3760,16 +3763,16 @@ function App() { - - window.location.reload() }} + reloadLabel={copy().reload} + onReload={() => window.location.reload()} /> -
-
- {copy().loadingBadge} -
-

- {onboardingSession()?.mode === 'pending' + -

- {onboardingSession()?.mode === 'pending' + : copy().joinTitle + } + body={ + onboardingSession()?.mode === 'pending' ? copy().pendingBody.replace( '{household}', onboardingSession()?.householdName ?? copy().householdFallback @@ -3807,29 +3809,18 @@ function App() { : copy().joinBody.replace( '{household}', onboardingSession()?.householdName ?? copy().householdFallback - )} -

- -

+ ) + } + canJoin={onboardingSession()?.mode === 'join_required'} + joining={joining()} + joinActionLabel={copy().joinAction} + joiningLabel={copy().joining} + botLinkLabel={copy().botLinkAction} + botLink={joinDeepLink()} + reloadLabel={copy().reload} + onJoin={handleJoinHousehold} + onReload={() => window.location.reload()} + />
diff --git a/apps/miniapp/src/components/finance/finance-visuals.tsx b/apps/miniapp/src/components/finance/finance-visuals.tsx index 4f0c350..d388696 100644 --- a/apps/miniapp/src/components/finance/finance-visuals.tsx +++ b/apps/miniapp/src/components/finance/finance-visuals.tsx @@ -129,10 +129,8 @@ export function FinanceVisuals(props: Props) {
- {props.labels.purchaseTotalLabel} - - {props.purchaseChart.totalMajor} {props.dashboard.currency} - + {props.purchaseChart.totalMajor} + {props.dashboard.currency}
diff --git a/apps/miniapp/src/components/session/blocked-state.tsx b/apps/miniapp/src/components/session/blocked-state.tsx new file mode 100644 index 0000000..b6ccc42 --- /dev/null +++ b/apps/miniapp/src/components/session/blocked-state.tsx @@ -0,0 +1,20 @@ +import { HeroBanner } from '../layout/hero-banner' + +type Props = { + badge: string + title: string + body: string + reloadLabel: string + onReload: () => void +} + +export function BlockedState(props: Props) { + return ( + + ) +} diff --git a/apps/miniapp/src/components/session/loading-state.tsx b/apps/miniapp/src/components/session/loading-state.tsx new file mode 100644 index 0000000..91aff8a --- /dev/null +++ b/apps/miniapp/src/components/session/loading-state.tsx @@ -0,0 +1,11 @@ +import { HeroBanner } from '../layout/hero-banner' + +type Props = { + badge: string + title: string + body: string +} + +export function LoadingState(props: Props) { + return +} diff --git a/apps/miniapp/src/components/session/onboarding-state.tsx b/apps/miniapp/src/components/session/onboarding-state.tsx new file mode 100644 index 0000000..54bbba5 --- /dev/null +++ b/apps/miniapp/src/components/session/onboarding-state.tsx @@ -0,0 +1,47 @@ +import { Show } from 'solid-js' + +import { Button } from '../ui' + +type Props = { + badge: string + title: string + body: string + joinActionLabel: string + joiningLabel: string + joining: boolean + canJoin: boolean + botLinkLabel: string + botLink: string | null + reloadLabel: string + onJoin: () => void + onReload: () => void +} + +export function OnboardingState(props: Props) { + return ( +
+
+ {props.badge} +
+

{props.title}

+

{props.body}

+ +
+ ) +} diff --git a/apps/miniapp/src/index.css b/apps/miniapp/src/index.css index d19c104..95cb684 100644 --- a/apps/miniapp/src/index.css +++ b/apps/miniapp/src/index.css @@ -493,20 +493,21 @@ button { inset: 0; display: grid; place-content: center; - gap: 4px; + gap: 2px; text-align: center; } -.purchase-chart__center span { - color: #c6c2bb; - font-size: 0.72rem; - text-transform: uppercase; - letter-spacing: 0.08em; -} - .purchase-chart__center strong { font-family: 'Space Grotesk', 'IBM Plex Sans', sans-serif; - font-size: clamp(1.15rem, 4vw, 1.5rem); + font-size: clamp(1.1rem, 4vw, 1.45rem); + line-height: 1; +} + +.purchase-chart__center small { + color: #c6c2bb; + font-size: 0.72rem; + letter-spacing: 0.08em; + text-transform: uppercase; } .purchase-chart__legend {