Some checks failed
Demo images / Build & push demo images (push) Failing after 1m56s
- "Back to Goals" now returns to Home's Setup tab (?tab=setup) instead of landing on the dashboard tab. - The channels screen remembers when a setup wizard sent you there (?from=goal) — its back button reads "Back to Setup" and returns to the wizard; it also now uses the shared BackButton pill instead of a bare link. - "Open & Configure" steps launch the actual app via the app launcher — iframe apps overlay on top of the wizard, tab-only apps (BTCPay, Nextcloud) open a tab, mobile uses the in-app browser — instead of routing to the app-details page. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
25 lines
1015 B
TypeScript
25 lines
1015 B
TypeScript
import type { GoalStep } from '@/types/goals'
|
|
|
|
// Steps that land on an internal screen rather than launching an app UI.
|
|
const STEP_ROUTE_OVERRIDES: Record<string, string> = {
|
|
'setup-nostr': '/dashboard/web5',
|
|
'export-identity': '/dashboard/web5/credentials',
|
|
'create-passphrase': '/dashboard/settings',
|
|
'create-backup': '/dashboard/settings',
|
|
'save-backup': '/dashboard/settings',
|
|
// Channel steps land directly on the Lightning channels screen (which
|
|
// carries the "open a channel with Zeus" suggestion).
|
|
'open-channel': '/dashboard/apps/lnd/channels',
|
|
'open-channels': '/dashboard/apps/lnd/channels',
|
|
'open-zeus-channel': '/dashboard/apps/lnd/channels',
|
|
}
|
|
|
|
/**
|
|
* Internal route a step navigates to, or null when the step should launch its
|
|
* app instead (via the app launcher — iframe apps overlay on top, tab-only
|
|
* apps open a tab / the mobile in-app browser).
|
|
*/
|
|
export function goalStepRouteOverride(step: GoalStep): string | null {
|
|
return STEP_ROUTE_OVERRIDES[step.id] ?? null
|
|
}
|