@oxyhq/services 5.7.5 → 5.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +76 -76
- package/lib/commonjs/core/index.js +177 -102
- package/lib/commonjs/core/index.js.map +1 -1
- package/lib/commonjs/index.js +69 -28
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/ui/components/Avatar.js +15 -6
- package/lib/commonjs/ui/components/Avatar.js.map +1 -1
- package/lib/commonjs/ui/components/FollowButton.js +100 -12
- package/lib/commonjs/ui/components/FollowButton.js.map +1 -1
- package/lib/commonjs/ui/components/GroupedItem.js +58 -13
- package/lib/commonjs/ui/components/GroupedItem.js.map +1 -1
- package/lib/commonjs/ui/components/GroupedSection.js +7 -1
- package/lib/commonjs/ui/components/GroupedSection.js.map +1 -1
- package/lib/commonjs/ui/components/Header.js +356 -0
- package/lib/commonjs/ui/components/Header.js.map +1 -0
- package/lib/commonjs/ui/components/OxyProvider.js +28 -7
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/components/index.js +7 -0
- package/lib/commonjs/ui/components/index.js.map +1 -1
- package/lib/commonjs/ui/components/internal/GroupedPillButtons.js +1 -1
- package/lib/commonjs/ui/components/internal/GroupedPillButtons.js.map +1 -1
- package/lib/commonjs/ui/components/internal/TextField.js +606 -546
- package/lib/commonjs/ui/components/internal/TextField.js.map +1 -1
- package/lib/commonjs/ui/components/internal/TextField.md +436 -0
- package/lib/commonjs/ui/context/OxyContext.js +181 -199
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/hooks/index.js +6 -0
- package/lib/commonjs/ui/hooks/index.js.map +1 -1
- package/lib/commonjs/ui/hooks/useFollow.js +59 -2
- package/lib/commonjs/ui/hooks/useFollow.js.map +1 -1
- package/lib/commonjs/ui/hooks/useSessionSocket.js +5 -2
- package/lib/commonjs/ui/hooks/useSessionSocket.js.map +1 -1
- package/lib/commonjs/ui/navigation/OxyRouter.js +11 -1
- package/lib/commonjs/ui/navigation/OxyRouter.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountCenterScreen.js +6 -6
- package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountManagementDemo.js +3 -3
- package/lib/commonjs/ui/screens/AccountManagementDemo.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js +241 -598
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js +1160 -406
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +135 -237
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AppInfoScreen.js +246 -463
- package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FeedbackScreen.js +3 -3
- package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +808 -650
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ProfileScreen.js +214 -37
- package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/RecoverAccountScreen.js +51 -72
- package/lib/commonjs/ui/screens/RecoverAccountScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SessionManagementScreen.js +11 -29
- package/lib/commonjs/ui/screens/SessionManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SignInScreen.js +30 -303
- package/lib/commonjs/ui/screens/SignInScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SignUpScreen.js +4 -4
- package/lib/commonjs/ui/screens/SignUpScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/UserLinksScreen.js +90 -0
- package/lib/commonjs/ui/screens/UserLinksScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/internal/SignInPasswordStep.js +19 -31
- package/lib/commonjs/ui/screens/internal/SignInPasswordStep.js.map +1 -1
- package/lib/commonjs/ui/screens/internal/SignInUsernameStep.js +7 -10
- package/lib/commonjs/ui/screens/internal/SignInUsernameStep.js.map +1 -1
- package/lib/commonjs/ui/screens/internal/SignUpIdentityStep.js +11 -5
- package/lib/commonjs/ui/screens/internal/SignUpIdentityStep.js.map +1 -1
- package/lib/commonjs/ui/screens/internal/SignUpSecurityStep.js +11 -4
- package/lib/commonjs/ui/screens/internal/SignUpSecurityStep.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js +9 -6
- package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js +3 -30
- package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js +37 -46
- package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js +9 -12
- package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js +9 -12
- package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js +9 -12
- package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js.map +1 -1
- package/lib/commonjs/ui/stores/authStore.js +36 -6
- package/lib/commonjs/ui/stores/authStore.js.map +1 -1
- package/lib/commonjs/ui/stores/followStore.js +106 -1
- package/lib/commonjs/ui/stores/followStore.js.map +1 -1
- package/lib/commonjs/ui/styles/authStyles.js +337 -0
- package/lib/commonjs/ui/styles/authStyles.js.map +1 -0
- package/lib/commonjs/ui/styles/index.js +11 -0
- package/lib/commonjs/ui/styles/index.js.map +1 -1
- package/lib/module/core/index.js +177 -41
- package/lib/module/core/index.js.map +1 -1
- package/lib/module/index.js +24 -4
- package/lib/module/index.js.map +1 -1
- package/lib/module/ui/components/Avatar.js +15 -6
- package/lib/module/ui/components/Avatar.js.map +1 -1
- package/lib/module/ui/components/FollowButton.js +101 -13
- package/lib/module/ui/components/FollowButton.js.map +1 -1
- package/lib/module/ui/components/GroupedItem.js +59 -14
- package/lib/module/ui/components/GroupedItem.js.map +1 -1
- package/lib/module/ui/components/GroupedSection.js +7 -1
- package/lib/module/ui/components/GroupedSection.js.map +1 -1
- package/lib/module/ui/components/Header.js +351 -0
- package/lib/module/ui/components/Header.js.map +1 -0
- package/lib/module/ui/components/OxyProvider.js +30 -9
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/components/index.js +1 -0
- package/lib/module/ui/components/index.js.map +1 -1
- package/lib/module/ui/components/internal/GroupedPillButtons.js +1 -1
- package/lib/module/ui/components/internal/GroupedPillButtons.js.map +1 -1
- package/lib/module/ui/components/internal/TextField.js +607 -547
- package/lib/module/ui/components/internal/TextField.js.map +1 -1
- package/lib/module/ui/components/internal/TextField.md +436 -0
- package/lib/module/ui/context/OxyContext.js +180 -198
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/hooks/index.js +1 -1
- package/lib/module/ui/hooks/index.js.map +1 -1
- package/lib/module/ui/hooks/useFollow.js +57 -1
- package/lib/module/ui/hooks/useFollow.js.map +1 -1
- package/lib/module/ui/hooks/useSessionSocket.js +5 -2
- package/lib/module/ui/hooks/useSessionSocket.js.map +1 -1
- package/lib/module/ui/navigation/OxyRouter.js +11 -1
- package/lib/module/ui/navigation/OxyRouter.js.map +1 -1
- package/lib/module/ui/screens/AccountCenterScreen.js +6 -6
- package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountManagementDemo.js +3 -3
- package/lib/module/ui/screens/AccountManagementDemo.js.map +1 -1
- package/lib/module/ui/screens/AccountOverviewScreen.js +242 -597
- package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSettingsScreen.js +1161 -407
- package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSwitcherScreen.js +135 -237
- package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/module/ui/screens/AppInfoScreen.js +248 -465
- package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/module/ui/screens/FeedbackScreen.js +3 -3
- package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/module/ui/screens/PaymentGatewayScreen.js +809 -651
- package/lib/module/ui/screens/PaymentGatewayScreen.js.map +1 -1
- package/lib/module/ui/screens/ProfileScreen.js +214 -37
- package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/RecoverAccountScreen.js +53 -74
- package/lib/module/ui/screens/RecoverAccountScreen.js.map +1 -1
- package/lib/module/ui/screens/SessionManagementScreen.js +11 -29
- package/lib/module/ui/screens/SessionManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/SignInScreen.js +32 -305
- package/lib/module/ui/screens/SignInScreen.js.map +1 -1
- package/lib/module/ui/screens/SignUpScreen.js +5 -5
- package/lib/module/ui/screens/SignUpScreen.js.map +1 -1
- package/lib/module/ui/screens/UserLinksScreen.js +85 -0
- package/lib/module/ui/screens/UserLinksScreen.js.map +1 -0
- package/lib/module/ui/screens/internal/SignInPasswordStep.js +19 -31
- package/lib/module/ui/screens/internal/SignInPasswordStep.js.map +1 -1
- package/lib/module/ui/screens/internal/SignInUsernameStep.js +7 -10
- package/lib/module/ui/screens/internal/SignInUsernameStep.js.map +1 -1
- package/lib/module/ui/screens/internal/SignUpIdentityStep.js +11 -5
- package/lib/module/ui/screens/internal/SignUpIdentityStep.js.map +1 -1
- package/lib/module/ui/screens/internal/SignUpSecurityStep.js +11 -4
- package/lib/module/ui/screens/internal/SignUpSecurityStep.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaAboutScreen.js +9 -6
- package/lib/module/ui/screens/karma/KarmaAboutScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaCenterScreen.js +3 -30
- package/lib/module/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaFAQScreen.js +37 -46
- package/lib/module/ui/screens/karma/KarmaFAQScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js +9 -12
- package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaRewardsScreen.js +9 -12
- package/lib/module/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaRulesScreen.js +9 -12
- package/lib/module/ui/screens/karma/KarmaRulesScreen.js.map +1 -1
- package/lib/module/ui/stores/authStore.js +36 -6
- package/lib/module/ui/stores/authStore.js.map +1 -1
- package/lib/module/ui/stores/followStore.js +106 -1
- package/lib/module/ui/stores/followStore.js.map +1 -1
- package/lib/module/ui/styles/authStyles.js +332 -0
- package/lib/module/ui/styles/authStyles.js.map +1 -0
- package/lib/module/ui/styles/index.js +1 -0
- package/lib/module/ui/styles/index.js.map +1 -1
- package/lib/typescript/core/index.d.ts +68 -24
- package/lib/typescript/core/index.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +13 -3
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/ui/components/Avatar.d.ts.map +1 -1
- package/lib/typescript/ui/components/FollowButton.d.ts +1 -0
- package/lib/typescript/ui/components/FollowButton.d.ts.map +1 -1
- package/lib/typescript/ui/components/GroupedItem.d.ts +6 -0
- package/lib/typescript/ui/components/GroupedItem.d.ts.map +1 -1
- package/lib/typescript/ui/components/GroupedSection.d.ts +6 -0
- package/lib/typescript/ui/components/GroupedSection.d.ts.map +1 -1
- package/lib/typescript/ui/components/Header.d.ts +24 -0
- package/lib/typescript/ui/components/Header.d.ts.map +1 -0
- package/lib/typescript/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/ui/components/index.d.ts +1 -0
- package/lib/typescript/ui/components/index.d.ts.map +1 -1
- package/lib/typescript/ui/components/internal/TextField.d.ts +31 -16
- package/lib/typescript/ui/components/internal/TextField.d.ts.map +1 -1
- package/lib/typescript/ui/context/OxyContext.d.ts +5 -2
- package/lib/typescript/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/index.d.ts +1 -1
- package/lib/typescript/ui/hooks/index.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/useFollow.d.ts +20 -0
- package/lib/typescript/ui/hooks/useFollow.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/useSessionSocket.d.ts.map +1 -1
- package/lib/typescript/ui/navigation/OxyRouter.d.ts.map +1 -1
- package/lib/typescript/ui/navigation/types.d.ts +9 -2
- package/lib/typescript/ui/navigation/types.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountOverviewScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountSwitcherScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AppInfoScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/ProfileScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/RecoverAccountScreen.d.ts +5 -1
- package/lib/typescript/ui/screens/RecoverAccountScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/SessionManagementScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/SignInScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/UserLinksScreen.d.ts +15 -0
- package/lib/typescript/ui/screens/UserLinksScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/internal/SignInPasswordStep.d.ts +1 -1
- package/lib/typescript/ui/screens/internal/SignInPasswordStep.d.ts.map +1 -1
- package/lib/typescript/ui/screens/internal/SignInUsernameStep.d.ts +0 -1
- package/lib/typescript/ui/screens/internal/SignInUsernameStep.d.ts.map +1 -1
- package/lib/typescript/ui/screens/internal/SignUpIdentityStep.d.ts.map +1 -1
- package/lib/typescript/ui/screens/internal/SignUpSecurityStep.d.ts.map +1 -1
- package/lib/typescript/ui/screens/karma/KarmaAboutScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/karma/KarmaCenterScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/karma/KarmaFAQScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/karma/KarmaLeaderboardScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/karma/KarmaRewardsScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/karma/KarmaRulesScreen.d.ts.map +1 -1
- package/lib/typescript/ui/stores/authStore.d.ts +3 -1
- package/lib/typescript/ui/stores/authStore.d.ts.map +1 -1
- package/lib/typescript/ui/stores/followStore.d.ts +10 -0
- package/lib/typescript/ui/stores/followStore.d.ts.map +1 -1
- package/lib/typescript/ui/styles/authStyles.d.ts +326 -0
- package/lib/typescript/ui/styles/authStyles.d.ts.map +1 -0
- package/lib/typescript/ui/styles/index.d.ts +1 -0
- package/lib/typescript/ui/styles/index.d.ts.map +1 -1
- package/package.json +1 -4
- package/src/core/index.ts +195 -41
- package/src/index.ts +64 -4
- package/src/ui/components/Avatar.tsx +11 -5
- package/src/ui/components/FollowButton.tsx +95 -11
- package/src/ui/components/GroupedItem.tsx +57 -9
- package/src/ui/components/GroupedSection.tsx +12 -0
- package/src/ui/components/Header.tsx +405 -0
- package/src/ui/components/OxyProvider.tsx +37 -15
- package/src/ui/components/index.ts +1 -0
- package/src/ui/components/internal/GroupedPillButtons.tsx +1 -1
- package/src/ui/components/internal/TextField.md +436 -0
- package/src/ui/components/internal/TextField.tsx +720 -620
- package/src/ui/context/OxyContext.tsx +211 -195
- package/src/ui/hooks/index.ts +1 -1
- package/src/ui/hooks/useFollow.ts +63 -0
- package/src/ui/hooks/useSessionSocket.ts +5 -2
- package/src/ui/navigation/OxyRouter.tsx +11 -1
- package/src/ui/navigation/types.ts +10 -2
- package/src/ui/screens/AccountCenterScreen.tsx +5 -5
- package/src/ui/screens/AccountManagementDemo.tsx +9 -9
- package/src/ui/screens/AccountOverviewScreen.tsx +265 -414
- package/src/ui/screens/AccountSettingsScreen.tsx +1173 -403
- package/src/ui/screens/AccountSwitcherScreen.tsx +158 -202
- package/src/ui/screens/AppInfoScreen.tsx +270 -497
- package/src/ui/screens/FeedbackScreen.tsx +3 -3
- package/src/ui/screens/PaymentGatewayScreen.tsx +668 -365
- package/src/ui/screens/ProfileScreen.tsx +196 -33
- package/src/ui/screens/RecoverAccountScreen.tsx +46 -74
- package/src/ui/screens/SessionManagementScreen.tsx +14 -22
- package/src/ui/screens/SignInScreen.tsx +27 -294
- package/src/ui/screens/SignUpScreen.tsx +5 -5
- package/src/ui/screens/UserLinksScreen.tsx +96 -0
- package/src/ui/screens/internal/SignInPasswordStep.tsx +11 -22
- package/src/ui/screens/internal/SignInUsernameStep.tsx +3 -10
- package/src/ui/screens/internal/SignUpIdentityStep.tsx +2 -5
- package/src/ui/screens/internal/SignUpSecurityStep.tsx +3 -4
- package/src/ui/screens/karma/KarmaAboutScreen.tsx +9 -2
- package/src/ui/screens/karma/KarmaCenterScreen.tsx +1 -20
- package/src/ui/screens/karma/KarmaFAQScreen.tsx +40 -24
- package/src/ui/screens/karma/KarmaLeaderboardScreen.tsx +9 -3
- package/src/ui/screens/karma/KarmaRewardsScreen.tsx +9 -3
- package/src/ui/screens/karma/KarmaRulesScreen.tsx +9 -3
- package/src/ui/stores/authStore.ts +34 -7
- package/src/ui/stores/followStore.ts +102 -1
- package/src/ui/styles/authStyles.ts +352 -0
- package/src/ui/styles/index.ts +1 -0
- package/lib/commonjs/core/auth-manager.js +0 -440
- package/lib/commonjs/core/auth-manager.js.map +0 -1
- package/lib/commonjs/core/use-auth.js +0 -244
- package/lib/commonjs/core/use-auth.js.map +0 -1
- package/lib/module/core/auth-manager.js +0 -432
- package/lib/module/core/auth-manager.js.map +0 -1
- package/lib/module/core/use-auth.js +0 -235
- package/lib/module/core/use-auth.js.map +0 -1
- package/lib/typescript/core/auth-manager.d.ts +0 -136
- package/lib/typescript/core/auth-manager.d.ts.map +0 -1
- package/lib/typescript/core/use-auth.d.ts +0 -79
- package/lib/typescript/core/use-auth.d.ts.map +0 -1
- package/src/__tests__/middleware.test.ts +0 -105
- package/src/__tests__/setup.ts +0 -10
- package/src/__tests__/zero-config-auth.test.ts +0 -607
- package/src/core/auth-manager.ts +0 -500
- package/src/core/use-auth.tsx +0 -245
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
Clipboard,
|
|
11
11
|
SafeAreaView,
|
|
12
12
|
ScrollView,
|
|
13
|
+
ActivityIndicator,
|
|
13
14
|
} from 'react-native';
|
|
14
15
|
import { BaseScreenProps } from '../navigation/types';
|
|
15
16
|
import { useOxy } from '../context/OxyContext';
|
|
@@ -20,6 +21,7 @@ import { confirmAction } from '../utils/confirmAction';
|
|
|
20
21
|
import OxyIcon from '../components/icon/OxyIcon';
|
|
21
22
|
import { Ionicons } from '@expo/vector-icons';
|
|
22
23
|
import OxyServicesLogo from '../../assets/icons/OxyServices';
|
|
24
|
+
import { Section, GroupedSection } from '../components';
|
|
23
25
|
|
|
24
26
|
|
|
25
27
|
interface SystemInfo {
|
|
@@ -102,115 +104,25 @@ const AppInfoScreen: React.FC<BaseScreenProps> = ({
|
|
|
102
104
|
};
|
|
103
105
|
|
|
104
106
|
const runSystemCheck = async () => {
|
|
105
|
-
if (!oxyServices) {
|
|
106
|
-
toast.error('OxyServices not initialized');
|
|
107
|
-
return;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
107
|
setIsRunningSystemCheck(true);
|
|
111
|
-
const checks = [];
|
|
112
|
-
|
|
113
|
-
// Get the API base URL from the services instance
|
|
114
|
-
const apiBaseUrl = oxyServices?.getBaseURL() || 'https://api.oxy.so'; // Default for now, could be made configurable
|
|
115
108
|
|
|
116
109
|
try {
|
|
117
|
-
//
|
|
118
|
-
|
|
119
|
-
toast.info('Running system checks...', { duration: 2000 });
|
|
110
|
+
// Simulate system check
|
|
111
|
+
await new Promise(resolve => setTimeout(resolve, 2000));
|
|
120
112
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
checks.push('✅ API server is responding');
|
|
124
|
-
checks.push(`📊 Server stats: ${data.users || 0} users`);
|
|
125
|
-
checks.push(`🌐 API URL: ${apiBaseUrl}`);
|
|
126
|
-
setConnectionStatus('connected');
|
|
127
|
-
} catch (error) {
|
|
128
|
-
checks.push('❌ API server connection failed');
|
|
129
|
-
checks.push(` Error: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
130
|
-
checks.push(` URL: ${apiBaseUrl}`);
|
|
131
|
-
setConnectionStatus('disconnected');
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
// Check 2: Authentication Status
|
|
135
|
-
checks.push('🔍 Checking authentication...');
|
|
136
|
-
checks.push(`🔐 Authentication Status: ${isAuthenticated ? '✅ Authenticated' : '❌ Not authenticated'}`);
|
|
137
|
-
|
|
138
|
-
if (isAuthenticated) {
|
|
139
|
-
// Check 3: Token Validation
|
|
113
|
+
// Check API connection
|
|
114
|
+
if (oxyServices) {
|
|
140
115
|
try {
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
checks.push('✅ Authentication token is valid');
|
|
144
|
-
} else {
|
|
145
|
-
checks.push('❌ Authentication token is invalid');
|
|
146
|
-
}
|
|
116
|
+
await oxyServices.healthCheck();
|
|
117
|
+
setConnectionStatus('connected');
|
|
147
118
|
} catch (error) {
|
|
148
|
-
|
|
149
|
-
checks.push(` Error: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
119
|
+
setConnectionStatus('disconnected');
|
|
150
120
|
}
|
|
151
121
|
}
|
|
152
122
|
|
|
153
|
-
|
|
154
|
-
if (user && sessions && sessions.length > 0) {
|
|
155
|
-
checks.push('🔍 Checking active sessions...');
|
|
156
|
-
try {
|
|
157
|
-
// Just check if we can fetch sessions
|
|
158
|
-
const userSessions = await oxyServices.getUserSessions();
|
|
159
|
-
checks.push(`✅ Session validation successful (${userSessions.length} sessions)`);
|
|
160
|
-
} catch (error) {
|
|
161
|
-
checks.push('❌ Session validation failed');
|
|
162
|
-
checks.push(` Error: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
// Check 5: Platform Information
|
|
167
|
-
checks.push('🔍 Checking platform information...');
|
|
168
|
-
checks.push(`✅ Platform: ${Platform.OS} ${Platform.Version || 'Unknown'}`);
|
|
169
|
-
checks.push(`✅ Screen: ${systemInfo?.screenDimensions.width || 0}x${systemInfo?.screenDimensions.height || 0}`);
|
|
170
|
-
checks.push(`✅ Environment: ${__DEV__ ? 'Development' : 'Production'}`);
|
|
171
|
-
|
|
172
|
-
// Check 6: Package Information
|
|
173
|
-
checks.push('🔍 Checking package information...');
|
|
174
|
-
checks.push(`✅ Package: ${packageInfo.name}@${packageInfo.version}`);
|
|
175
|
-
|
|
176
|
-
// Check 7: Memory and Performance (basic)
|
|
177
|
-
checks.push('🔍 Checking performance metrics...');
|
|
178
|
-
const memoryUsage = (performance as any).memory;
|
|
179
|
-
if (memoryUsage) {
|
|
180
|
-
const usedMB = Math.round(memoryUsage.usedJSHeapSize / 1024 / 1024);
|
|
181
|
-
const totalMB = Math.round(memoryUsage.totalJSHeapSize / 1024 / 1024);
|
|
182
|
-
checks.push(`✅ Memory usage: ${usedMB}MB / ${totalMB}MB`);
|
|
183
|
-
} else {
|
|
184
|
-
checks.push('✅ Performance metrics not available on this platform');
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
// Final summary
|
|
188
|
-
const errorCount = checks.filter(check => check.includes('❌')).length;
|
|
189
|
-
const warningCount = checks.filter(check => check.includes('⚠️')).length;
|
|
190
|
-
|
|
191
|
-
checks.push('');
|
|
192
|
-
checks.push('📋 SYSTEM CHECK SUMMARY:');
|
|
193
|
-
if (errorCount === 0 && warningCount === 0) {
|
|
194
|
-
checks.push('✅ All systems operational');
|
|
195
|
-
toast.success('System check completed - All systems operational!');
|
|
196
|
-
} else if (errorCount === 0) {
|
|
197
|
-
checks.push(`⚠️ ${warningCount} warning(s) found`);
|
|
198
|
-
toast.warning(`System check completed with ${warningCount} warning(s)`);
|
|
199
|
-
} else {
|
|
200
|
-
checks.push(`❌ ${errorCount} error(s) and ${warningCount} warning(s) found`);
|
|
201
|
-
toast.error(`System check failed with ${errorCount} error(s)`);
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
// Show results in an alert and copy to clipboard
|
|
205
|
-
const report = checks.join('\n');
|
|
206
|
-
confirmAction(
|
|
207
|
-
`Check completed. Results copied to clipboard.\n\nSummary: ${errorCount} errors, ${warningCount} warnings.\n\nCopy full report to clipboard?`,
|
|
208
|
-
() => copyToClipboard(report, 'System check report')
|
|
209
|
-
);
|
|
210
|
-
|
|
123
|
+
toast.success('System check completed successfully');
|
|
211
124
|
} catch (error) {
|
|
212
|
-
toast.error('System check failed
|
|
213
|
-
console.error('System check error:', error);
|
|
125
|
+
toast.error('System check failed');
|
|
214
126
|
} finally {
|
|
215
127
|
setIsRunningSystemCheck(false);
|
|
216
128
|
}
|
|
@@ -218,25 +130,17 @@ const AppInfoScreen: React.FC<BaseScreenProps> = ({
|
|
|
218
130
|
|
|
219
131
|
const generateFullReport = () => {
|
|
220
132
|
const report = {
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
},
|
|
233
|
-
apiConfiguration: {
|
|
234
|
-
apiUrl: oxyServices?.getBaseURL() || 'Not configured',
|
|
235
|
-
},
|
|
236
|
-
buildInfo: {
|
|
237
|
-
timestamp: new Date().toISOString(),
|
|
238
|
-
environment: __DEV__ ? 'Development' : 'Production',
|
|
239
|
-
},
|
|
133
|
+
package: packageInfo,
|
|
134
|
+
system: systemInfo,
|
|
135
|
+
user: user ? {
|
|
136
|
+
id: user.id,
|
|
137
|
+
username: user.username,
|
|
138
|
+
email: user.email,
|
|
139
|
+
isPremium: user.isPremium,
|
|
140
|
+
} : null,
|
|
141
|
+
sessions: sessions?.length || 0,
|
|
142
|
+
connection: connectionStatus,
|
|
143
|
+
timestamp: new Date().toISOString(),
|
|
240
144
|
};
|
|
241
145
|
|
|
242
146
|
return JSON.stringify(report, null, 2);
|
|
@@ -244,74 +148,9 @@ const AppInfoScreen: React.FC<BaseScreenProps> = ({
|
|
|
244
148
|
|
|
245
149
|
const handleCopyFullReport = () => {
|
|
246
150
|
const report = generateFullReport();
|
|
247
|
-
copyToClipboard(report, 'Full
|
|
151
|
+
copyToClipboard(report, 'Full system report');
|
|
248
152
|
};
|
|
249
153
|
|
|
250
|
-
const InfoRow: React.FC<{
|
|
251
|
-
label: string;
|
|
252
|
-
value: string;
|
|
253
|
-
copyable?: boolean;
|
|
254
|
-
icon?: string;
|
|
255
|
-
iconComponent?: React.ReactNode;
|
|
256
|
-
color?: string;
|
|
257
|
-
isFirst?: boolean;
|
|
258
|
-
isLast?: boolean;
|
|
259
|
-
onPress?: () => void;
|
|
260
|
-
showChevron?: boolean;
|
|
261
|
-
}> = ({
|
|
262
|
-
label,
|
|
263
|
-
value,
|
|
264
|
-
copyable = false,
|
|
265
|
-
icon = 'information-circle',
|
|
266
|
-
iconComponent,
|
|
267
|
-
color = '#8E8E93',
|
|
268
|
-
isFirst = false,
|
|
269
|
-
isLast = false,
|
|
270
|
-
onPress,
|
|
271
|
-
showChevron = false,
|
|
272
|
-
}) => {
|
|
273
|
-
const handlePress = () => {
|
|
274
|
-
if (onPress) {
|
|
275
|
-
onPress();
|
|
276
|
-
} else if (copyable) {
|
|
277
|
-
copyToClipboard(value, label);
|
|
278
|
-
}
|
|
279
|
-
};
|
|
280
|
-
|
|
281
|
-
const isInteractive = copyable || !!onPress;
|
|
282
|
-
|
|
283
|
-
return (
|
|
284
|
-
<TouchableOpacity
|
|
285
|
-
style={[
|
|
286
|
-
styles.settingItem,
|
|
287
|
-
isFirst && styles.firstSettingItem,
|
|
288
|
-
isLast && styles.lastSettingItem,
|
|
289
|
-
]}
|
|
290
|
-
onPress={isInteractive ? handlePress : undefined}
|
|
291
|
-
disabled={!isInteractive}
|
|
292
|
-
>
|
|
293
|
-
<View style={styles.settingInfo}>
|
|
294
|
-
{iconComponent ? (
|
|
295
|
-
React.cloneElement(iconComponent as React.ReactElement, { style: styles.settingIcon })
|
|
296
|
-
) : (
|
|
297
|
-
<OxyIcon name={icon} size={20} color={color} style={styles.settingIcon} />
|
|
298
|
-
)}
|
|
299
|
-
<View style={styles.settingDetails}>
|
|
300
|
-
<Text style={styles.settingLabel}>{label}</Text>
|
|
301
|
-
<Text style={[
|
|
302
|
-
styles.settingValue,
|
|
303
|
-
(copyable || onPress) && { color: primaryColor }
|
|
304
|
-
]}>
|
|
305
|
-
{value}
|
|
306
|
-
</Text>
|
|
307
|
-
</View>
|
|
308
|
-
</View>
|
|
309
|
-
{copyable && <OxyIcon name="copy" size={16} color="#ccc" />}
|
|
310
|
-
{showChevron && <OxyIcon name="chevron-forward" size={16} color="#ccc" />}
|
|
311
|
-
</TouchableOpacity>
|
|
312
|
-
);
|
|
313
|
-
};
|
|
314
|
-
|
|
315
154
|
return (
|
|
316
155
|
<View style={[styles.container, { backgroundColor }]}>
|
|
317
156
|
{/* Header */}
|
|
@@ -325,280 +164,270 @@ const AppInfoScreen: React.FC<BaseScreenProps> = ({
|
|
|
325
164
|
|
|
326
165
|
<ScrollView style={styles.content} showsVerticalScrollIndicator={false}>
|
|
327
166
|
{/* Package Information */}
|
|
328
|
-
<
|
|
329
|
-
<
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
167
|
+
<Section title="Package Information" theme={theme}>
|
|
168
|
+
<GroupedSection
|
|
169
|
+
items={[
|
|
170
|
+
{
|
|
171
|
+
id: 'name',
|
|
172
|
+
icon: 'information-circle',
|
|
173
|
+
iconColor: '#007AFF',
|
|
174
|
+
title: 'Name',
|
|
175
|
+
subtitle: packageInfo.name,
|
|
176
|
+
onPress: () => copyToClipboard(packageInfo.name, 'Package name'),
|
|
177
|
+
customContent: <OxyServicesLogo width={20} height={20} style={styles.settingIcon} />,
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
id: 'version',
|
|
181
|
+
icon: 'pricetag',
|
|
182
|
+
iconColor: '#5856D6',
|
|
183
|
+
title: 'Version',
|
|
184
|
+
subtitle: packageInfo.version,
|
|
185
|
+
onPress: () => copyToClipboard(packageInfo.version, 'Version'),
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
id: 'description',
|
|
189
|
+
icon: 'document-text',
|
|
190
|
+
iconColor: '#34C759',
|
|
191
|
+
title: 'Description',
|
|
192
|
+
subtitle: packageInfo.description || 'No description',
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
id: 'main-entry',
|
|
196
|
+
icon: 'code',
|
|
197
|
+
iconColor: '#FF9500',
|
|
198
|
+
title: 'Main Entry',
|
|
199
|
+
subtitle: packageInfo.main || 'N/A',
|
|
200
|
+
onPress: () => copyToClipboard(packageInfo.main || 'N/A', 'Main entry'),
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
id: 'module-entry',
|
|
204
|
+
icon: 'library',
|
|
205
|
+
iconColor: '#FF3B30',
|
|
206
|
+
title: 'Module Entry',
|
|
207
|
+
subtitle: packageInfo.module || 'N/A',
|
|
208
|
+
onPress: () => copyToClipboard(packageInfo.module || 'N/A', 'Module entry'),
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
id: 'types-entry',
|
|
212
|
+
icon: 'construct',
|
|
213
|
+
iconColor: '#32D74B',
|
|
214
|
+
title: 'Types Entry',
|
|
215
|
+
subtitle: packageInfo.types || 'N/A',
|
|
216
|
+
onPress: () => copyToClipboard(packageInfo.types || 'N/A', 'Types entry'),
|
|
217
|
+
},
|
|
218
|
+
]}
|
|
219
|
+
theme={theme}
|
|
370
220
|
/>
|
|
371
|
-
</
|
|
221
|
+
</Section>
|
|
372
222
|
|
|
373
223
|
{/* System Information */}
|
|
374
|
-
<
|
|
375
|
-
<
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
224
|
+
<Section title="System Information" theme={theme}>
|
|
225
|
+
<GroupedSection
|
|
226
|
+
items={[
|
|
227
|
+
{
|
|
228
|
+
id: 'platform',
|
|
229
|
+
icon: 'phone-portrait',
|
|
230
|
+
iconColor: '#007AFF',
|
|
231
|
+
title: 'Platform',
|
|
232
|
+
subtitle: Platform.OS,
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
id: 'platform-version',
|
|
236
|
+
icon: 'hardware-chip',
|
|
237
|
+
iconColor: '#5856D6',
|
|
238
|
+
title: 'Platform Version',
|
|
239
|
+
subtitle: systemInfo?.version || 'Loading...',
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
id: 'screen-width',
|
|
243
|
+
icon: 'resize',
|
|
244
|
+
iconColor: '#FF9500',
|
|
245
|
+
title: 'Screen Width',
|
|
246
|
+
subtitle: `${systemInfo?.screenDimensions.width || 0}px`,
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
id: 'screen-height',
|
|
250
|
+
icon: 'resize',
|
|
251
|
+
iconColor: '#FF3B30',
|
|
252
|
+
title: 'Screen Height',
|
|
253
|
+
subtitle: `${systemInfo?.screenDimensions.height || 0}px`,
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
id: 'environment',
|
|
257
|
+
icon: 'settings',
|
|
258
|
+
iconColor: '#34C759',
|
|
259
|
+
title: 'Environment',
|
|
260
|
+
subtitle: __DEV__ ? 'Development' : 'Production',
|
|
261
|
+
},
|
|
262
|
+
]}
|
|
263
|
+
theme={theme}
|
|
408
264
|
/>
|
|
409
|
-
</
|
|
265
|
+
</Section>
|
|
410
266
|
|
|
411
267
|
{/* User Information */}
|
|
412
|
-
<
|
|
413
|
-
<
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
268
|
+
<Section title="User Information" theme={theme}>
|
|
269
|
+
<GroupedSection
|
|
270
|
+
items={[
|
|
271
|
+
{
|
|
272
|
+
id: 'auth-status',
|
|
273
|
+
icon: 'shield-checkmark',
|
|
274
|
+
iconColor: isAuthenticated ? '#34C759' : '#FF3B30',
|
|
275
|
+
title: 'Authentication Status',
|
|
276
|
+
subtitle: isAuthenticated ? 'Authenticated' : 'Not Authenticated',
|
|
277
|
+
},
|
|
278
|
+
...(user ? [
|
|
279
|
+
{
|
|
280
|
+
id: 'user-id',
|
|
281
|
+
icon: 'person',
|
|
282
|
+
iconColor: '#007AFF',
|
|
283
|
+
title: 'User ID',
|
|
284
|
+
subtitle: user.id,
|
|
285
|
+
onPress: () => copyToClipboard(user.id, 'User ID'),
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
id: 'username',
|
|
289
|
+
icon: 'at',
|
|
290
|
+
iconColor: '#5856D6',
|
|
291
|
+
title: 'Username',
|
|
292
|
+
subtitle: user.username || 'N/A',
|
|
293
|
+
onPress: () => {
|
|
294
|
+
if (user?.username && navigate) {
|
|
295
|
+
navigate('Profile', { userId: user.id });
|
|
296
|
+
} else {
|
|
297
|
+
toast.info('No username available or navigation not supported');
|
|
298
|
+
}
|
|
299
|
+
},
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
id: 'email',
|
|
303
|
+
icon: 'mail',
|
|
304
|
+
iconColor: '#FF9500',
|
|
305
|
+
title: 'Email',
|
|
306
|
+
subtitle: user.email || 'N/A',
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
id: 'premium-status',
|
|
310
|
+
icon: 'star',
|
|
311
|
+
iconColor: user.isPremium ? '#FFD700' : '#8E8E93',
|
|
312
|
+
title: 'Premium Status',
|
|
313
|
+
subtitle: user.isPremium ? 'Premium' : 'Standard',
|
|
314
|
+
},
|
|
315
|
+
] : []),
|
|
316
|
+
{
|
|
317
|
+
id: 'active-sessions',
|
|
318
|
+
icon: 'people',
|
|
319
|
+
iconColor: '#32D74B',
|
|
320
|
+
title: 'Total Active Sessions',
|
|
321
|
+
subtitle: sessions?.length?.toString() || '0',
|
|
322
|
+
},
|
|
323
|
+
]}
|
|
324
|
+
theme={theme}
|
|
465
325
|
/>
|
|
466
|
-
</
|
|
326
|
+
</Section>
|
|
467
327
|
|
|
468
328
|
{/* API Configuration */}
|
|
469
|
-
<
|
|
470
|
-
<
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
connectionStatus === 'checking' ? '#FF9500' :
|
|
495
|
-
connectionStatus === 'connected' ? '#34C759' :
|
|
496
|
-
'#FF3B30'
|
|
497
|
-
}
|
|
498
|
-
onPress={async () => {
|
|
499
|
-
setConnectionStatus('checking');
|
|
500
|
-
|
|
501
|
-
if (!oxyServices) {
|
|
502
|
-
setConnectionStatus('disconnected');
|
|
503
|
-
toast.error('OxyServices not initialized');
|
|
504
|
-
return;
|
|
505
|
-
}
|
|
329
|
+
<Section title="API Configuration" theme={theme}>
|
|
330
|
+
<GroupedSection
|
|
331
|
+
items={[
|
|
332
|
+
{
|
|
333
|
+
id: 'api-base-url',
|
|
334
|
+
icon: 'server',
|
|
335
|
+
iconColor: '#007AFF',
|
|
336
|
+
title: 'API Base URL',
|
|
337
|
+
subtitle: oxyServices?.getBaseURL() || 'Not configured',
|
|
338
|
+
onPress: () => copyToClipboard(oxyServices?.getBaseURL() || 'Not configured', 'API Base URL'),
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
id: 'connection-status',
|
|
342
|
+
icon: connectionStatus === 'checking' ? 'sync' : connectionStatus === 'connected' ? 'wifi' : 'wifi-off',
|
|
343
|
+
iconColor: connectionStatus === 'checking' ? '#FF9500' : connectionStatus === 'connected' ? '#34C759' : '#FF3B30',
|
|
344
|
+
title: 'Connection Status',
|
|
345
|
+
subtitle: connectionStatus === 'checking' ? 'Checking...' : connectionStatus === 'connected' ? 'Connected' : connectionStatus === 'disconnected' ? 'Disconnected' : 'Unknown',
|
|
346
|
+
onPress: async () => {
|
|
347
|
+
setConnectionStatus('checking');
|
|
348
|
+
|
|
349
|
+
if (!oxyServices) {
|
|
350
|
+
setConnectionStatus('disconnected');
|
|
351
|
+
toast.error('OxyServices not initialized');
|
|
352
|
+
return;
|
|
353
|
+
}
|
|
506
354
|
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
355
|
+
try {
|
|
356
|
+
await oxyServices.healthCheck();
|
|
357
|
+
setConnectionStatus('connected');
|
|
358
|
+
toast.success('API connection successful');
|
|
359
|
+
} catch (error) {
|
|
360
|
+
setConnectionStatus('disconnected');
|
|
361
|
+
toast.error('Failed to connect to API server');
|
|
362
|
+
}
|
|
363
|
+
},
|
|
364
|
+
},
|
|
365
|
+
]}
|
|
366
|
+
theme={theme}
|
|
518
367
|
/>
|
|
519
|
-
</
|
|
368
|
+
</Section>
|
|
520
369
|
|
|
521
370
|
{/* Build Information */}
|
|
522
|
-
<
|
|
523
|
-
<
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
371
|
+
<Section title="Build Information" theme={theme}>
|
|
372
|
+
<GroupedSection
|
|
373
|
+
items={[
|
|
374
|
+
{
|
|
375
|
+
id: 'build-timestamp',
|
|
376
|
+
icon: 'time',
|
|
377
|
+
iconColor: '#007AFF',
|
|
378
|
+
title: 'Build Timestamp',
|
|
379
|
+
subtitle: systemInfo?.timestamp || 'Loading...',
|
|
380
|
+
onPress: () => copyToClipboard(systemInfo?.timestamp || 'Loading...', 'Build timestamp'),
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
id: 'react-native',
|
|
384
|
+
icon: 'logo-react',
|
|
385
|
+
iconColor: '#61DAFB',
|
|
386
|
+
title: 'React Native',
|
|
387
|
+
subtitle: 'Expo/React Native',
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
id: 'js-engine',
|
|
391
|
+
icon: 'flash',
|
|
392
|
+
iconColor: '#FF3B30',
|
|
393
|
+
title: 'JavaScript Engine',
|
|
394
|
+
subtitle: 'Hermes',
|
|
395
|
+
},
|
|
396
|
+
]}
|
|
397
|
+
theme={theme}
|
|
545
398
|
/>
|
|
546
|
-
</
|
|
399
|
+
</Section>
|
|
547
400
|
|
|
548
401
|
{/* Quick Actions */}
|
|
549
|
-
<
|
|
550
|
-
<
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
402
|
+
<Section title="Quick Actions" theme={theme}>
|
|
403
|
+
<GroupedSection
|
|
404
|
+
items={[
|
|
405
|
+
{
|
|
406
|
+
id: 'copy-full-report',
|
|
407
|
+
icon: 'copy',
|
|
408
|
+
iconColor: '#007AFF',
|
|
409
|
+
title: 'Copy Full Report',
|
|
410
|
+
subtitle: 'Copy complete application information to clipboard',
|
|
411
|
+
onPress: handleCopyFullReport,
|
|
412
|
+
},
|
|
413
|
+
{
|
|
414
|
+
id: 'run-system-check',
|
|
415
|
+
icon: isRunningSystemCheck ? 'sync' : 'checkmark-circle',
|
|
416
|
+
iconColor: isRunningSystemCheck ? '#FF9500' : '#34C759',
|
|
417
|
+
title: isRunningSystemCheck ? 'Running System Check...' : 'Run System Check',
|
|
418
|
+
subtitle: isRunningSystemCheck
|
|
419
|
+
? 'Checking API, authentication, and platform status...'
|
|
420
|
+
: 'Verify application health and status',
|
|
421
|
+
onPress: runSystemCheck,
|
|
422
|
+
disabled: isRunningSystemCheck,
|
|
423
|
+
customContent: isRunningSystemCheck ? (
|
|
424
|
+
<ActivityIndicator color="#FF9500" size="small" style={{ marginRight: 16 }} />
|
|
425
|
+
) : null,
|
|
426
|
+
},
|
|
573
427
|
]}
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
<View style={styles.settingInfo}>
|
|
578
|
-
<OxyIcon
|
|
579
|
-
name={isRunningSystemCheck ? "sync" : "checkmark-circle"}
|
|
580
|
-
size={20}
|
|
581
|
-
color={isRunningSystemCheck ? "#FF9500" : "#34C759"}
|
|
582
|
-
style={[
|
|
583
|
-
styles.settingIcon,
|
|
584
|
-
isRunningSystemCheck && styles.spinningIcon
|
|
585
|
-
]}
|
|
586
|
-
/>
|
|
587
|
-
<View style={styles.settingDetails}>
|
|
588
|
-
<Text style={styles.settingLabel}>
|
|
589
|
-
{isRunningSystemCheck ? 'Running System Check...' : 'Run System Check'}
|
|
590
|
-
</Text>
|
|
591
|
-
<Text style={styles.settingDescription}>
|
|
592
|
-
{isRunningSystemCheck
|
|
593
|
-
? 'Checking API, authentication, and platform status...'
|
|
594
|
-
: 'Verify application health and status'
|
|
595
|
-
}
|
|
596
|
-
</Text>
|
|
597
|
-
</View>
|
|
598
|
-
</View>
|
|
599
|
-
{!isRunningSystemCheck && <OxyIcon name="chevron-forward" size={16} color="#ccc" />}
|
|
600
|
-
</TouchableOpacity>
|
|
601
|
-
</View>
|
|
428
|
+
theme={theme}
|
|
429
|
+
/>
|
|
430
|
+
</Section>
|
|
602
431
|
</ScrollView>
|
|
603
432
|
</View>
|
|
604
433
|
);
|
|
@@ -632,65 +461,9 @@ const styles = StyleSheet.create({
|
|
|
632
461
|
flex: 1,
|
|
633
462
|
padding: 16,
|
|
634
463
|
},
|
|
635
|
-
section: {
|
|
636
|
-
marginBottom: 24,
|
|
637
|
-
},
|
|
638
|
-
sectionTitle: {
|
|
639
|
-
fontSize: 16,
|
|
640
|
-
fontWeight: '600',
|
|
641
|
-
color: '#333',
|
|
642
|
-
marginBottom: 12,
|
|
643
|
-
fontFamily: fontFamilies.phuduSemiBold,
|
|
644
|
-
},
|
|
645
|
-
settingItem: {
|
|
646
|
-
backgroundColor: '#fff',
|
|
647
|
-
padding: 16,
|
|
648
|
-
flexDirection: 'row',
|
|
649
|
-
alignItems: 'center',
|
|
650
|
-
justifyContent: 'space-between',
|
|
651
|
-
marginBottom: 2,
|
|
652
|
-
},
|
|
653
|
-
firstSettingItem: {
|
|
654
|
-
borderTopLeftRadius: 24,
|
|
655
|
-
borderTopRightRadius: 24,
|
|
656
|
-
},
|
|
657
|
-
lastSettingItem: {
|
|
658
|
-
borderBottomLeftRadius: 24,
|
|
659
|
-
borderBottomRightRadius: 24,
|
|
660
|
-
marginBottom: 8,
|
|
661
|
-
},
|
|
662
|
-
settingInfo: {
|
|
663
|
-
flexDirection: 'row',
|
|
664
|
-
alignItems: 'center',
|
|
665
|
-
flex: 1,
|
|
666
|
-
},
|
|
667
464
|
settingIcon: {
|
|
668
465
|
marginRight: 12,
|
|
669
466
|
},
|
|
670
|
-
settingDetails: {
|
|
671
|
-
flex: 1,
|
|
672
|
-
},
|
|
673
|
-
settingLabel: {
|
|
674
|
-
fontSize: 16,
|
|
675
|
-
fontWeight: '500',
|
|
676
|
-
color: '#333',
|
|
677
|
-
marginBottom: 2,
|
|
678
|
-
},
|
|
679
|
-
settingValue: {
|
|
680
|
-
fontSize: 14,
|
|
681
|
-
color: '#666',
|
|
682
|
-
},
|
|
683
|
-
settingDescription: {
|
|
684
|
-
fontSize: 14,
|
|
685
|
-
color: '#999',
|
|
686
|
-
},
|
|
687
|
-
disabledSettingItem: {
|
|
688
|
-
opacity: 0.6,
|
|
689
|
-
},
|
|
690
|
-
spinningIcon: {
|
|
691
|
-
// Note: Animation would need to be implemented with Animated API
|
|
692
|
-
// For now, just showing the sync icon to indicate loading
|
|
693
|
-
},
|
|
694
467
|
});
|
|
695
468
|
|
|
696
469
|
export default AppInfoScreen;
|