- {/* Mobile: fullscreen */}
-
e.stopPropagation()}
- >
- {/* Mobile close button - fixed top right */}
-
-
- {/* Mobile safe area spacer - top */}
-
-
- {children}
-
- {/* Mobile safe area spacer - bottom */}
-
-
+ // Desktop modal wrapper
+ const DesktopWrapper = ({ children }: { children: React.ReactNode }) => (
+
+
e.stopPropagation()}>
+ {children}
- )
- }
+
+ )
- // Loading state
+ // Mobile fullscreen wrapper - like React Native Modal with animationType="slide"
+ const MobileWrapper = ({ children }: { children: React.ReactNode }) => (
+ <>
+ {/* Backdrop */}
+
+ {/* Modal - slides from bottom */}
+
+ {/* Close button */}
+
+ {children}
+
+ >
+ )
+
+ const Wrapper = isMobile ? MobileWrapper : DesktopWrapper
+
+ // Loading
if (isLoading) {
return (
-
-
+
+
-
+
)
}
- // Error state
+ // Error
if (error || !appConfig) {
return (
-
-
-
- 😕
-
-
{t('common.error')}
-
+
+
+
😕
+
{t('common.error')}
+
-
+
)
}
// No subscription
if (!appConfig.hasSubscription) {
return (
-
-
-
- 📱
-
-
{t('subscription.connection.title')}
-
{t('subscription.connection.noSubscription')}
-
+
+
+
📱
+
{t('subscription.connection.title')}
+
{t('subscription.connection.noSubscription')}
+
-
+
)
}
- // App selector view
- if (showAppSelector || !selectedApp) {
+ // App selector
+ if (showAppSelector) {
+ const platformNames: Record
= {
+ ios: 'iOS',
+ android: 'Android',
+ windows: 'Windows',
+ macos: 'macOS',
+ linux: 'Linux',
+ androidTV: 'Android TV',
+ appleTV: 'Apple TV'
+ }
+
return (
-
+
{/* Header */}
-
-
- {selectedApp && (
-
- )}
-
-
{t('subscription.connection.selectApp')}
-
{t('subscription.connection.selectDevice')}
-
-
-