@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
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import React, { useState, useEffect } from 'react';
|
|
4
|
-
import { View, Text, TouchableOpacity, StyleSheet, Platform, Dimensions, Clipboard, ScrollView } from 'react-native';
|
|
4
|
+
import { View, Text, TouchableOpacity, StyleSheet, Platform, Dimensions, Clipboard, ScrollView, ActivityIndicator } from 'react-native';
|
|
5
5
|
import { useOxy } from '../context/OxyContext';
|
|
6
6
|
import { fontFamilies } from '../styles/fonts';
|
|
7
7
|
import { packageInfo } from '../../constants/version';
|
|
8
8
|
import { toast } from '../../lib/sonner';
|
|
9
|
-
import { confirmAction } from '../utils/confirmAction';
|
|
10
|
-
import OxyIcon from '../components/icon/OxyIcon';
|
|
11
9
|
import { Ionicons } from '@expo/vector-icons';
|
|
12
10
|
import OxyServicesLogo from '../../assets/icons/OxyServices';
|
|
13
|
-
import {
|
|
11
|
+
import { Section, GroupedSection } from '../components';
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
13
|
const AppInfoScreen = ({
|
|
15
14
|
onClose,
|
|
16
15
|
theme,
|
|
@@ -79,196 +78,46 @@ const AppInfoScreen = ({
|
|
|
79
78
|
}
|
|
80
79
|
};
|
|
81
80
|
const runSystemCheck = async () => {
|
|
82
|
-
if (!oxyServices) {
|
|
83
|
-
toast.error('OxyServices not initialized');
|
|
84
|
-
return;
|
|
85
|
-
}
|
|
86
81
|
setIsRunningSystemCheck(true);
|
|
87
|
-
const checks = [];
|
|
88
|
-
|
|
89
|
-
// Get the API base URL from the services instance
|
|
90
|
-
const apiBaseUrl = oxyServices?.getBaseURL() || 'https://api.oxy.so'; // Default for now, could be made configurable
|
|
91
|
-
|
|
92
82
|
try {
|
|
93
|
-
//
|
|
94
|
-
|
|
95
|
-
toast.info('Running system checks...', {
|
|
96
|
-
duration: 2000
|
|
97
|
-
});
|
|
98
|
-
try {
|
|
99
|
-
const data = await oxyServices.healthCheck();
|
|
100
|
-
checks.push('✅ API server is responding');
|
|
101
|
-
checks.push(`📊 Server stats: ${data.users || 0} users`);
|
|
102
|
-
checks.push(`🌐 API URL: ${apiBaseUrl}`);
|
|
103
|
-
setConnectionStatus('connected');
|
|
104
|
-
} catch (error) {
|
|
105
|
-
checks.push('❌ API server connection failed');
|
|
106
|
-
checks.push(` Error: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
107
|
-
checks.push(` URL: ${apiBaseUrl}`);
|
|
108
|
-
setConnectionStatus('disconnected');
|
|
109
|
-
}
|
|
83
|
+
// Simulate system check
|
|
84
|
+
await new Promise(resolve => setTimeout(resolve, 2000));
|
|
110
85
|
|
|
111
|
-
// Check
|
|
112
|
-
|
|
113
|
-
checks.push(`🔐 Authentication Status: ${isAuthenticated ? '✅ Authenticated' : '❌ Not authenticated'}`);
|
|
114
|
-
if (isAuthenticated) {
|
|
115
|
-
// Check 3: Token Validation
|
|
86
|
+
// Check API connection
|
|
87
|
+
if (oxyServices) {
|
|
116
88
|
try {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
checks.push('✅ Authentication token is valid');
|
|
120
|
-
} else {
|
|
121
|
-
checks.push('❌ Authentication token is invalid');
|
|
122
|
-
}
|
|
89
|
+
await oxyServices.healthCheck();
|
|
90
|
+
setConnectionStatus('connected');
|
|
123
91
|
} catch (error) {
|
|
124
|
-
|
|
125
|
-
checks.push(` Error: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
92
|
+
setConnectionStatus('disconnected');
|
|
126
93
|
}
|
|
127
94
|
}
|
|
128
|
-
|
|
129
|
-
// Check 4: Session Validation (if user has active sessions)
|
|
130
|
-
if (user && sessions && sessions.length > 0) {
|
|
131
|
-
checks.push('🔍 Checking active sessions...');
|
|
132
|
-
try {
|
|
133
|
-
// Just check if we can fetch sessions
|
|
134
|
-
const userSessions = await oxyServices.getUserSessions();
|
|
135
|
-
checks.push(`✅ Session validation successful (${userSessions.length} sessions)`);
|
|
136
|
-
} catch (error) {
|
|
137
|
-
checks.push('❌ Session validation failed');
|
|
138
|
-
checks.push(` Error: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
// Check 5: Platform Information
|
|
143
|
-
checks.push('🔍 Checking platform information...');
|
|
144
|
-
checks.push(`✅ Platform: ${Platform.OS} ${Platform.Version || 'Unknown'}`);
|
|
145
|
-
checks.push(`✅ Screen: ${systemInfo?.screenDimensions.width || 0}x${systemInfo?.screenDimensions.height || 0}`);
|
|
146
|
-
checks.push(`✅ Environment: ${__DEV__ ? 'Development' : 'Production'}`);
|
|
147
|
-
|
|
148
|
-
// Check 6: Package Information
|
|
149
|
-
checks.push('🔍 Checking package information...');
|
|
150
|
-
checks.push(`✅ Package: ${packageInfo.name}@${packageInfo.version}`);
|
|
151
|
-
|
|
152
|
-
// Check 7: Memory and Performance (basic)
|
|
153
|
-
checks.push('🔍 Checking performance metrics...');
|
|
154
|
-
const memoryUsage = performance.memory;
|
|
155
|
-
if (memoryUsage) {
|
|
156
|
-
const usedMB = Math.round(memoryUsage.usedJSHeapSize / 1024 / 1024);
|
|
157
|
-
const totalMB = Math.round(memoryUsage.totalJSHeapSize / 1024 / 1024);
|
|
158
|
-
checks.push(`✅ Memory usage: ${usedMB}MB / ${totalMB}MB`);
|
|
159
|
-
} else {
|
|
160
|
-
checks.push('✅ Performance metrics not available on this platform');
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
// Final summary
|
|
164
|
-
const errorCount = checks.filter(check => check.includes('❌')).length;
|
|
165
|
-
const warningCount = checks.filter(check => check.includes('⚠️')).length;
|
|
166
|
-
checks.push('');
|
|
167
|
-
checks.push('📋 SYSTEM CHECK SUMMARY:');
|
|
168
|
-
if (errorCount === 0 && warningCount === 0) {
|
|
169
|
-
checks.push('✅ All systems operational');
|
|
170
|
-
toast.success('System check completed - All systems operational!');
|
|
171
|
-
} else if (errorCount === 0) {
|
|
172
|
-
checks.push(`⚠️ ${warningCount} warning(s) found`);
|
|
173
|
-
toast.warning(`System check completed with ${warningCount} warning(s)`);
|
|
174
|
-
} else {
|
|
175
|
-
checks.push(`❌ ${errorCount} error(s) and ${warningCount} warning(s) found`);
|
|
176
|
-
toast.error(`System check failed with ${errorCount} error(s)`);
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
// Show results in an alert and copy to clipboard
|
|
180
|
-
const report = checks.join('\n');
|
|
181
|
-
confirmAction(`Check completed. Results copied to clipboard.\n\nSummary: ${errorCount} errors, ${warningCount} warnings.\n\nCopy full report to clipboard?`, () => copyToClipboard(report, 'System check report'));
|
|
95
|
+
toast.success('System check completed successfully');
|
|
182
96
|
} catch (error) {
|
|
183
|
-
toast.error('System check failed
|
|
184
|
-
console.error('System check error:', error);
|
|
97
|
+
toast.error('System check failed');
|
|
185
98
|
} finally {
|
|
186
99
|
setIsRunningSystemCheck(false);
|
|
187
100
|
}
|
|
188
101
|
};
|
|
189
102
|
const generateFullReport = () => {
|
|
190
103
|
const report = {
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
},
|
|
203
|
-
apiConfiguration: {
|
|
204
|
-
apiUrl: oxyServices?.getBaseURL() || 'Not configured'
|
|
205
|
-
},
|
|
206
|
-
buildInfo: {
|
|
207
|
-
timestamp: new Date().toISOString(),
|
|
208
|
-
environment: __DEV__ ? 'Development' : 'Production'
|
|
209
|
-
}
|
|
104
|
+
package: packageInfo,
|
|
105
|
+
system: systemInfo,
|
|
106
|
+
user: user ? {
|
|
107
|
+
id: user.id,
|
|
108
|
+
username: user.username,
|
|
109
|
+
email: user.email,
|
|
110
|
+
isPremium: user.isPremium
|
|
111
|
+
} : null,
|
|
112
|
+
sessions: sessions?.length || 0,
|
|
113
|
+
connection: connectionStatus,
|
|
114
|
+
timestamp: new Date().toISOString()
|
|
210
115
|
};
|
|
211
116
|
return JSON.stringify(report, null, 2);
|
|
212
117
|
};
|
|
213
118
|
const handleCopyFullReport = () => {
|
|
214
119
|
const report = generateFullReport();
|
|
215
|
-
copyToClipboard(report, 'Full
|
|
216
|
-
};
|
|
217
|
-
const InfoRow = ({
|
|
218
|
-
label,
|
|
219
|
-
value,
|
|
220
|
-
copyable = false,
|
|
221
|
-
icon = 'information-circle',
|
|
222
|
-
iconComponent,
|
|
223
|
-
color = '#8E8E93',
|
|
224
|
-
isFirst = false,
|
|
225
|
-
isLast = false,
|
|
226
|
-
onPress,
|
|
227
|
-
showChevron = false
|
|
228
|
-
}) => {
|
|
229
|
-
const handlePress = () => {
|
|
230
|
-
if (onPress) {
|
|
231
|
-
onPress();
|
|
232
|
-
} else if (copyable) {
|
|
233
|
-
copyToClipboard(value, label);
|
|
234
|
-
}
|
|
235
|
-
};
|
|
236
|
-
const isInteractive = copyable || !!onPress;
|
|
237
|
-
return /*#__PURE__*/_jsxs(TouchableOpacity, {
|
|
238
|
-
style: [styles.settingItem, isFirst && styles.firstSettingItem, isLast && styles.lastSettingItem],
|
|
239
|
-
onPress: isInteractive ? handlePress : undefined,
|
|
240
|
-
disabled: !isInteractive,
|
|
241
|
-
children: [/*#__PURE__*/_jsxs(View, {
|
|
242
|
-
style: styles.settingInfo,
|
|
243
|
-
children: [iconComponent ? (/*#__PURE__*/React.cloneElement(iconComponent, {
|
|
244
|
-
style: styles.settingIcon
|
|
245
|
-
})) : /*#__PURE__*/_jsx(OxyIcon, {
|
|
246
|
-
name: icon,
|
|
247
|
-
size: 20,
|
|
248
|
-
color: color,
|
|
249
|
-
style: styles.settingIcon
|
|
250
|
-
}), /*#__PURE__*/_jsxs(View, {
|
|
251
|
-
style: styles.settingDetails,
|
|
252
|
-
children: [/*#__PURE__*/_jsx(Text, {
|
|
253
|
-
style: styles.settingLabel,
|
|
254
|
-
children: label
|
|
255
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
256
|
-
style: [styles.settingValue, (copyable || onPress) && {
|
|
257
|
-
color: primaryColor
|
|
258
|
-
}],
|
|
259
|
-
children: value
|
|
260
|
-
})]
|
|
261
|
-
})]
|
|
262
|
-
}), copyable && /*#__PURE__*/_jsx(OxyIcon, {
|
|
263
|
-
name: "copy",
|
|
264
|
-
size: 16,
|
|
265
|
-
color: "#ccc"
|
|
266
|
-
}), showChevron && /*#__PURE__*/_jsx(OxyIcon, {
|
|
267
|
-
name: "chevron-forward",
|
|
268
|
-
size: 16,
|
|
269
|
-
color: "#ccc"
|
|
270
|
-
})]
|
|
271
|
-
});
|
|
120
|
+
copyToClipboard(report, 'Full system report');
|
|
272
121
|
};
|
|
273
122
|
return /*#__PURE__*/_jsxs(View, {
|
|
274
123
|
style: [styles.container, {
|
|
@@ -293,105 +142,119 @@ const AppInfoScreen = ({
|
|
|
293
142
|
}), /*#__PURE__*/_jsxs(ScrollView, {
|
|
294
143
|
style: styles.content,
|
|
295
144
|
showsVerticalScrollIndicator: false,
|
|
296
|
-
children: [/*#__PURE__*/
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
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
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
145
|
+
children: [/*#__PURE__*/_jsx(Section, {
|
|
146
|
+
title: "Package Information",
|
|
147
|
+
theme: theme,
|
|
148
|
+
children: /*#__PURE__*/_jsx(GroupedSection, {
|
|
149
|
+
items: [{
|
|
150
|
+
id: 'name',
|
|
151
|
+
icon: 'information-circle',
|
|
152
|
+
iconColor: '#007AFF',
|
|
153
|
+
title: 'Name',
|
|
154
|
+
subtitle: packageInfo.name,
|
|
155
|
+
onPress: () => copyToClipboard(packageInfo.name, 'Package name'),
|
|
156
|
+
customContent: /*#__PURE__*/_jsx(OxyServicesLogo, {
|
|
157
|
+
width: 20,
|
|
158
|
+
height: 20,
|
|
159
|
+
style: styles.settingIcon
|
|
160
|
+
})
|
|
161
|
+
}, {
|
|
162
|
+
id: 'version',
|
|
163
|
+
icon: 'pricetag',
|
|
164
|
+
iconColor: '#5856D6',
|
|
165
|
+
title: 'Version',
|
|
166
|
+
subtitle: packageInfo.version,
|
|
167
|
+
onPress: () => copyToClipboard(packageInfo.version, 'Version')
|
|
168
|
+
}, {
|
|
169
|
+
id: 'description',
|
|
170
|
+
icon: 'document-text',
|
|
171
|
+
iconColor: '#34C759',
|
|
172
|
+
title: 'Description',
|
|
173
|
+
subtitle: packageInfo.description || 'No description'
|
|
174
|
+
}, {
|
|
175
|
+
id: 'main-entry',
|
|
176
|
+
icon: 'code',
|
|
177
|
+
iconColor: '#FF9500',
|
|
178
|
+
title: 'Main Entry',
|
|
179
|
+
subtitle: packageInfo.main || 'N/A',
|
|
180
|
+
onPress: () => copyToClipboard(packageInfo.main || 'N/A', 'Main entry')
|
|
181
|
+
}, {
|
|
182
|
+
id: 'module-entry',
|
|
183
|
+
icon: 'library',
|
|
184
|
+
iconColor: '#FF3B30',
|
|
185
|
+
title: 'Module Entry',
|
|
186
|
+
subtitle: packageInfo.module || 'N/A',
|
|
187
|
+
onPress: () => copyToClipboard(packageInfo.module || 'N/A', 'Module entry')
|
|
188
|
+
}, {
|
|
189
|
+
id: 'types-entry',
|
|
190
|
+
icon: 'construct',
|
|
191
|
+
iconColor: '#32D74B',
|
|
192
|
+
title: 'Types Entry',
|
|
193
|
+
subtitle: packageInfo.types || 'N/A',
|
|
194
|
+
onPress: () => copyToClipboard(packageInfo.types || 'N/A', 'Types entry')
|
|
195
|
+
}],
|
|
196
|
+
theme: theme
|
|
197
|
+
})
|
|
198
|
+
}), /*#__PURE__*/_jsx(Section, {
|
|
199
|
+
title: "System Information",
|
|
200
|
+
theme: theme,
|
|
201
|
+
children: /*#__PURE__*/_jsx(GroupedSection, {
|
|
202
|
+
items: [{
|
|
203
|
+
id: 'platform',
|
|
204
|
+
icon: 'phone-portrait',
|
|
205
|
+
iconColor: '#007AFF',
|
|
206
|
+
title: 'Platform',
|
|
207
|
+
subtitle: Platform.OS
|
|
208
|
+
}, {
|
|
209
|
+
id: 'platform-version',
|
|
210
|
+
icon: 'hardware-chip',
|
|
211
|
+
iconColor: '#5856D6',
|
|
212
|
+
title: 'Platform Version',
|
|
213
|
+
subtitle: systemInfo?.version || 'Loading...'
|
|
214
|
+
}, {
|
|
215
|
+
id: 'screen-width',
|
|
216
|
+
icon: 'resize',
|
|
217
|
+
iconColor: '#FF9500',
|
|
218
|
+
title: 'Screen Width',
|
|
219
|
+
subtitle: `${systemInfo?.screenDimensions.width || 0}px`
|
|
220
|
+
}, {
|
|
221
|
+
id: 'screen-height',
|
|
222
|
+
icon: 'resize',
|
|
223
|
+
iconColor: '#FF3B30',
|
|
224
|
+
title: 'Screen Height',
|
|
225
|
+
subtitle: `${systemInfo?.screenDimensions.height || 0}px`
|
|
226
|
+
}, {
|
|
227
|
+
id: 'environment',
|
|
228
|
+
icon: 'settings',
|
|
229
|
+
iconColor: '#34C759',
|
|
230
|
+
title: 'Environment',
|
|
231
|
+
subtitle: __DEV__ ? 'Development' : 'Production'
|
|
232
|
+
}],
|
|
233
|
+
theme: theme
|
|
234
|
+
})
|
|
235
|
+
}), /*#__PURE__*/_jsx(Section, {
|
|
236
|
+
title: "User Information",
|
|
237
|
+
theme: theme,
|
|
238
|
+
children: /*#__PURE__*/_jsx(GroupedSection, {
|
|
239
|
+
items: [{
|
|
240
|
+
id: 'auth-status',
|
|
241
|
+
icon: 'shield-checkmark',
|
|
242
|
+
iconColor: isAuthenticated ? '#34C759' : '#FF3B30',
|
|
243
|
+
title: 'Authentication Status',
|
|
244
|
+
subtitle: isAuthenticated ? 'Authenticated' : 'Not Authenticated'
|
|
245
|
+
}, ...(user ? [{
|
|
246
|
+
id: 'user-id',
|
|
247
|
+
icon: 'person',
|
|
248
|
+
iconColor: '#007AFF',
|
|
249
|
+
title: 'User ID',
|
|
250
|
+
subtitle: user.id,
|
|
251
|
+
onPress: () => copyToClipboard(user.id, 'User ID')
|
|
252
|
+
}, {
|
|
253
|
+
id: 'username',
|
|
254
|
+
icon: 'at',
|
|
255
|
+
iconColor: '#5856D6',
|
|
256
|
+
title: 'Username',
|
|
257
|
+
subtitle: user.username || 'N/A',
|
|
395
258
|
onPress: () => {
|
|
396
259
|
if (user?.username && navigate) {
|
|
397
260
|
navigate('Profile', {
|
|
@@ -400,143 +263,119 @@ const AppInfoScreen = ({
|
|
|
400
263
|
} else {
|
|
401
264
|
toast.info('No username available or navigation not supported');
|
|
402
265
|
}
|
|
403
|
-
},
|
|
404
|
-
showChevron: true
|
|
405
|
-
}), /*#__PURE__*/_jsx(InfoRow, {
|
|
406
|
-
label: "Email",
|
|
407
|
-
value: user.email || 'N/A',
|
|
408
|
-
icon: "mail",
|
|
409
|
-
color: "#FF9500"
|
|
410
|
-
}), /*#__PURE__*/_jsx(InfoRow, {
|
|
411
|
-
label: "Premium Status",
|
|
412
|
-
value: user.isPremium ? 'Premium' : 'Standard',
|
|
413
|
-
icon: "star",
|
|
414
|
-
color: user.isPremium ? '#FFD700' : '#8E8E93'
|
|
415
|
-
})]
|
|
416
|
-
}), /*#__PURE__*/_jsx(InfoRow, {
|
|
417
|
-
label: "Total Active Sessions",
|
|
418
|
-
value: sessions?.length?.toString() || '0',
|
|
419
|
-
icon: "people",
|
|
420
|
-
color: "#32D74B",
|
|
421
|
-
isLast: true
|
|
422
|
-
})]
|
|
423
|
-
}), /*#__PURE__*/_jsxs(View, {
|
|
424
|
-
style: styles.section,
|
|
425
|
-
children: [/*#__PURE__*/_jsx(Text, {
|
|
426
|
-
style: styles.sectionTitle,
|
|
427
|
-
children: "API Configuration"
|
|
428
|
-
}), /*#__PURE__*/_jsx(InfoRow, {
|
|
429
|
-
label: "API Base URL",
|
|
430
|
-
value: oxyServices?.getBaseURL() || 'Not configured',
|
|
431
|
-
copyable: true,
|
|
432
|
-
icon: "server",
|
|
433
|
-
color: "#007AFF",
|
|
434
|
-
isFirst: true
|
|
435
|
-
}), /*#__PURE__*/_jsx(InfoRow, {
|
|
436
|
-
label: "Connection Status",
|
|
437
|
-
value: connectionStatus === 'checking' ? 'Checking...' : connectionStatus === 'connected' ? 'Connected' : connectionStatus === 'disconnected' ? 'Disconnected' : 'Unknown',
|
|
438
|
-
icon: connectionStatus === 'checking' ? 'sync' : connectionStatus === 'connected' ? 'wifi' : 'wifi-off',
|
|
439
|
-
color: connectionStatus === 'checking' ? '#FF9500' : connectionStatus === 'connected' ? '#34C759' : '#FF3B30',
|
|
440
|
-
onPress: async () => {
|
|
441
|
-
setConnectionStatus('checking');
|
|
442
|
-
if (!oxyServices) {
|
|
443
|
-
setConnectionStatus('disconnected');
|
|
444
|
-
toast.error('OxyServices not initialized');
|
|
445
|
-
return;
|
|
446
266
|
}
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
267
|
+
}, {
|
|
268
|
+
id: 'email',
|
|
269
|
+
icon: 'mail',
|
|
270
|
+
iconColor: '#FF9500',
|
|
271
|
+
title: 'Email',
|
|
272
|
+
subtitle: user.email || 'N/A'
|
|
273
|
+
}, {
|
|
274
|
+
id: 'premium-status',
|
|
275
|
+
icon: 'star',
|
|
276
|
+
iconColor: user.isPremium ? '#FFD700' : '#8E8E93',
|
|
277
|
+
title: 'Premium Status',
|
|
278
|
+
subtitle: user.isPremium ? 'Premium' : 'Standard'
|
|
279
|
+
}] : []), {
|
|
280
|
+
id: 'active-sessions',
|
|
281
|
+
icon: 'people',
|
|
282
|
+
iconColor: '#32D74B',
|
|
283
|
+
title: 'Total Active Sessions',
|
|
284
|
+
subtitle: sessions?.length?.toString() || '0'
|
|
285
|
+
}],
|
|
286
|
+
theme: theme
|
|
287
|
+
})
|
|
288
|
+
}), /*#__PURE__*/_jsx(Section, {
|
|
289
|
+
title: "API Configuration",
|
|
290
|
+
theme: theme,
|
|
291
|
+
children: /*#__PURE__*/_jsx(GroupedSection, {
|
|
292
|
+
items: [{
|
|
293
|
+
id: 'api-base-url',
|
|
294
|
+
icon: 'server',
|
|
295
|
+
iconColor: '#007AFF',
|
|
296
|
+
title: 'API Base URL',
|
|
297
|
+
subtitle: oxyServices?.getBaseURL() || 'Not configured',
|
|
298
|
+
onPress: () => copyToClipboard(oxyServices?.getBaseURL() || 'Not configured', 'API Base URL')
|
|
299
|
+
}, {
|
|
300
|
+
id: 'connection-status',
|
|
301
|
+
icon: connectionStatus === 'checking' ? 'sync' : connectionStatus === 'connected' ? 'wifi' : 'wifi-off',
|
|
302
|
+
iconColor: connectionStatus === 'checking' ? '#FF9500' : connectionStatus === 'connected' ? '#34C759' : '#FF3B30',
|
|
303
|
+
title: 'Connection Status',
|
|
304
|
+
subtitle: connectionStatus === 'checking' ? 'Checking...' : connectionStatus === 'connected' ? 'Connected' : connectionStatus === 'disconnected' ? 'Disconnected' : 'Unknown',
|
|
305
|
+
onPress: async () => {
|
|
306
|
+
setConnectionStatus('checking');
|
|
307
|
+
if (!oxyServices) {
|
|
308
|
+
setConnectionStatus('disconnected');
|
|
309
|
+
toast.error('OxyServices not initialized');
|
|
310
|
+
return;
|
|
311
|
+
}
|
|
312
|
+
try {
|
|
313
|
+
await oxyServices.healthCheck();
|
|
314
|
+
setConnectionStatus('connected');
|
|
315
|
+
toast.success('API connection successful');
|
|
316
|
+
} catch (error) {
|
|
317
|
+
setConnectionStatus('disconnected');
|
|
318
|
+
toast.error('Failed to connect to API server');
|
|
319
|
+
}
|
|
454
320
|
}
|
|
455
|
-
},
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
children:
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
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
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
}), /*#__PURE__*/_jsxs(TouchableOpacity, {
|
|
514
|
-
style: [styles.settingItem, styles.lastSettingItem, isRunningSystemCheck && styles.disabledSettingItem],
|
|
515
|
-
onPress: runSystemCheck,
|
|
516
|
-
disabled: isRunningSystemCheck,
|
|
517
|
-
children: [/*#__PURE__*/_jsxs(View, {
|
|
518
|
-
style: styles.settingInfo,
|
|
519
|
-
children: [/*#__PURE__*/_jsx(OxyIcon, {
|
|
520
|
-
name: isRunningSystemCheck ? "sync" : "checkmark-circle",
|
|
521
|
-
size: 20,
|
|
522
|
-
color: isRunningSystemCheck ? "#FF9500" : "#34C759",
|
|
523
|
-
style: [styles.settingIcon, isRunningSystemCheck && styles.spinningIcon]
|
|
524
|
-
}), /*#__PURE__*/_jsxs(View, {
|
|
525
|
-
style: styles.settingDetails,
|
|
526
|
-
children: [/*#__PURE__*/_jsx(Text, {
|
|
527
|
-
style: styles.settingLabel,
|
|
528
|
-
children: isRunningSystemCheck ? 'Running System Check...' : 'Run System Check'
|
|
529
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
530
|
-
style: styles.settingDescription,
|
|
531
|
-
children: isRunningSystemCheck ? 'Checking API, authentication, and platform status...' : 'Verify application health and status'
|
|
532
|
-
})]
|
|
533
|
-
})]
|
|
534
|
-
}), !isRunningSystemCheck && /*#__PURE__*/_jsx(OxyIcon, {
|
|
535
|
-
name: "chevron-forward",
|
|
536
|
-
size: 16,
|
|
537
|
-
color: "#ccc"
|
|
538
|
-
})]
|
|
539
|
-
})]
|
|
321
|
+
}],
|
|
322
|
+
theme: theme
|
|
323
|
+
})
|
|
324
|
+
}), /*#__PURE__*/_jsx(Section, {
|
|
325
|
+
title: "Build Information",
|
|
326
|
+
theme: theme,
|
|
327
|
+
children: /*#__PURE__*/_jsx(GroupedSection, {
|
|
328
|
+
items: [{
|
|
329
|
+
id: 'build-timestamp',
|
|
330
|
+
icon: 'time',
|
|
331
|
+
iconColor: '#007AFF',
|
|
332
|
+
title: 'Build Timestamp',
|
|
333
|
+
subtitle: systemInfo?.timestamp || 'Loading...',
|
|
334
|
+
onPress: () => copyToClipboard(systemInfo?.timestamp || 'Loading...', 'Build timestamp')
|
|
335
|
+
}, {
|
|
336
|
+
id: 'react-native',
|
|
337
|
+
icon: 'logo-react',
|
|
338
|
+
iconColor: '#61DAFB',
|
|
339
|
+
title: 'React Native',
|
|
340
|
+
subtitle: 'Expo/React Native'
|
|
341
|
+
}, {
|
|
342
|
+
id: 'js-engine',
|
|
343
|
+
icon: 'flash',
|
|
344
|
+
iconColor: '#FF3B30',
|
|
345
|
+
title: 'JavaScript Engine',
|
|
346
|
+
subtitle: 'Hermes'
|
|
347
|
+
}],
|
|
348
|
+
theme: theme
|
|
349
|
+
})
|
|
350
|
+
}), /*#__PURE__*/_jsx(Section, {
|
|
351
|
+
title: "Quick Actions",
|
|
352
|
+
theme: theme,
|
|
353
|
+
children: /*#__PURE__*/_jsx(GroupedSection, {
|
|
354
|
+
items: [{
|
|
355
|
+
id: 'copy-full-report',
|
|
356
|
+
icon: 'copy',
|
|
357
|
+
iconColor: '#007AFF',
|
|
358
|
+
title: 'Copy Full Report',
|
|
359
|
+
subtitle: 'Copy complete application information to clipboard',
|
|
360
|
+
onPress: handleCopyFullReport
|
|
361
|
+
}, {
|
|
362
|
+
id: 'run-system-check',
|
|
363
|
+
icon: isRunningSystemCheck ? 'sync' : 'checkmark-circle',
|
|
364
|
+
iconColor: isRunningSystemCheck ? '#FF9500' : '#34C759',
|
|
365
|
+
title: isRunningSystemCheck ? 'Running System Check...' : 'Run System Check',
|
|
366
|
+
subtitle: isRunningSystemCheck ? 'Checking API, authentication, and platform status...' : 'Verify application health and status',
|
|
367
|
+
onPress: runSystemCheck,
|
|
368
|
+
disabled: isRunningSystemCheck,
|
|
369
|
+
customContent: isRunningSystemCheck ? /*#__PURE__*/_jsx(ActivityIndicator, {
|
|
370
|
+
color: "#FF9500",
|
|
371
|
+
size: "small",
|
|
372
|
+
style: {
|
|
373
|
+
marginRight: 16
|
|
374
|
+
}
|
|
375
|
+
}) : null
|
|
376
|
+
}],
|
|
377
|
+
theme: theme
|
|
378
|
+
})
|
|
540
379
|
})]
|
|
541
380
|
})]
|
|
542
381
|
});
|
|
@@ -569,64 +408,8 @@ const styles = StyleSheet.create({
|
|
|
569
408
|
flex: 1,
|
|
570
409
|
padding: 16
|
|
571
410
|
},
|
|
572
|
-
section: {
|
|
573
|
-
marginBottom: 24
|
|
574
|
-
},
|
|
575
|
-
sectionTitle: {
|
|
576
|
-
fontSize: 16,
|
|
577
|
-
fontWeight: '600',
|
|
578
|
-
color: '#333',
|
|
579
|
-
marginBottom: 12,
|
|
580
|
-
fontFamily: fontFamilies.phuduSemiBold
|
|
581
|
-
},
|
|
582
|
-
settingItem: {
|
|
583
|
-
backgroundColor: '#fff',
|
|
584
|
-
padding: 16,
|
|
585
|
-
flexDirection: 'row',
|
|
586
|
-
alignItems: 'center',
|
|
587
|
-
justifyContent: 'space-between',
|
|
588
|
-
marginBottom: 2
|
|
589
|
-
},
|
|
590
|
-
firstSettingItem: {
|
|
591
|
-
borderTopLeftRadius: 24,
|
|
592
|
-
borderTopRightRadius: 24
|
|
593
|
-
},
|
|
594
|
-
lastSettingItem: {
|
|
595
|
-
borderBottomLeftRadius: 24,
|
|
596
|
-
borderBottomRightRadius: 24,
|
|
597
|
-
marginBottom: 8
|
|
598
|
-
},
|
|
599
|
-
settingInfo: {
|
|
600
|
-
flexDirection: 'row',
|
|
601
|
-
alignItems: 'center',
|
|
602
|
-
flex: 1
|
|
603
|
-
},
|
|
604
411
|
settingIcon: {
|
|
605
412
|
marginRight: 12
|
|
606
|
-
},
|
|
607
|
-
settingDetails: {
|
|
608
|
-
flex: 1
|
|
609
|
-
},
|
|
610
|
-
settingLabel: {
|
|
611
|
-
fontSize: 16,
|
|
612
|
-
fontWeight: '500',
|
|
613
|
-
color: '#333',
|
|
614
|
-
marginBottom: 2
|
|
615
|
-
},
|
|
616
|
-
settingValue: {
|
|
617
|
-
fontSize: 14,
|
|
618
|
-
color: '#666'
|
|
619
|
-
},
|
|
620
|
-
settingDescription: {
|
|
621
|
-
fontSize: 14,
|
|
622
|
-
color: '#999'
|
|
623
|
-
},
|
|
624
|
-
disabledSettingItem: {
|
|
625
|
-
opacity: 0.6
|
|
626
|
-
},
|
|
627
|
-
spinningIcon: {
|
|
628
|
-
// Note: Animation would need to be implemented with Animated API
|
|
629
|
-
// For now, just showing the sync icon to indicate loading
|
|
630
413
|
}
|
|
631
414
|
});
|
|
632
415
|
export default AppInfoScreen;
|