@oxyhq/services 5.3.11 → 5.4.1
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 +21 -0
- package/lib/commonjs/assets/assets/icons/OxyServices.tsx +67 -0
- package/lib/commonjs/assets/assets/icons/logo_OxyServices.svg +1 -0
- package/lib/commonjs/assets/icons/OxyServices.js +53 -0
- package/lib/commonjs/assets/icons/OxyServices.js.map +1 -0
- package/lib/commonjs/assets/icons/logo_OxyServices.svg +1 -0
- package/lib/commonjs/core/index.js +119 -23
- package/lib/commonjs/core/index.js.map +1 -1
- package/lib/commonjs/index.js +2 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/lib/sonner.js +15 -11
- package/lib/commonjs/lib/sonner.js.map +1 -1
- package/lib/commonjs/node/index.js +2 -0
- package/lib/commonjs/node/index.js.map +1 -1
- package/lib/commonjs/ui/components/GroupedItem.js +109 -0
- package/lib/commonjs/ui/components/GroupedItem.js.map +1 -0
- package/lib/commonjs/ui/components/GroupedSection.js +33 -0
- package/lib/commonjs/ui/components/GroupedSection.js.map +1 -0
- package/lib/commonjs/ui/components/OxyProvider.js +95 -112
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/components/ProfileCard.js +124 -0
- package/lib/commonjs/ui/components/ProfileCard.js.map +1 -0
- package/lib/commonjs/ui/components/QuickActions.js +87 -0
- package/lib/commonjs/ui/components/QuickActions.js.map +1 -0
- package/lib/commonjs/ui/components/Section.js +36 -0
- package/lib/commonjs/ui/components/Section.js.map +1 -0
- package/lib/commonjs/ui/components/SectionTitle.js +35 -0
- package/lib/commonjs/ui/components/SectionTitle.js.map +1 -0
- package/lib/commonjs/ui/components/bottomSheet/index.js +6 -6
- package/lib/commonjs/ui/components/index.js +97 -0
- package/lib/commonjs/ui/components/index.js.map +1 -0
- package/lib/commonjs/ui/navigation/OxyRouter.js +20 -3
- package/lib/commonjs/ui/navigation/OxyRouter.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountCenterScreen.js +190 -207
- package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountManagementDemo.js +299 -0
- package/lib/commonjs/ui/screens/AccountManagementDemo.js.map +1 -0
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js +669 -401
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js +695 -498
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +451 -488
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AppInfoScreen.js +498 -185
- package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/BillingManagementScreen.js +636 -0
- package/lib/commonjs/ui/screens/BillingManagementScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/FileManagementScreen.js +2497 -0
- package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +1620 -0
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/ProfileScreen.js +117 -13
- package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SessionManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SignInScreen.js +1 -1
- package/lib/commonjs/ui/screens/SignUpScreen.js +1 -1
- package/lib/commonjs/utils/polyfills.js +42 -0
- package/lib/commonjs/utils/polyfills.js.map +1 -0
- package/lib/module/assets/assets/icons/OxyServices.tsx +67 -0
- package/lib/module/assets/assets/icons/logo_OxyServices.svg +1 -0
- package/lib/module/assets/icons/OxyServices.js +46 -0
- package/lib/module/assets/icons/OxyServices.js.map +1 -0
- package/lib/module/assets/icons/logo_OxyServices.svg +1 -0
- package/lib/module/core/index.js +119 -23
- package/lib/module/core/index.js.map +1 -1
- package/lib/module/index.js +3 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/lib/sonner.js +13 -1
- package/lib/module/lib/sonner.js.map +1 -1
- package/lib/module/node/index.js +3 -0
- package/lib/module/node/index.js.map +1 -1
- package/lib/module/ui/components/GroupedItem.js +104 -0
- package/lib/module/ui/components/GroupedItem.js.map +1 -0
- package/lib/module/ui/components/GroupedSection.js +28 -0
- package/lib/module/ui/components/GroupedSection.js.map +1 -0
- package/lib/module/ui/components/OxyProvider.js +97 -114
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/components/ProfileCard.js +119 -0
- package/lib/module/ui/components/ProfileCard.js.map +1 -0
- package/lib/module/ui/components/QuickActions.js +82 -0
- package/lib/module/ui/components/QuickActions.js.map +1 -0
- package/lib/module/ui/components/Section.js +31 -0
- package/lib/module/ui/components/Section.js.map +1 -0
- package/lib/module/ui/components/SectionTitle.js +30 -0
- package/lib/module/ui/components/SectionTitle.js.map +1 -0
- package/lib/module/ui/components/bottomSheet/index.js +2 -5
- package/lib/module/ui/components/bottomSheet/index.js.map +1 -1
- package/lib/module/ui/components/index.js +18 -0
- package/lib/module/ui/components/index.js.map +1 -0
- package/lib/module/ui/navigation/OxyRouter.js +20 -3
- package/lib/module/ui/navigation/OxyRouter.js.map +1 -1
- package/lib/module/ui/screens/AccountCenterScreen.js +191 -208
- package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountManagementDemo.js +296 -0
- package/lib/module/ui/screens/AccountManagementDemo.js.map +1 -0
- package/lib/module/ui/screens/AccountOverviewScreen.js +671 -403
- package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSettingsScreen.js +698 -501
- package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSwitcherScreen.js +450 -488
- package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/module/ui/screens/AppInfoScreen.js +498 -186
- package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/module/ui/screens/BillingManagementScreen.js +631 -0
- package/lib/module/ui/screens/BillingManagementScreen.js.map +1 -0
- package/lib/module/ui/screens/FileManagementScreen.js +2492 -0
- package/lib/module/ui/screens/FileManagementScreen.js.map +1 -0
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js +1615 -0
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -0
- package/lib/module/ui/screens/ProfileScreen.js +118 -14
- package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/SessionManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/SignInScreen.js +1 -1
- package/lib/module/ui/screens/SignInScreen.js.map +1 -1
- package/lib/module/ui/screens/SignUpScreen.js +1 -1
- package/lib/module/ui/screens/SignUpScreen.js.map +1 -1
- package/lib/module/utils/polyfills.js +36 -0
- package/lib/module/utils/polyfills.js.map +1 -0
- package/lib/typescript/assets/icons/OxyServices.d.ts +29 -0
- package/lib/typescript/assets/icons/OxyServices.d.ts.map +1 -0
- package/lib/typescript/core/index.d.ts +26 -1
- package/lib/typescript/core/index.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +1 -0
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/lib/sonner.d.ts +5 -1
- package/lib/typescript/lib/sonner.d.ts.map +1 -1
- package/lib/typescript/models/interfaces.d.ts +1 -2
- package/lib/typescript/models/interfaces.d.ts.map +1 -1
- package/lib/typescript/node/index.d.ts +1 -0
- package/lib/typescript/node/index.d.ts.map +1 -1
- package/lib/typescript/ui/components/GroupedItem.d.ts +17 -0
- package/lib/typescript/ui/components/GroupedItem.d.ts.map +1 -0
- package/lib/typescript/ui/components/GroupedSection.d.ts +19 -0
- package/lib/typescript/ui/components/GroupedSection.d.ts.map +1 -0
- package/lib/typescript/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/ui/components/ProfileCard.d.ts +20 -0
- package/lib/typescript/ui/components/ProfileCard.d.ts.map +1 -0
- package/lib/typescript/ui/components/QuickActions.d.ts +15 -0
- package/lib/typescript/ui/components/QuickActions.d.ts.map +1 -0
- package/lib/typescript/ui/components/Section.d.ts +11 -0
- package/lib/typescript/ui/components/Section.d.ts.map +1 -0
- package/lib/typescript/ui/components/SectionTitle.d.ts +9 -0
- package/lib/typescript/ui/components/SectionTitle.d.ts.map +1 -0
- package/lib/typescript/ui/components/bottomSheet/index.d.ts +3 -2
- package/lib/typescript/ui/components/bottomSheet/index.d.ts.map +1 -1
- package/lib/typescript/ui/components/index.d.ts +13 -0
- package/lib/typescript/ui/components/index.d.ts.map +1 -0
- package/lib/typescript/ui/navigation/OxyRouter.d.ts.map +1 -1
- package/lib/typescript/ui/navigation/types.d.ts +8 -0
- package/lib/typescript/ui/navigation/types.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountCenterScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountManagementDemo.d.ts +8 -0
- package/lib/typescript/ui/screens/AccountManagementDemo.d.ts.map +1 -0
- package/lib/typescript/ui/screens/AccountOverviewScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts +1 -4
- 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/BillingManagementScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/BillingManagementScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/FileManagementScreen.d.ts +8 -0
- package/lib/typescript/ui/screens/FileManagementScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/PremiumSubscriptionScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/ProfileScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/SessionManagementScreen.d.ts.map +1 -1
- package/lib/typescript/utils/polyfills.d.ts +6 -0
- package/lib/typescript/utils/polyfills.d.ts.map +1 -0
- package/package.json +11 -3
- package/src/__tests__/polyfills.test.ts +30 -0
- package/src/__tests__/setup.ts +43 -0
- package/src/__tests__/ui/screens/AccountSettingsScreen.test.tsx +8 -8
- package/src/assets/icons/OxyServices.tsx +67 -0
- package/src/assets/icons/logo_OxyServices.svg +1 -0
- package/src/core/index.ts +127 -19
- package/src/index.ts +3 -0
- package/src/lib/sonner.ts +10 -1
- package/src/models/interfaces.ts +1 -2
- package/src/node/index.ts +3 -0
- package/src/ui/components/GroupedItem.tsx +118 -0
- package/src/ui/components/GroupedSection.tsx +45 -0
- package/src/ui/components/OxyProvider.tsx +95 -120
- package/src/ui/components/ProfileCard.tsx +129 -0
- package/src/ui/components/QuickActions.tsx +90 -0
- package/src/ui/components/Section.tsx +37 -0
- package/src/ui/components/SectionTitle.tsx +31 -0
- package/src/ui/components/bottomSheet/index.tsx +13 -11
- package/src/ui/components/index.ts +15 -0
- package/src/ui/navigation/OxyRouter.tsx +20 -3
- package/src/ui/navigation/types.ts +10 -1
- package/src/ui/screens/AccountCenterScreen.tsx +188 -159
- package/src/ui/screens/AccountManagementDemo.tsx +297 -0
- package/src/ui/screens/AccountOverviewScreen.tsx +474 -310
- package/src/ui/screens/AccountSettingsScreen.tsx +648 -463
- package/src/ui/screens/AccountSwitcherScreen.tsx +385 -449
- package/src/ui/screens/AppInfoScreen.tsx +571 -140
- package/src/ui/screens/BillingManagementScreen.tsx +589 -0
- package/src/ui/screens/FileManagementScreen.tsx +2513 -0
- package/src/ui/screens/PremiumSubscriptionScreen.tsx +1628 -0
- package/src/ui/screens/ProfileScreen.tsx +101 -7
- package/src/ui/screens/SessionManagementScreen.tsx +1 -0
- package/src/ui/screens/SignInScreen.tsx +1 -1
- package/src/ui/screens/SignUpScreen.tsx +1 -1
- package/src/utils/polyfills.ts +34 -0
- package/lib/commonjs/lib/sonner.web.js +0 -17
- package/lib/commonjs/lib/sonner.web.js.map +0 -1
- package/lib/module/lib/sonner.web.js +0 -4
- package/lib/module/lib/sonner.web.js.map +0 -1
- package/lib/typescript/__tests__/ui/screens/AccountSettingsScreen.test.d.ts +0 -2
- package/lib/typescript/__tests__/ui/screens/AccountSettingsScreen.test.d.ts.map +0 -1
- package/lib/typescript/lib/sonner.web.d.ts +0 -2
- package/lib/typescript/lib/sonner.web.d.ts.map +0 -1
- package/src/lib/sonner.web.ts +0 -1
|
@@ -1,11 +1,14 @@
|
|
|
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, Alert, Clipboard, ScrollView } 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 OxyIcon from '../components/icon/OxyIcon';
|
|
10
|
+
import { Ionicons } from '@expo/vector-icons';
|
|
11
|
+
import OxyServicesLogo from '../../assets/icons/OxyServices';
|
|
9
12
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
10
13
|
const AppInfoScreen = ({
|
|
11
14
|
onClose,
|
|
@@ -14,27 +17,60 @@ const AppInfoScreen = ({
|
|
|
14
17
|
}) => {
|
|
15
18
|
const {
|
|
16
19
|
user,
|
|
17
|
-
sessions
|
|
20
|
+
sessions,
|
|
21
|
+
oxyServices
|
|
18
22
|
} = useOxy();
|
|
19
23
|
const [systemInfo, setSystemInfo] = useState(null);
|
|
24
|
+
const [isRunningSystemCheck, setIsRunningSystemCheck] = useState(false);
|
|
25
|
+
const [connectionStatus, setConnectionStatus] = useState('unknown');
|
|
20
26
|
const isDarkTheme = theme === 'dark';
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
const secondaryBackgroundColor = isDarkTheme ? '#222222' : '#F5F5F5';
|
|
24
|
-
const borderColor = isDarkTheme ? '#444444' : '#E0E0E0';
|
|
25
|
-
const primaryColor = '#0066CC';
|
|
26
|
-
const successColor = '#4CAF50';
|
|
27
|
+
const backgroundColor = isDarkTheme ? '#121212' : '#f2f2f2';
|
|
28
|
+
const primaryColor = '#007AFF';
|
|
27
29
|
useEffect(() => {
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
30
|
+
const updateDimensions = () => {
|
|
31
|
+
const dimensions = Dimensions.get('window');
|
|
32
|
+
setSystemInfo(prev => ({
|
|
33
|
+
...prev,
|
|
34
|
+
platform: Platform.OS,
|
|
35
|
+
version: Platform.Version?.toString() || 'Unknown',
|
|
36
|
+
screenDimensions: {
|
|
37
|
+
width: dimensions.width,
|
|
38
|
+
height: dimensions.height
|
|
39
|
+
},
|
|
40
|
+
timestamp: new Date().toISOString()
|
|
41
|
+
}));
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
// Set initial dimensions
|
|
45
|
+
updateDimensions();
|
|
46
|
+
|
|
47
|
+
// Listen for dimension changes
|
|
48
|
+
const subscription = Dimensions.addEventListener('change', updateDimensions);
|
|
49
|
+
|
|
50
|
+
// Check API connection on mount
|
|
51
|
+
const checkConnection = async () => {
|
|
52
|
+
setConnectionStatus('checking');
|
|
53
|
+
const apiBaseUrl = oxyServices?.getBaseURL() || 'https://api.oxy.so';
|
|
54
|
+
try {
|
|
55
|
+
const response = await fetch(`${apiBaseUrl}/`, {
|
|
56
|
+
method: 'GET',
|
|
57
|
+
timeout: 3000
|
|
58
|
+
});
|
|
59
|
+
if (response.ok) {
|
|
60
|
+
setConnectionStatus('connected');
|
|
61
|
+
} else {
|
|
62
|
+
setConnectionStatus('disconnected');
|
|
63
|
+
}
|
|
64
|
+
} catch (error) {
|
|
65
|
+
setConnectionStatus('disconnected');
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
checkConnection();
|
|
69
|
+
|
|
70
|
+
// Cleanup listener on unmount
|
|
71
|
+
return () => {
|
|
72
|
+
subscription?.remove();
|
|
73
|
+
};
|
|
38
74
|
}, []);
|
|
39
75
|
const copyToClipboard = async (text, label) => {
|
|
40
76
|
try {
|
|
@@ -44,6 +80,133 @@ const AppInfoScreen = ({
|
|
|
44
80
|
toast.error('Failed to copy to clipboard');
|
|
45
81
|
}
|
|
46
82
|
};
|
|
83
|
+
const runSystemCheck = async () => {
|
|
84
|
+
if (!oxyServices) {
|
|
85
|
+
toast.error('OxyServices not initialized');
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
setIsRunningSystemCheck(true);
|
|
89
|
+
const checks = [];
|
|
90
|
+
|
|
91
|
+
// Get the API base URL from the services instance
|
|
92
|
+
const apiBaseUrl = oxyServices?.getBaseURL() || 'https://api.oxy.so'; // Default for now, could be made configurable
|
|
93
|
+
|
|
94
|
+
try {
|
|
95
|
+
// Check 1: API Server Health
|
|
96
|
+
checks.push('🔍 Checking API server connection...');
|
|
97
|
+
toast.info('Running system checks...', {
|
|
98
|
+
duration: 2000
|
|
99
|
+
});
|
|
100
|
+
try {
|
|
101
|
+
const response = await fetch(`${apiBaseUrl}/`, {
|
|
102
|
+
method: 'GET',
|
|
103
|
+
timeout: 5000
|
|
104
|
+
});
|
|
105
|
+
if (response.ok) {
|
|
106
|
+
const data = await response.json();
|
|
107
|
+
checks.push('✅ API server is responding');
|
|
108
|
+
checks.push(`📊 Server stats: ${data.users || 0} users`);
|
|
109
|
+
checks.push(`🌐 API URL: ${apiBaseUrl}`);
|
|
110
|
+
setConnectionStatus('connected');
|
|
111
|
+
} else {
|
|
112
|
+
checks.push('❌ API server returned error status');
|
|
113
|
+
checks.push(` Status: ${response.status} ${response.statusText}`);
|
|
114
|
+
setConnectionStatus('disconnected');
|
|
115
|
+
}
|
|
116
|
+
} catch (error) {
|
|
117
|
+
checks.push('❌ API server connection failed');
|
|
118
|
+
checks.push(` Error: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
119
|
+
checks.push(` URL: ${apiBaseUrl}`);
|
|
120
|
+
setConnectionStatus('disconnected');
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// Check 2: Authentication Status
|
|
124
|
+
checks.push('🔍 Checking authentication...');
|
|
125
|
+
if (oxyServices.isAuthenticated()) {
|
|
126
|
+
checks.push('✅ User is authenticated');
|
|
127
|
+
|
|
128
|
+
// Check 3: Token Validation
|
|
129
|
+
try {
|
|
130
|
+
const isValid = await oxyServices.validate();
|
|
131
|
+
if (isValid) {
|
|
132
|
+
checks.push('✅ Authentication token is valid');
|
|
133
|
+
} else {
|
|
134
|
+
checks.push('❌ Authentication token is invalid');
|
|
135
|
+
}
|
|
136
|
+
} catch (error) {
|
|
137
|
+
checks.push('❌ Token validation failed');
|
|
138
|
+
checks.push(` Error: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
139
|
+
}
|
|
140
|
+
} else {
|
|
141
|
+
checks.push('⚠️ User is not authenticated');
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// Check 4: Session Validation (if user has active sessions)
|
|
145
|
+
if (user && sessions && sessions.length > 0) {
|
|
146
|
+
checks.push('🔍 Checking active sessions...');
|
|
147
|
+
try {
|
|
148
|
+
// Just check if we can fetch sessions
|
|
149
|
+
const userSessions = await oxyServices.getUserSessions();
|
|
150
|
+
checks.push(`✅ Session validation successful (${userSessions.length} sessions)`);
|
|
151
|
+
} catch (error) {
|
|
152
|
+
checks.push('❌ Session validation failed');
|
|
153
|
+
checks.push(` Error: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
// Check 5: Platform Information
|
|
158
|
+
checks.push('🔍 Checking platform information...');
|
|
159
|
+
checks.push(`✅ Platform: ${Platform.OS} ${Platform.Version || 'Unknown'}`);
|
|
160
|
+
checks.push(`✅ Screen: ${systemInfo?.screenDimensions.width || 0}x${systemInfo?.screenDimensions.height || 0}`);
|
|
161
|
+
checks.push(`✅ Environment: ${__DEV__ ? 'Development' : 'Production'}`);
|
|
162
|
+
|
|
163
|
+
// Check 6: Package Information
|
|
164
|
+
checks.push('🔍 Checking package information...');
|
|
165
|
+
checks.push(`✅ Package: ${packageInfo.name}@${packageInfo.version}`);
|
|
166
|
+
|
|
167
|
+
// Check 7: Memory and Performance (basic)
|
|
168
|
+
checks.push('🔍 Checking performance metrics...');
|
|
169
|
+
const memoryUsage = performance.memory;
|
|
170
|
+
if (memoryUsage) {
|
|
171
|
+
const usedMB = Math.round(memoryUsage.usedJSHeapSize / 1024 / 1024);
|
|
172
|
+
const totalMB = Math.round(memoryUsage.totalJSHeapSize / 1024 / 1024);
|
|
173
|
+
checks.push(`✅ Memory usage: ${usedMB}MB / ${totalMB}MB`);
|
|
174
|
+
} else {
|
|
175
|
+
checks.push('✅ Performance metrics not available on this platform');
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
// Final summary
|
|
179
|
+
const errorCount = checks.filter(check => check.includes('❌')).length;
|
|
180
|
+
const warningCount = checks.filter(check => check.includes('⚠️')).length;
|
|
181
|
+
checks.push('');
|
|
182
|
+
checks.push('📋 SYSTEM CHECK SUMMARY:');
|
|
183
|
+
if (errorCount === 0 && warningCount === 0) {
|
|
184
|
+
checks.push('✅ All systems operational');
|
|
185
|
+
toast.success('System check completed - All systems operational!');
|
|
186
|
+
} else if (errorCount === 0) {
|
|
187
|
+
checks.push(`⚠️ ${warningCount} warning(s) found`);
|
|
188
|
+
toast.warning(`System check completed with ${warningCount} warning(s)`);
|
|
189
|
+
} else {
|
|
190
|
+
checks.push(`❌ ${errorCount} error(s) and ${warningCount} warning(s) found`);
|
|
191
|
+
toast.error(`System check failed with ${errorCount} error(s)`);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
// Show results in an alert and copy to clipboard
|
|
195
|
+
const report = checks.join('\n');
|
|
196
|
+
Alert.alert('System Check Results', `Check completed. Results copied to clipboard.\n\nSummary: ${errorCount} errors, ${warningCount} warnings`, [{
|
|
197
|
+
text: 'View Full Report',
|
|
198
|
+
onPress: () => copyToClipboard(report, 'System check report')
|
|
199
|
+
}, {
|
|
200
|
+
text: 'OK',
|
|
201
|
+
style: 'default'
|
|
202
|
+
}]);
|
|
203
|
+
} catch (error) {
|
|
204
|
+
toast.error('System check failed to run');
|
|
205
|
+
console.error('System check error:', error);
|
|
206
|
+
} finally {
|
|
207
|
+
setIsRunningSystemCheck(false);
|
|
208
|
+
}
|
|
209
|
+
};
|
|
47
210
|
const generateFullReport = () => {
|
|
48
211
|
const report = {
|
|
49
212
|
packageInfo: {
|
|
@@ -59,7 +222,7 @@ const AppInfoScreen = ({
|
|
|
59
222
|
totalUsers: sessions?.length || 0
|
|
60
223
|
},
|
|
61
224
|
apiConfiguration: {
|
|
62
|
-
apiUrl: '
|
|
225
|
+
apiUrl: oxyServices?.getBaseURL() || 'Not configured'
|
|
63
226
|
},
|
|
64
227
|
buildInfo: {
|
|
65
228
|
timestamp: new Date().toISOString(),
|
|
@@ -72,195 +235,332 @@ const AppInfoScreen = ({
|
|
|
72
235
|
const report = generateFullReport();
|
|
73
236
|
copyToClipboard(report, 'Full application report');
|
|
74
237
|
};
|
|
75
|
-
const InfoSection = ({
|
|
76
|
-
title,
|
|
77
|
-
children
|
|
78
|
-
}) => /*#__PURE__*/_jsxs(View, {
|
|
79
|
-
style: [styles.section, {
|
|
80
|
-
backgroundColor: secondaryBackgroundColor,
|
|
81
|
-
borderColor
|
|
82
|
-
}],
|
|
83
|
-
children: [/*#__PURE__*/_jsx(Text, {
|
|
84
|
-
style: [styles.sectionTitle, {
|
|
85
|
-
color: primaryColor
|
|
86
|
-
}],
|
|
87
|
-
children: title
|
|
88
|
-
}), children]
|
|
89
|
-
});
|
|
90
238
|
const InfoRow = ({
|
|
91
239
|
label,
|
|
92
240
|
value,
|
|
93
|
-
copyable = false
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
241
|
+
copyable = false,
|
|
242
|
+
icon = 'information-circle',
|
|
243
|
+
iconComponent,
|
|
244
|
+
color = '#8E8E93',
|
|
245
|
+
isFirst = false,
|
|
246
|
+
isLast = false,
|
|
247
|
+
onPress,
|
|
248
|
+
showChevron = false
|
|
249
|
+
}) => {
|
|
250
|
+
const handlePress = () => {
|
|
251
|
+
if (onPress) {
|
|
252
|
+
onPress();
|
|
253
|
+
} else if (copyable) {
|
|
254
|
+
copyToClipboard(value, label);
|
|
255
|
+
}
|
|
256
|
+
};
|
|
257
|
+
const isInteractive = copyable || !!onPress;
|
|
258
|
+
return /*#__PURE__*/_jsxs(TouchableOpacity, {
|
|
259
|
+
style: [styles.settingItem, isFirst && styles.firstSettingItem, isLast && styles.lastSettingItem],
|
|
260
|
+
onPress: isInteractive ? handlePress : undefined,
|
|
261
|
+
disabled: !isInteractive,
|
|
262
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
263
|
+
style: styles.settingInfo,
|
|
264
|
+
children: [iconComponent ? (/*#__PURE__*/React.cloneElement(iconComponent, {
|
|
265
|
+
style: styles.settingIcon
|
|
266
|
+
})) : /*#__PURE__*/_jsx(OxyIcon, {
|
|
267
|
+
name: icon,
|
|
268
|
+
size: 20,
|
|
269
|
+
color: color,
|
|
270
|
+
style: styles.settingIcon
|
|
271
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
272
|
+
style: styles.settingDetails,
|
|
273
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
274
|
+
style: styles.settingLabel,
|
|
275
|
+
children: label
|
|
276
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
277
|
+
style: [styles.settingValue, (copyable || onPress) && {
|
|
278
|
+
color: primaryColor
|
|
279
|
+
}],
|
|
280
|
+
children: value
|
|
281
|
+
})]
|
|
282
|
+
})]
|
|
283
|
+
}), copyable && /*#__PURE__*/_jsx(OxyIcon, {
|
|
284
|
+
name: "copy",
|
|
285
|
+
size: 16,
|
|
286
|
+
color: "#ccc"
|
|
287
|
+
}), showChevron && /*#__PURE__*/_jsx(OxyIcon, {
|
|
288
|
+
name: "chevron-forward",
|
|
289
|
+
size: 16,
|
|
290
|
+
color: "#ccc"
|
|
291
|
+
})]
|
|
292
|
+
});
|
|
293
|
+
};
|
|
116
294
|
return /*#__PURE__*/_jsxs(View, {
|
|
117
295
|
style: [styles.container, {
|
|
118
296
|
backgroundColor
|
|
119
297
|
}],
|
|
120
298
|
children: [/*#__PURE__*/_jsxs(View, {
|
|
121
|
-
style:
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
children: [/*#__PURE__*/_jsx(Text, {
|
|
125
|
-
style: [styles.title, {
|
|
126
|
-
color: textColor
|
|
127
|
-
}],
|
|
128
|
-
children: "Application Information"
|
|
129
|
-
}), /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
299
|
+
style: styles.header,
|
|
300
|
+
children: [/*#__PURE__*/_jsx(TouchableOpacity, {
|
|
301
|
+
style: styles.cancelButton,
|
|
130
302
|
onPress: onClose,
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
}],
|
|
136
|
-
children: "\xD7"
|
|
303
|
+
children: /*#__PURE__*/_jsx(Ionicons, {
|
|
304
|
+
name: "close",
|
|
305
|
+
size: 24,
|
|
306
|
+
color: "#666"
|
|
137
307
|
})
|
|
308
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
309
|
+
style: styles.headerTitle,
|
|
310
|
+
children: "App Information"
|
|
311
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
312
|
+
style: styles.placeholder
|
|
138
313
|
})]
|
|
139
314
|
}), /*#__PURE__*/_jsxs(ScrollView, {
|
|
140
315
|
style: styles.content,
|
|
141
316
|
showsVerticalScrollIndicator: false,
|
|
142
|
-
children: [/*#__PURE__*/_jsxs(
|
|
143
|
-
|
|
144
|
-
children: [/*#__PURE__*/_jsx(
|
|
317
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
318
|
+
style: styles.section,
|
|
319
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
320
|
+
style: styles.sectionTitle,
|
|
321
|
+
children: "Package Information"
|
|
322
|
+
}), /*#__PURE__*/_jsx(InfoRow, {
|
|
145
323
|
label: "Name",
|
|
146
324
|
value: packageInfo.name,
|
|
147
|
-
copyable: true
|
|
325
|
+
copyable: true,
|
|
326
|
+
iconComponent: /*#__PURE__*/_jsx(OxyServicesLogo, {
|
|
327
|
+
width: 20,
|
|
328
|
+
height: 20
|
|
329
|
+
}),
|
|
330
|
+
color: "#007AFF",
|
|
331
|
+
isFirst: true
|
|
148
332
|
}), /*#__PURE__*/_jsx(InfoRow, {
|
|
149
333
|
label: "Version",
|
|
150
334
|
value: packageInfo.version,
|
|
151
|
-
copyable: true
|
|
335
|
+
copyable: true,
|
|
336
|
+
icon: "pricetag",
|
|
337
|
+
color: "#5856D6"
|
|
152
338
|
}), /*#__PURE__*/_jsx(InfoRow, {
|
|
153
339
|
label: "Description",
|
|
154
|
-
value: packageInfo.description || 'No description'
|
|
340
|
+
value: packageInfo.description || 'No description',
|
|
341
|
+
icon: "document-text",
|
|
342
|
+
color: "#34C759"
|
|
155
343
|
}), /*#__PURE__*/_jsx(InfoRow, {
|
|
156
344
|
label: "Main Entry",
|
|
157
|
-
value: packageInfo.main || 'N/A'
|
|
345
|
+
value: packageInfo.main || 'N/A',
|
|
346
|
+
icon: "code",
|
|
347
|
+
color: "#FF9500"
|
|
158
348
|
}), /*#__PURE__*/_jsx(InfoRow, {
|
|
159
349
|
label: "Module Entry",
|
|
160
|
-
value: packageInfo.module || 'N/A'
|
|
350
|
+
value: packageInfo.module || 'N/A',
|
|
351
|
+
icon: "library",
|
|
352
|
+
color: "#FF3B30"
|
|
161
353
|
}), /*#__PURE__*/_jsx(InfoRow, {
|
|
162
354
|
label: "Types Entry",
|
|
163
|
-
value: packageInfo.types || 'N/A'
|
|
355
|
+
value: packageInfo.types || 'N/A',
|
|
356
|
+
icon: "construct",
|
|
357
|
+
color: "#32D74B",
|
|
358
|
+
isLast: true
|
|
164
359
|
})]
|
|
165
|
-
}), /*#__PURE__*/_jsxs(
|
|
166
|
-
|
|
167
|
-
children: [/*#__PURE__*/_jsx(
|
|
360
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
361
|
+
style: styles.section,
|
|
362
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
363
|
+
style: styles.sectionTitle,
|
|
364
|
+
children: "System Information"
|
|
365
|
+
}), /*#__PURE__*/_jsx(InfoRow, {
|
|
168
366
|
label: "Platform",
|
|
169
|
-
value: Platform.OS
|
|
367
|
+
value: Platform.OS,
|
|
368
|
+
icon: "phone-portrait",
|
|
369
|
+
color: "#007AFF",
|
|
370
|
+
isFirst: true
|
|
170
371
|
}), /*#__PURE__*/_jsx(InfoRow, {
|
|
171
372
|
label: "Platform Version",
|
|
172
|
-
value: systemInfo?.version || 'Loading...'
|
|
373
|
+
value: systemInfo?.version || 'Loading...',
|
|
374
|
+
icon: "hardware-chip",
|
|
375
|
+
color: "#5856D6"
|
|
173
376
|
}), /*#__PURE__*/_jsx(InfoRow, {
|
|
174
377
|
label: "Screen Width",
|
|
175
|
-
value: `${systemInfo?.screenDimensions.width || 0}px
|
|
378
|
+
value: `${systemInfo?.screenDimensions.width || 0}px`,
|
|
379
|
+
icon: "resize",
|
|
380
|
+
color: "#FF9500"
|
|
176
381
|
}), /*#__PURE__*/_jsx(InfoRow, {
|
|
177
382
|
label: "Screen Height",
|
|
178
|
-
value: `${systemInfo?.screenDimensions.height || 0}px
|
|
383
|
+
value: `${systemInfo?.screenDimensions.height || 0}px`,
|
|
384
|
+
icon: "resize",
|
|
385
|
+
color: "#FF3B30"
|
|
179
386
|
}), /*#__PURE__*/_jsx(InfoRow, {
|
|
180
387
|
label: "Environment",
|
|
181
|
-
value: __DEV__ ? 'Development' : 'Production'
|
|
388
|
+
value: __DEV__ ? 'Development' : 'Production',
|
|
389
|
+
icon: "settings",
|
|
390
|
+
color: "#34C759",
|
|
391
|
+
isLast: true
|
|
182
392
|
})]
|
|
183
|
-
}), /*#__PURE__*/_jsxs(
|
|
184
|
-
|
|
185
|
-
children: [/*#__PURE__*/_jsx(
|
|
393
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
394
|
+
style: styles.section,
|
|
395
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
396
|
+
style: styles.sectionTitle,
|
|
397
|
+
children: "User Information"
|
|
398
|
+
}), /*#__PURE__*/_jsx(InfoRow, {
|
|
186
399
|
label: "Authentication Status",
|
|
187
|
-
value: user ? 'Authenticated' : 'Not Authenticated'
|
|
400
|
+
value: user ? 'Authenticated' : 'Not Authenticated',
|
|
401
|
+
icon: "shield-checkmark",
|
|
402
|
+
color: user ? '#34C759' : '#FF3B30',
|
|
403
|
+
isFirst: true
|
|
188
404
|
}), user && /*#__PURE__*/_jsxs(_Fragment, {
|
|
189
405
|
children: [/*#__PURE__*/_jsx(InfoRow, {
|
|
190
406
|
label: "User ID",
|
|
191
407
|
value: user.id,
|
|
192
|
-
copyable: true
|
|
408
|
+
copyable: true,
|
|
409
|
+
icon: "person",
|
|
410
|
+
color: "#007AFF"
|
|
193
411
|
}), /*#__PURE__*/_jsx(InfoRow, {
|
|
194
412
|
label: "Username",
|
|
195
|
-
value: user.username || 'N/A'
|
|
413
|
+
value: user.username || 'N/A',
|
|
414
|
+
icon: "at",
|
|
415
|
+
color: "#5856D6",
|
|
416
|
+
onPress: () => {
|
|
417
|
+
if (user?.username && navigate) {
|
|
418
|
+
navigate('Profile', {
|
|
419
|
+
userId: user.id
|
|
420
|
+
});
|
|
421
|
+
} else {
|
|
422
|
+
toast.info('No username available or navigation not supported');
|
|
423
|
+
}
|
|
424
|
+
},
|
|
425
|
+
showChevron: true
|
|
196
426
|
}), /*#__PURE__*/_jsx(InfoRow, {
|
|
197
427
|
label: "Email",
|
|
198
|
-
value: user.email || 'N/A'
|
|
428
|
+
value: user.email || 'N/A',
|
|
429
|
+
icon: "mail",
|
|
430
|
+
color: "#FF9500"
|
|
199
431
|
}), /*#__PURE__*/_jsx(InfoRow, {
|
|
200
432
|
label: "Premium Status",
|
|
201
|
-
value: user.isPremium ? 'Premium' : 'Standard'
|
|
433
|
+
value: user.isPremium ? 'Premium' : 'Standard',
|
|
434
|
+
icon: "star",
|
|
435
|
+
color: user.isPremium ? '#FFD700' : '#8E8E93'
|
|
202
436
|
})]
|
|
203
437
|
}), /*#__PURE__*/_jsx(InfoRow, {
|
|
204
438
|
label: "Total Active Sessions",
|
|
205
|
-
value: sessions?.length?.toString() || '0'
|
|
439
|
+
value: sessions?.length?.toString() || '0',
|
|
440
|
+
icon: "people",
|
|
441
|
+
color: "#32D74B",
|
|
442
|
+
isLast: true
|
|
206
443
|
})]
|
|
207
|
-
}), /*#__PURE__*/_jsxs(
|
|
208
|
-
|
|
209
|
-
children: [/*#__PURE__*/_jsx(
|
|
444
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
445
|
+
style: styles.section,
|
|
446
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
447
|
+
style: styles.sectionTitle,
|
|
448
|
+
children: "API Configuration"
|
|
449
|
+
}), /*#__PURE__*/_jsx(InfoRow, {
|
|
210
450
|
label: "API Base URL",
|
|
211
|
-
value:
|
|
212
|
-
copyable: true
|
|
451
|
+
value: oxyServices?.getBaseURL() || 'Not configured',
|
|
452
|
+
copyable: true,
|
|
453
|
+
icon: "server",
|
|
454
|
+
color: "#007AFF",
|
|
455
|
+
isFirst: true
|
|
213
456
|
}), /*#__PURE__*/_jsx(InfoRow, {
|
|
214
457
|
label: "Connection Status",
|
|
215
|
-
value:
|
|
458
|
+
value: connectionStatus === 'checking' ? 'Checking...' : connectionStatus === 'connected' ? 'Connected' : connectionStatus === 'disconnected' ? 'Disconnected' : 'Unknown',
|
|
459
|
+
icon: connectionStatus === 'checking' ? 'sync' : connectionStatus === 'connected' ? 'wifi' : 'wifi-off',
|
|
460
|
+
color: connectionStatus === 'checking' ? '#FF9500' : connectionStatus === 'connected' ? '#34C759' : '#FF3B30',
|
|
461
|
+
onPress: async () => {
|
|
462
|
+
setConnectionStatus('checking');
|
|
463
|
+
const apiBaseUrl = oxyServices?.getBaseURL() || 'https://api.oxy.so';
|
|
464
|
+
try {
|
|
465
|
+
const response = await fetch(`${apiBaseUrl}/`, {
|
|
466
|
+
method: 'GET',
|
|
467
|
+
timeout: 3000
|
|
468
|
+
});
|
|
469
|
+
if (response.ok) {
|
|
470
|
+
setConnectionStatus('connected');
|
|
471
|
+
toast.success('API connection successful');
|
|
472
|
+
} else {
|
|
473
|
+
setConnectionStatus('disconnected');
|
|
474
|
+
toast.error(`API server error: ${response.status}`);
|
|
475
|
+
}
|
|
476
|
+
} catch (error) {
|
|
477
|
+
setConnectionStatus('disconnected');
|
|
478
|
+
toast.error('Failed to connect to API server');
|
|
479
|
+
}
|
|
480
|
+
},
|
|
481
|
+
showChevron: true,
|
|
482
|
+
isLast: true
|
|
216
483
|
})]
|
|
217
|
-
}), /*#__PURE__*/_jsxs(
|
|
218
|
-
|
|
219
|
-
children: [/*#__PURE__*/_jsx(
|
|
484
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
485
|
+
style: styles.section,
|
|
486
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
487
|
+
style: styles.sectionTitle,
|
|
488
|
+
children: "Build Information"
|
|
489
|
+
}), /*#__PURE__*/_jsx(InfoRow, {
|
|
220
490
|
label: "Build Timestamp",
|
|
221
491
|
value: systemInfo?.timestamp || 'Loading...',
|
|
222
|
-
copyable: true
|
|
492
|
+
copyable: true,
|
|
493
|
+
icon: "time",
|
|
494
|
+
color: "#007AFF",
|
|
495
|
+
isFirst: true
|
|
223
496
|
}), /*#__PURE__*/_jsx(InfoRow, {
|
|
224
497
|
label: "React Native",
|
|
225
|
-
value: "Expo/React Native"
|
|
498
|
+
value: "Expo/React Native",
|
|
499
|
+
icon: "logo-react",
|
|
500
|
+
color: "#61DAFB"
|
|
226
501
|
}), /*#__PURE__*/_jsx(InfoRow, {
|
|
227
502
|
label: "JavaScript Engine",
|
|
228
|
-
value: "Hermes"
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
children: [/*#__PURE__*/_jsx(InfoRow, {
|
|
233
|
-
label: "React Native Version",
|
|
234
|
-
value: "Latest"
|
|
235
|
-
}), /*#__PURE__*/_jsx(InfoRow, {
|
|
236
|
-
label: "Expo SDK",
|
|
237
|
-
value: "Latest"
|
|
238
|
-
}), /*#__PURE__*/_jsx(InfoRow, {
|
|
239
|
-
label: "TypeScript",
|
|
240
|
-
value: "Enabled"
|
|
503
|
+
value: "Hermes",
|
|
504
|
+
icon: "flash",
|
|
505
|
+
color: "#FF3B30",
|
|
506
|
+
isLast: true
|
|
241
507
|
})]
|
|
242
508
|
}), /*#__PURE__*/_jsxs(View, {
|
|
243
|
-
style: styles.
|
|
244
|
-
children: [/*#__PURE__*/_jsx(
|
|
245
|
-
style:
|
|
246
|
-
|
|
247
|
-
|
|
509
|
+
style: styles.section,
|
|
510
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
511
|
+
style: styles.sectionTitle,
|
|
512
|
+
children: "Quick Actions"
|
|
513
|
+
}), /*#__PURE__*/_jsxs(TouchableOpacity, {
|
|
514
|
+
style: [styles.settingItem, styles.firstSettingItem],
|
|
248
515
|
onPress: handleCopyFullReport,
|
|
249
|
-
children: /*#__PURE__*/
|
|
250
|
-
style: styles.
|
|
251
|
-
children:
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
516
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
517
|
+
style: styles.settingInfo,
|
|
518
|
+
children: [/*#__PURE__*/_jsx(OxyIcon, {
|
|
519
|
+
name: "copy",
|
|
520
|
+
size: 20,
|
|
521
|
+
color: "#007AFF",
|
|
522
|
+
style: styles.settingIcon
|
|
523
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
524
|
+
style: styles.settingDetails,
|
|
525
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
526
|
+
style: styles.settingLabel,
|
|
527
|
+
children: "Copy Full Report"
|
|
528
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
529
|
+
style: styles.settingDescription,
|
|
530
|
+
children: "Copy complete application information to clipboard"
|
|
531
|
+
})]
|
|
532
|
+
})]
|
|
533
|
+
}), /*#__PURE__*/_jsx(OxyIcon, {
|
|
534
|
+
name: "chevron-forward",
|
|
535
|
+
size: 16,
|
|
536
|
+
color: "#ccc"
|
|
537
|
+
})]
|
|
538
|
+
}), /*#__PURE__*/_jsxs(TouchableOpacity, {
|
|
539
|
+
style: [styles.settingItem, styles.lastSettingItem, isRunningSystemCheck && styles.disabledSettingItem],
|
|
540
|
+
onPress: runSystemCheck,
|
|
541
|
+
disabled: isRunningSystemCheck,
|
|
542
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
543
|
+
style: styles.settingInfo,
|
|
544
|
+
children: [/*#__PURE__*/_jsx(OxyIcon, {
|
|
545
|
+
name: isRunningSystemCheck ? "sync" : "checkmark-circle",
|
|
546
|
+
size: 20,
|
|
547
|
+
color: isRunningSystemCheck ? "#FF9500" : "#34C759",
|
|
548
|
+
style: [styles.settingIcon, isRunningSystemCheck && styles.spinningIcon]
|
|
549
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
550
|
+
style: styles.settingDetails,
|
|
551
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
552
|
+
style: styles.settingLabel,
|
|
553
|
+
children: isRunningSystemCheck ? 'Running System Check...' : 'Run System Check'
|
|
554
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
555
|
+
style: styles.settingDescription,
|
|
556
|
+
children: isRunningSystemCheck ? 'Checking API, authentication, and platform status...' : 'Verify application health and status'
|
|
557
|
+
})]
|
|
558
|
+
})]
|
|
559
|
+
}), !isRunningSystemCheck && /*#__PURE__*/_jsx(OxyIcon, {
|
|
560
|
+
name: "chevron-forward",
|
|
561
|
+
size: 16,
|
|
562
|
+
color: "#ccc"
|
|
563
|
+
})]
|
|
264
564
|
})]
|
|
265
565
|
})]
|
|
266
566
|
})]
|
|
@@ -272,74 +572,86 @@ const styles = StyleSheet.create({
|
|
|
272
572
|
},
|
|
273
573
|
header: {
|
|
274
574
|
flexDirection: 'row',
|
|
275
|
-
justifyContent: 'space-between',
|
|
276
575
|
alignItems: 'center',
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
fontSize: 20,
|
|
282
|
-
fontFamily: fontFamilies.phuduBold
|
|
576
|
+
justifyContent: 'space-between',
|
|
577
|
+
paddingHorizontal: 16,
|
|
578
|
+
paddingVertical: 12,
|
|
579
|
+
backgroundColor: '#fff'
|
|
283
580
|
},
|
|
284
|
-
|
|
285
|
-
padding:
|
|
581
|
+
cancelButton: {
|
|
582
|
+
padding: 5
|
|
286
583
|
},
|
|
287
|
-
|
|
584
|
+
headerTitle: {
|
|
288
585
|
fontSize: 24,
|
|
586
|
+
fontWeight: 'bold',
|
|
587
|
+
color: '#000',
|
|
289
588
|
fontFamily: fontFamilies.phuduBold
|
|
290
589
|
},
|
|
590
|
+
placeholder: {
|
|
591
|
+
width: 34 // Same width as cancel button to center title
|
|
592
|
+
},
|
|
291
593
|
content: {
|
|
292
594
|
flex: 1,
|
|
293
595
|
padding: 16
|
|
294
596
|
},
|
|
295
597
|
section: {
|
|
296
|
-
marginBottom:
|
|
297
|
-
borderRadius: 12,
|
|
298
|
-
padding: 16,
|
|
299
|
-
borderWidth: 1
|
|
598
|
+
marginBottom: 24
|
|
300
599
|
},
|
|
301
600
|
sectionTitle: {
|
|
302
|
-
fontSize:
|
|
303
|
-
|
|
304
|
-
|
|
601
|
+
fontSize: 16,
|
|
602
|
+
fontWeight: '600',
|
|
603
|
+
color: '#333',
|
|
604
|
+
marginBottom: 12,
|
|
605
|
+
fontFamily: fontFamilies.phuduSemiBold
|
|
305
606
|
},
|
|
306
|
-
|
|
607
|
+
settingItem: {
|
|
608
|
+
backgroundColor: '#fff',
|
|
609
|
+
padding: 16,
|
|
307
610
|
flexDirection: 'row',
|
|
611
|
+
alignItems: 'center',
|
|
308
612
|
justifyContent: 'space-between',
|
|
309
|
-
|
|
310
|
-
marginBottom: 8,
|
|
311
|
-
minHeight: 24
|
|
613
|
+
marginBottom: 2
|
|
312
614
|
},
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
615
|
+
firstSettingItem: {
|
|
616
|
+
borderTopLeftRadius: 24,
|
|
617
|
+
borderTopRightRadius: 24
|
|
618
|
+
},
|
|
619
|
+
lastSettingItem: {
|
|
620
|
+
borderBottomLeftRadius: 24,
|
|
621
|
+
borderBottomRightRadius: 24,
|
|
622
|
+
marginBottom: 8
|
|
623
|
+
},
|
|
624
|
+
settingInfo: {
|
|
625
|
+
flexDirection: 'row',
|
|
626
|
+
alignItems: 'center',
|
|
627
|
+
flex: 1
|
|
628
|
+
},
|
|
629
|
+
settingIcon: {
|
|
317
630
|
marginRight: 12
|
|
318
631
|
},
|
|
319
|
-
|
|
320
|
-
flex:
|
|
632
|
+
settingDetails: {
|
|
633
|
+
flex: 1
|
|
634
|
+
},
|
|
635
|
+
settingLabel: {
|
|
636
|
+
fontSize: 16,
|
|
637
|
+
fontWeight: '500',
|
|
638
|
+
color: '#333',
|
|
639
|
+
marginBottom: 2
|
|
321
640
|
},
|
|
322
|
-
|
|
641
|
+
settingValue: {
|
|
323
642
|
fontSize: 14,
|
|
324
|
-
|
|
325
|
-
textAlign: 'right',
|
|
326
|
-
flexWrap: 'wrap'
|
|
643
|
+
color: '#666'
|
|
327
644
|
},
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
645
|
+
settingDescription: {
|
|
646
|
+
fontSize: 14,
|
|
647
|
+
color: '#999'
|
|
331
648
|
},
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
paddingHorizontal: 24,
|
|
335
|
-
borderRadius: 8,
|
|
336
|
-
marginBottom: 12,
|
|
337
|
-
alignItems: 'center'
|
|
649
|
+
disabledSettingItem: {
|
|
650
|
+
opacity: 0.6
|
|
338
651
|
},
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
fontFamily: fontFamilies.phuduMedium
|
|
652
|
+
spinningIcon: {
|
|
653
|
+
// Note: Animation would need to be implemented with Animated API
|
|
654
|
+
// For now, just showing the sync icon to indicate loading
|
|
343
655
|
}
|
|
344
656
|
});
|
|
345
657
|
export default AppInfoScreen;
|