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