Client Profile: save-phone banner for anonymous users
Anonymous customers now see a brand-gradient "Simpan Nomor HP" panel above the user card on the kamu tab, ported from the Figma SProfile save-phone banner. Tapping it pushes /auth/register?from=profile, which hides the "lanjut tanpa verifikasi (harga normal)" link — a user who re-entered the verif funnel from Profile shouldn't be re-offered the anon exit. Spec §1.3 added documenting the ?from= entry-point convention. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -123,6 +123,12 @@ class _RegisterScreenState extends ConsumerState<RegisterScreen> {
|
||||
final name = _greetingName(authState.valueOrNull);
|
||||
final shownName = name.isEmpty ? 'kamu' : name;
|
||||
|
||||
// When the user arrives via the Profile "Simpan Nomor HP" CTA they've
|
||||
// already committed to identifying — drop the anonymous escape hatch so
|
||||
// there's only one way forward.
|
||||
final fromProfile =
|
||||
GoRouterState.of(context).uri.queryParameters['from'] == 'profile';
|
||||
|
||||
return Scaffold(
|
||||
backgroundColor: HaloTokens.bg,
|
||||
body: SafeArea(
|
||||
@@ -207,27 +213,29 @@ class _RegisterScreenState extends ConsumerState<RegisterScreen> {
|
||||
ref.read(authProvider.notifier).requestOtp(_e164Phone())
|
||||
: null,
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
TextButton(
|
||||
onPressed: isLoading
|
||||
? null
|
||||
// Skip ESPb/USPb — the verified branch already ran ESPa+USPa,
|
||||
// so the redirect alias drops the user straight at PickMethod.
|
||||
: () => context.go('/onboarding/anon/method'),
|
||||
style: TextButton.styleFrom(
|
||||
foregroundColor: HaloTokens.inkSoft,
|
||||
minimumSize: const Size(0, 40),
|
||||
),
|
||||
child: const Text(
|
||||
'lanjut tanpa verifikasi (harga normal)',
|
||||
style: TextStyle(
|
||||
fontFamily: HaloTokens.fontBody,
|
||||
fontSize: 12.5,
|
||||
decoration: TextDecoration.underline,
|
||||
decorationColor: HaloTokens.inkSoft,
|
||||
if (!fromProfile) ...[
|
||||
const SizedBox(height: 4),
|
||||
TextButton(
|
||||
onPressed: isLoading
|
||||
? null
|
||||
// Skip ESPb/USPb — the verified branch already ran ESPa+USPa,
|
||||
// so the redirect alias drops the user straight at PickMethod.
|
||||
: () => context.go('/onboarding/anon/method'),
|
||||
style: TextButton.styleFrom(
|
||||
foregroundColor: HaloTokens.inkSoft,
|
||||
minimumSize: const Size(0, 40),
|
||||
),
|
||||
child: const Text(
|
||||
'lanjut tanpa verifikasi (harga normal)',
|
||||
style: TextStyle(
|
||||
fontFamily: HaloTokens.fontBody,
|
||||
fontSize: 12.5,
|
||||
decoration: TextDecoration.underline,
|
||||
decorationColor: HaloTokens.inkSoft,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user