88 ShieldAlert ,
99} from 'lucide-react-native' ;
1010import { useEffect , useRef } from 'react' ;
11- import { Linking , View } from 'react-native' ;
11+ import { Linking , Platform , View } from 'react-native' ;
1212
1313import { Button , type ButtonProps } from '@/components/ui/button' ;
1414import { Text } from '@/components/ui/text' ;
@@ -22,67 +22,67 @@ import { WEB_BASE_URL } from '@/lib/config';
2222import { useThemeColors } from '@/lib/hooks/use-theme-colors' ;
2323import { cn } from '@/lib/utils' ;
2424
25- type CtaVariant = Extract < ButtonProps [ 'variant' ] , 'default' | 'outline' > ;
26-
2725export type { AccessRequiredSubcase } ;
2826
27+ type CtaVariant = Extract < ButtonProps [ 'variant' ] , 'default' | 'outline' > ;
28+
2929type SubcaseContent = {
30- icon : LucideIcon ;
31- tone : ToneKey ;
32- title : string ;
3330 body : string ;
3431 ctaLabel : string ;
3532 ctaVariant : CtaVariant ;
33+ icon : LucideIcon ;
34+ title : string ;
35+ tone : ToneKey ;
3636} ;
3737
3838const SUBCASE_CONTENT : Record < AccessRequiredSubcase , SubcaseContent > = {
3939 trial_expired : {
40- icon : Clock ,
41- tone : 'warn' ,
42- title : 'Subscribe on the web' ,
4340 body : "To keep using KiloClaw, go to kilo.ai/claw from your browser. You can't subscribe in the app." ,
4441 ctaLabel : 'Open kilo.ai/claw' ,
4542 ctaVariant : 'default' ,
43+ icon : Clock ,
44+ title : 'Subscribe on the web' ,
45+ tone : 'warn' ,
4646 } ,
4747 subscription_canceled : {
48- icon : PauseCircle ,
49- tone : 'warn' ,
50- title : 'Subscribe on the web' ,
5148 body : "To use KiloClaw, go to kilo.ai/claw from your browser. You can't subscribe in the app." ,
5249 ctaLabel : 'Open kilo.ai/claw' ,
5350 ctaVariant : 'default' ,
51+ icon : PauseCircle ,
52+ title : 'Subscribe on the web' ,
53+ tone : 'warn' ,
5454 } ,
5555 subscription_past_due : {
56- icon : AlertTriangle ,
57- tone : 'danger' ,
58- title : 'Update payment on the web' ,
5956 body : "We had trouble with your most recent payment. Go to kilo.ai/claw from your browser to update it. You can't manage billing in the app." ,
6057 ctaLabel : 'Open kilo.ai/claw' ,
6158 ctaVariant : 'default' ,
59+ icon : AlertTriangle ,
60+ title : 'Update payment on the web' ,
61+ tone : 'danger' ,
6262 } ,
6363 quarantined : {
64- icon : ShieldAlert ,
65- tone : 'danger' ,
66- title : 'Instance needs remediation' ,
6764 body : "Your KiloClaw instance is in a quarantined state and can't be used right now. Our team needs to help restore it." ,
6865 ctaLabel : 'Continue on kilo.ai' ,
6966 ctaVariant : 'outline' ,
67+ icon : ShieldAlert ,
68+ title : 'Instance needs remediation' ,
69+ tone : 'danger' ,
7070 } ,
7171 multiple_current_conflict : {
72- icon : AlertTriangle ,
73- tone : 'warn' ,
74- title : 'Account needs review' ,
7572 body : "We found more than one active subscription on your account, so we've paused things to avoid double-billing you." ,
7673 ctaLabel : 'Continue on kilo.ai' ,
7774 ctaVariant : 'outline' ,
75+ icon : AlertTriangle ,
76+ title : 'Account needs review' ,
77+ tone : 'warn' ,
7878 } ,
7979 non_canonical_earlybird : {
80- icon : LifeBuoy ,
81- tone : 'warn' ,
82- title : 'Legacy plan detected' ,
8380 body : 'Your early-access plan needs a manual review before it can be used on mobile.' ,
8481 ctaLabel : 'Continue on kilo.ai' ,
8582 ctaVariant : 'outline' ,
83+ icon : LifeBuoy ,
84+ title : 'Legacy plan detected' ,
85+ tone : 'warn' ,
8686 } ,
8787} ;
8888
@@ -119,6 +119,31 @@ export function AccessRequiredScreen({ subcase }: Readonly<AccessRequiredScreenP
119119 void Linking . openURL ( target ) ;
120120 } ;
121121
122+ if ( Platform . OS === 'ios' ) {
123+ const iosTint = toneColor ( 'warn' ) ;
124+ const iosIconColor = colors [ iosTint . hueThemeKey ] ;
125+
126+ return (
127+ < View className = "w-full flex-1 items-center justify-center gap-6 px-6" >
128+ < View
129+ className = { cn (
130+ 'h-24 w-24 items-center justify-center rounded-3xl border' ,
131+ iosTint . tileBgClass ,
132+ iosTint . tileBorderClass
133+ ) }
134+ >
135+ < AlertTriangle size = { 40 } color = { iosIconColor } />
136+ </ View >
137+ < View className = "items-center gap-2" >
138+ < Text className = "text-center text-2xl font-semibold" > KiloClaw unavailable in iOS</ Text >
139+ < Text variant = "muted" className = "text-center text-base" >
140+ KiloClaw access is managed outside the iOS app for this account.
141+ </ Text >
142+ </ View >
143+ </ View >
144+ ) ;
145+ }
146+
122147 return (
123148 < View className = "w-full flex-1 items-center justify-center gap-6 px-6" >
124149 < View
0 commit comments