@oxyhq/services 5.4.3 → 5.4.5
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 +14 -0
- package/lib/commonjs/assets/assets/illustrations/HighFive.tsx +41 -0
- package/lib/commonjs/assets/icons/OxyServices.js +1 -1
- package/lib/commonjs/assets/illustrations/HighFive.js +61 -0
- package/lib/commonjs/assets/illustrations/HighFive.js.map +1 -0
- package/lib/commonjs/core/index.js +24 -5
- package/lib/commonjs/core/index.js.map +1 -1
- package/lib/commonjs/index.js +72 -23
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/node/createAuth.js +95 -0
- package/lib/commonjs/node/createAuth.js.map +1 -0
- package/lib/commonjs/node/index.js +15 -6
- package/lib/commonjs/node/index.js.map +1 -1
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/ui/components/Avatar.js +3 -3
- package/lib/commonjs/ui/components/Avatar.js.map +1 -1
- package/lib/commonjs/ui/components/FollowButton.js +82 -34
- package/lib/commonjs/ui/components/FollowButton.js.map +1 -1
- package/lib/commonjs/ui/components/GroupedSection.js +1 -1
- package/lib/commonjs/ui/components/OxyLogo.js +1 -1
- package/lib/commonjs/ui/components/OxyProvider.js +146 -141
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/components/OxySignInButton.js +4 -4
- package/lib/commonjs/ui/components/OxySignInButton.js.map +1 -1
- package/lib/commonjs/ui/components/ProfileCard.js +2 -2
- package/lib/commonjs/ui/components/Section.js +1 -1
- package/lib/commonjs/ui/components/SectionTitle.js +1 -1
- package/lib/commonjs/ui/components/icon/index.js +1 -1
- package/lib/commonjs/ui/components/index.js +12 -12
- package/lib/commonjs/ui/components/internal/GroupedPillButtons.js +213 -0
- package/lib/commonjs/ui/components/internal/GroupedPillButtons.js.map +1 -0
- package/lib/commonjs/ui/components/internal/TextField.js +576 -0
- package/lib/commonjs/ui/components/internal/TextField.js.map +1 -0
- package/lib/commonjs/ui/context/OxyContext.js +12 -2
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/hooks/index.js +13 -0
- package/lib/commonjs/ui/hooks/index.js.map +1 -0
- package/lib/commonjs/ui/hooks/useFollow.js +184 -0
- package/lib/commonjs/ui/hooks/useFollow.js.map +1 -0
- package/lib/commonjs/ui/index.js +44 -12
- package/lib/commonjs/ui/index.js.map +1 -1
- package/lib/commonjs/ui/navigation/OxyRouter.js +23 -18
- package/lib/commonjs/ui/navigation/OxyRouter.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountCenterScreen.js +21 -20
- 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 +11 -10
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js +8 -7
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +6 -5
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AppInfoScreen.js +12 -14
- package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/BillingManagementScreen.js +3 -3
- package/lib/commonjs/ui/screens/FeedbackScreen.js +1169 -0
- package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/FileManagementScreen.js +3 -3
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +3 -3
- package/lib/commonjs/ui/screens/ProfileScreen.js +2 -2
- package/lib/commonjs/ui/screens/SessionManagementScreen.js +2 -2
- package/lib/commonjs/ui/screens/SignInScreen.js +183 -305
- package/lib/commonjs/ui/screens/SignInScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SignUpScreen.js +811 -712
- package/lib/commonjs/ui/screens/SignUpScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js +8 -7
- package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js +2 -2
- package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js +1 -1
- package/lib/commonjs/ui/store/index.js +267 -0
- package/lib/commonjs/ui/store/index.js.map +1 -0
- package/lib/commonjs/ui/styles/index.js +2 -2
- package/lib/commonjs/ui/styles/theme.js +1 -1
- package/lib/commonjs/utils/index.js +1 -1
- package/lib/module/assets/assets/illustrations/HighFive.tsx +41 -0
- package/lib/module/assets/icons/OxyServices.js +1 -1
- package/lib/module/assets/icons/OxyServices.js.map +1 -1
- package/lib/module/assets/illustrations/HighFive.js +55 -0
- package/lib/module/assets/illustrations/HighFive.js.map +1 -0
- package/lib/module/core/index.js +24 -5
- package/lib/module/core/index.js.map +1 -1
- package/lib/module/index.js +15 -11
- package/lib/module/index.js.map +1 -1
- package/lib/module/node/createAuth.js +90 -0
- package/lib/module/node/createAuth.js.map +1 -0
- package/lib/module/node/index.js +8 -4
- package/lib/module/node/index.js.map +1 -1
- package/lib/module/package.json +1 -0
- package/lib/module/ui/components/Avatar.js +2 -2
- package/lib/module/ui/components/Avatar.js.map +1 -1
- package/lib/module/ui/components/FollowButton.js +83 -35
- package/lib/module/ui/components/FollowButton.js.map +1 -1
- package/lib/module/ui/components/GroupedSection.js +1 -1
- package/lib/module/ui/components/GroupedSection.js.map +1 -1
- package/lib/module/ui/components/OxyLogo.js +1 -1
- package/lib/module/ui/components/OxyLogo.js.map +1 -1
- package/lib/module/ui/components/OxyProvider.js +143 -138
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/components/OxySignInButton.js +4 -4
- package/lib/module/ui/components/OxySignInButton.js.map +1 -1
- package/lib/module/ui/components/ProfileCard.js +2 -2
- package/lib/module/ui/components/ProfileCard.js.map +1 -1
- package/lib/module/ui/components/Section.js +1 -1
- package/lib/module/ui/components/Section.js.map +1 -1
- package/lib/module/ui/components/SectionTitle.js +1 -1
- package/lib/module/ui/components/SectionTitle.js.map +1 -1
- package/lib/module/ui/components/icon/index.js +1 -1
- package/lib/module/ui/components/icon/index.js.map +1 -1
- package/lib/module/ui/components/index.js +12 -12
- package/lib/module/ui/components/index.js.map +1 -1
- package/lib/module/ui/components/internal/GroupedPillButtons.js +208 -0
- package/lib/module/ui/components/internal/GroupedPillButtons.js.map +1 -0
- package/lib/module/ui/components/internal/TextField.js +571 -0
- package/lib/module/ui/components/internal/TextField.js.map +1 -0
- package/lib/module/ui/context/OxyContext.js +12 -2
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/hooks/index.js +4 -0
- package/lib/module/ui/hooks/index.js.map +1 -0
- package/lib/module/ui/hooks/useFollow.js +180 -0
- package/lib/module/ui/hooks/useFollow.js.map +1 -0
- package/lib/module/ui/index.js +21 -10
- package/lib/module/ui/index.js.map +1 -1
- package/lib/module/ui/navigation/OxyRouter.js +23 -18
- package/lib/module/ui/navigation/OxyRouter.js.map +1 -1
- package/lib/module/ui/screens/AccountCenterScreen.js +9 -8
- package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountManagementDemo.js +2 -2
- package/lib/module/ui/screens/AccountManagementDemo.js.map +1 -1
- package/lib/module/ui/screens/AccountOverviewScreen.js +11 -10
- package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSettingsScreen.js +8 -7
- package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSwitcherScreen.js +6 -5
- package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/module/ui/screens/AppInfoScreen.js +12 -14
- package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/module/ui/screens/BillingManagementScreen.js +3 -3
- package/lib/module/ui/screens/BillingManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/FeedbackScreen.js +1164 -0
- package/lib/module/ui/screens/FeedbackScreen.js.map +1 -0
- package/lib/module/ui/screens/FileManagementScreen.js +3 -3
- package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js +3 -3
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/module/ui/screens/ProfileScreen.js +2 -2
- package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/SessionManagementScreen.js +2 -2
- package/lib/module/ui/screens/SessionManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/SignInScreen.js +183 -305
- package/lib/module/ui/screens/SignInScreen.js.map +1 -1
- package/lib/module/ui/screens/SignUpScreen.js +810 -712
- package/lib/module/ui/screens/SignUpScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaCenterScreen.js +8 -7
- package/lib/module/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js +2 -2
- package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaRulesScreen.js +1 -1
- package/lib/module/ui/screens/karma/KarmaRulesScreen.js.map +1 -1
- package/lib/module/ui/store/index.js +255 -0
- package/lib/module/ui/store/index.js.map +1 -0
- package/lib/module/ui/styles/index.js +2 -2
- package/lib/module/ui/styles/index.js.map +1 -1
- package/lib/module/ui/styles/theme.js +1 -1
- package/lib/module/ui/styles/theme.js.map +1 -1
- package/lib/module/utils/index.js +1 -1
- package/lib/module/utils/index.js.map +1 -1
- package/lib/typescript/assets/illustrations/HighFive.d.ts +9 -0
- package/lib/typescript/assets/illustrations/HighFive.d.ts.map +1 -0
- package/lib/typescript/core/index.d.ts +16 -3
- package/lib/typescript/core/index.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +4 -2
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/node/createAuth.d.ts +7 -0
- package/lib/typescript/node/createAuth.d.ts.map +1 -0
- package/lib/typescript/node/index.d.ts +2 -0
- package/lib/typescript/node/index.d.ts.map +1 -1
- package/lib/typescript/types/expo-vector-icons.d.ts +3 -0
- package/lib/typescript/types/express.d.ts +5 -0
- package/lib/typescript/types/react-redux.d.ts +5 -0
- 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/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/ui/components/internal/GroupedPillButtons.d.ts +18 -0
- package/lib/typescript/ui/components/internal/GroupedPillButtons.d.ts.map +1 -0
- package/lib/typescript/ui/components/internal/TextField.d.ts +25 -0
- package/lib/typescript/ui/components/internal/TextField.d.ts.map +1 -0
- package/lib/typescript/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/index.d.ts +2 -0
- package/lib/typescript/ui/hooks/index.d.ts.map +1 -0
- package/lib/typescript/ui/hooks/useFollow.d.ts +43 -0
- package/lib/typescript/ui/hooks/useFollow.d.ts.map +1 -0
- package/lib/typescript/ui/index.d.ts +5 -0
- package/lib/typescript/ui/index.d.ts.map +1 -1
- package/lib/typescript/ui/navigation/OxyRouter.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountCenterScreen.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/FeedbackScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/FeedbackScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/SignInScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/SignUpScreen.d.ts.map +1 -1
- package/lib/typescript/ui/store/index.d.ts +66 -0
- package/lib/typescript/ui/store/index.d.ts.map +1 -0
- package/package.json +10 -25
- package/src/assets/illustrations/HighFive.tsx +41 -0
- package/src/core/index.ts +88 -3
- package/src/index.ts +19 -3
- package/src/node/createAuth.ts +116 -0
- package/src/node/index.ts +4 -0
- package/src/types/expo-vector-icons.d.ts +3 -0
- package/src/types/express.d.ts +5 -0
- package/src/types/react-redux.d.ts +5 -0
- package/src/ui/components/FollowButton.tsx +114 -56
- package/src/ui/components/OxyProvider.tsx +136 -135
- package/src/ui/components/OxySignInButton.tsx +2 -2
- package/src/ui/components/internal/GroupedPillButtons.tsx +253 -0
- package/src/ui/components/internal/TextField.tsx +694 -0
- package/src/ui/context/OxyContext.tsx +12 -2
- package/src/ui/hooks/index.ts +1 -0
- package/src/ui/hooks/useFollow.ts +173 -0
- package/src/ui/index.ts +15 -2
- package/src/ui/navigation/OxyRouter.tsx +8 -3
- package/src/ui/screens/AccountCenterScreen.tsx +17 -15
- package/src/ui/screens/AccountOverviewScreen.tsx +25 -25
- package/src/ui/screens/AccountSettingsScreen.tsx +30 -30
- package/src/ui/screens/AccountSwitcherScreen.tsx +34 -33
- package/src/ui/screens/AppInfoScreen.tsx +153 -155
- package/src/ui/screens/FeedbackScreen.tsx +1042 -0
- package/src/ui/screens/SignInScreen.tsx +181 -224
- package/src/ui/screens/SignUpScreen.tsx +772 -608
- package/src/ui/screens/karma/KarmaCenterScreen.tsx +4 -4
- package/src/ui/store/index.ts +245 -0
|
@@ -36,7 +36,7 @@ const AppInfoScreen: React.FC<BaseScreenProps> = ({
|
|
|
36
36
|
theme,
|
|
37
37
|
navigate,
|
|
38
38
|
}) => {
|
|
39
|
-
const { user, sessions, oxyServices } = useOxy();
|
|
39
|
+
const { user, sessions, oxyServices, isAuthenticated } = useOxy();
|
|
40
40
|
const [systemInfo, setSystemInfo] = useState<SystemInfo | null>(null);
|
|
41
41
|
const [isRunningSystemCheck, setIsRunningSystemCheck] = useState(false);
|
|
42
42
|
const [connectionStatus, setConnectionStatus] = useState<'checking' | 'connected' | 'disconnected' | 'unknown'>('unknown');
|
|
@@ -75,7 +75,7 @@ const AppInfoScreen: React.FC<BaseScreenProps> = ({
|
|
|
75
75
|
method: 'GET',
|
|
76
76
|
timeout: 3000,
|
|
77
77
|
} as any);
|
|
78
|
-
|
|
78
|
+
|
|
79
79
|
if (response.ok) {
|
|
80
80
|
setConnectionStatus('connected');
|
|
81
81
|
} else {
|
|
@@ -111,21 +111,21 @@ const AppInfoScreen: React.FC<BaseScreenProps> = ({
|
|
|
111
111
|
|
|
112
112
|
setIsRunningSystemCheck(true);
|
|
113
113
|
const checks = [];
|
|
114
|
-
|
|
114
|
+
|
|
115
115
|
// Get the API base URL from the services instance
|
|
116
116
|
const apiBaseUrl = oxyServices?.getBaseURL() || 'https://api.oxy.so'; // Default for now, could be made configurable
|
|
117
|
-
|
|
117
|
+
|
|
118
118
|
try {
|
|
119
119
|
// Check 1: API Server Health
|
|
120
120
|
checks.push('🔍 Checking API server connection...');
|
|
121
121
|
toast.info('Running system checks...', { duration: 2000 });
|
|
122
|
-
|
|
122
|
+
|
|
123
123
|
try {
|
|
124
124
|
const response = await fetch(`${apiBaseUrl}/`, {
|
|
125
125
|
method: 'GET',
|
|
126
126
|
timeout: 5000,
|
|
127
127
|
} as any);
|
|
128
|
-
|
|
128
|
+
|
|
129
129
|
if (response.ok) {
|
|
130
130
|
const data = await response.json();
|
|
131
131
|
checks.push('✅ API server is responding');
|
|
@@ -146,9 +146,9 @@ const AppInfoScreen: React.FC<BaseScreenProps> = ({
|
|
|
146
146
|
|
|
147
147
|
// Check 2: Authentication Status
|
|
148
148
|
checks.push('🔍 Checking authentication...');
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
149
|
+
checks.push(`🔐 Authentication Status: ${isAuthenticated ? '✅ Authenticated' : '❌ Not authenticated'}`);
|
|
150
|
+
|
|
151
|
+
if (isAuthenticated) {
|
|
152
152
|
// Check 3: Token Validation
|
|
153
153
|
try {
|
|
154
154
|
const isValid = await oxyServices.validate();
|
|
@@ -161,8 +161,6 @@ const AppInfoScreen: React.FC<BaseScreenProps> = ({
|
|
|
161
161
|
checks.push('❌ Token validation failed');
|
|
162
162
|
checks.push(` Error: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
163
163
|
}
|
|
164
|
-
} else {
|
|
165
|
-
checks.push('⚠️ User is not authenticated');
|
|
166
164
|
}
|
|
167
165
|
|
|
168
166
|
// Check 4: Session Validation (if user has active sessions)
|
|
@@ -187,7 +185,7 @@ const AppInfoScreen: React.FC<BaseScreenProps> = ({
|
|
|
187
185
|
// Check 6: Package Information
|
|
188
186
|
checks.push('🔍 Checking package information...');
|
|
189
187
|
checks.push(`✅ Package: ${packageInfo.name}@${packageInfo.version}`);
|
|
190
|
-
|
|
188
|
+
|
|
191
189
|
// Check 7: Memory and Performance (basic)
|
|
192
190
|
checks.push('🔍 Checking performance metrics...');
|
|
193
191
|
const memoryUsage = (performance as any).memory;
|
|
@@ -202,7 +200,7 @@ const AppInfoScreen: React.FC<BaseScreenProps> = ({
|
|
|
202
200
|
// Final summary
|
|
203
201
|
const errorCount = checks.filter(check => check.includes('❌')).length;
|
|
204
202
|
const warningCount = checks.filter(check => check.includes('⚠️')).length;
|
|
205
|
-
|
|
203
|
+
|
|
206
204
|
checks.push('');
|
|
207
205
|
checks.push('📋 SYSTEM CHECK SUMMARY:');
|
|
208
206
|
if (errorCount === 0 && warningCount === 0) {
|
|
@@ -266,9 +264,9 @@ const AppInfoScreen: React.FC<BaseScreenProps> = ({
|
|
|
266
264
|
copyToClipboard(report, 'Full application report');
|
|
267
265
|
};
|
|
268
266
|
|
|
269
|
-
const InfoRow: React.FC<{
|
|
270
|
-
label: string;
|
|
271
|
-
value: string;
|
|
267
|
+
const InfoRow: React.FC<{
|
|
268
|
+
label: string;
|
|
269
|
+
value: string;
|
|
272
270
|
copyable?: boolean;
|
|
273
271
|
icon?: string;
|
|
274
272
|
iconComponent?: React.ReactNode;
|
|
@@ -277,9 +275,9 @@ const AppInfoScreen: React.FC<BaseScreenProps> = ({
|
|
|
277
275
|
isLast?: boolean;
|
|
278
276
|
onPress?: () => void;
|
|
279
277
|
showChevron?: boolean;
|
|
280
|
-
}> = ({
|
|
281
|
-
label,
|
|
282
|
-
value,
|
|
278
|
+
}> = ({
|
|
279
|
+
label,
|
|
280
|
+
value,
|
|
283
281
|
copyable = false,
|
|
284
282
|
icon = 'information-circle',
|
|
285
283
|
iconComponent,
|
|
@@ -289,47 +287,47 @@ const AppInfoScreen: React.FC<BaseScreenProps> = ({
|
|
|
289
287
|
onPress,
|
|
290
288
|
showChevron = false,
|
|
291
289
|
}) => {
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
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
|
-
|
|
290
|
+
const handlePress = () => {
|
|
291
|
+
if (onPress) {
|
|
292
|
+
onPress();
|
|
293
|
+
} else if (copyable) {
|
|
294
|
+
copyToClipboard(value, label);
|
|
295
|
+
}
|
|
296
|
+
};
|
|
297
|
+
|
|
298
|
+
const isInteractive = copyable || !!onPress;
|
|
299
|
+
|
|
300
|
+
return (
|
|
301
|
+
<TouchableOpacity
|
|
302
|
+
style={[
|
|
303
|
+
styles.settingItem,
|
|
304
|
+
isFirst && styles.firstSettingItem,
|
|
305
|
+
isLast && styles.lastSettingItem,
|
|
306
|
+
]}
|
|
307
|
+
onPress={isInteractive ? handlePress : undefined}
|
|
308
|
+
disabled={!isInteractive}
|
|
309
|
+
>
|
|
310
|
+
<View style={styles.settingInfo}>
|
|
311
|
+
{iconComponent ? (
|
|
312
|
+
React.cloneElement(iconComponent as React.ReactElement, { style: styles.settingIcon })
|
|
313
|
+
) : (
|
|
314
|
+
<OxyIcon name={icon} size={20} color={color} style={styles.settingIcon} />
|
|
315
|
+
)}
|
|
316
|
+
<View style={styles.settingDetails}>
|
|
317
|
+
<Text style={styles.settingLabel}>{label}</Text>
|
|
318
|
+
<Text style={[
|
|
319
|
+
styles.settingValue,
|
|
320
|
+
(copyable || onPress) && { color: primaryColor }
|
|
321
|
+
]}>
|
|
322
|
+
{value}
|
|
323
|
+
</Text>
|
|
324
|
+
</View>
|
|
326
325
|
</View>
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
};
|
|
326
|
+
{copyable && <OxyIcon name="copy" size={16} color="#ccc" />}
|
|
327
|
+
{showChevron && <OxyIcon name="chevron-forward" size={16} color="#ccc" />}
|
|
328
|
+
</TouchableOpacity>
|
|
329
|
+
);
|
|
330
|
+
};
|
|
333
331
|
|
|
334
332
|
return (
|
|
335
333
|
<View style={[styles.container, { backgroundColor }]}>
|
|
@@ -346,43 +344,43 @@ const AppInfoScreen: React.FC<BaseScreenProps> = ({
|
|
|
346
344
|
{/* Package Information */}
|
|
347
345
|
<View style={styles.section}>
|
|
348
346
|
<Text style={styles.sectionTitle}>Package Information</Text>
|
|
349
|
-
|
|
350
|
-
<InfoRow
|
|
351
|
-
label="Name"
|
|
352
|
-
value={packageInfo.name}
|
|
353
|
-
copyable
|
|
347
|
+
|
|
348
|
+
<InfoRow
|
|
349
|
+
label="Name"
|
|
350
|
+
value={packageInfo.name}
|
|
351
|
+
copyable
|
|
354
352
|
iconComponent={<OxyServicesLogo width={20} height={20} />}
|
|
355
353
|
color="#007AFF"
|
|
356
354
|
isFirst
|
|
357
355
|
/>
|
|
358
|
-
<InfoRow
|
|
359
|
-
label="Version"
|
|
360
|
-
value={packageInfo.version}
|
|
361
|
-
copyable
|
|
356
|
+
<InfoRow
|
|
357
|
+
label="Version"
|
|
358
|
+
value={packageInfo.version}
|
|
359
|
+
copyable
|
|
362
360
|
icon="pricetag"
|
|
363
361
|
color="#5856D6"
|
|
364
362
|
/>
|
|
365
|
-
<InfoRow
|
|
366
|
-
label="Description"
|
|
367
|
-
value={packageInfo.description || 'No description'}
|
|
363
|
+
<InfoRow
|
|
364
|
+
label="Description"
|
|
365
|
+
value={packageInfo.description || 'No description'}
|
|
368
366
|
icon="document-text"
|
|
369
367
|
color="#34C759"
|
|
370
368
|
/>
|
|
371
|
-
<InfoRow
|
|
372
|
-
label="Main Entry"
|
|
373
|
-
value={packageInfo.main || 'N/A'}
|
|
369
|
+
<InfoRow
|
|
370
|
+
label="Main Entry"
|
|
371
|
+
value={packageInfo.main || 'N/A'}
|
|
374
372
|
icon="code"
|
|
375
373
|
color="#FF9500"
|
|
376
374
|
/>
|
|
377
|
-
<InfoRow
|
|
378
|
-
label="Module Entry"
|
|
379
|
-
value={packageInfo.module || 'N/A'}
|
|
375
|
+
<InfoRow
|
|
376
|
+
label="Module Entry"
|
|
377
|
+
value={packageInfo.module || 'N/A'}
|
|
380
378
|
icon="library"
|
|
381
379
|
color="#FF3B30"
|
|
382
380
|
/>
|
|
383
|
-
<InfoRow
|
|
384
|
-
label="Types Entry"
|
|
385
|
-
value={packageInfo.types || 'N/A'}
|
|
381
|
+
<InfoRow
|
|
382
|
+
label="Types Entry"
|
|
383
|
+
value={packageInfo.types || 'N/A'}
|
|
386
384
|
icon="construct"
|
|
387
385
|
color="#32D74B"
|
|
388
386
|
isLast
|
|
@@ -392,35 +390,35 @@ const AppInfoScreen: React.FC<BaseScreenProps> = ({
|
|
|
392
390
|
{/* System Information */}
|
|
393
391
|
<View style={styles.section}>
|
|
394
392
|
<Text style={styles.sectionTitle}>System Information</Text>
|
|
395
|
-
|
|
396
|
-
<InfoRow
|
|
397
|
-
label="Platform"
|
|
398
|
-
value={Platform.OS}
|
|
393
|
+
|
|
394
|
+
<InfoRow
|
|
395
|
+
label="Platform"
|
|
396
|
+
value={Platform.OS}
|
|
399
397
|
icon="phone-portrait"
|
|
400
398
|
color="#007AFF"
|
|
401
399
|
isFirst
|
|
402
400
|
/>
|
|
403
|
-
<InfoRow
|
|
404
|
-
label="Platform Version"
|
|
405
|
-
value={systemInfo?.version || 'Loading...'}
|
|
401
|
+
<InfoRow
|
|
402
|
+
label="Platform Version"
|
|
403
|
+
value={systemInfo?.version || 'Loading...'}
|
|
406
404
|
icon="hardware-chip"
|
|
407
405
|
color="#5856D6"
|
|
408
406
|
/>
|
|
409
|
-
<InfoRow
|
|
410
|
-
label="Screen Width"
|
|
411
|
-
value={`${systemInfo?.screenDimensions.width || 0}px`}
|
|
407
|
+
<InfoRow
|
|
408
|
+
label="Screen Width"
|
|
409
|
+
value={`${systemInfo?.screenDimensions.width || 0}px`}
|
|
412
410
|
icon="resize"
|
|
413
411
|
color="#FF9500"
|
|
414
412
|
/>
|
|
415
|
-
<InfoRow
|
|
416
|
-
label="Screen Height"
|
|
417
|
-
value={`${systemInfo?.screenDimensions.height || 0}px`}
|
|
413
|
+
<InfoRow
|
|
414
|
+
label="Screen Height"
|
|
415
|
+
value={`${systemInfo?.screenDimensions.height || 0}px`}
|
|
418
416
|
icon="resize"
|
|
419
417
|
color="#FF3B30"
|
|
420
418
|
/>
|
|
421
|
-
<InfoRow
|
|
422
|
-
label="Environment"
|
|
423
|
-
value={__DEV__ ? 'Development' : 'Production'}
|
|
419
|
+
<InfoRow
|
|
420
|
+
label="Environment"
|
|
421
|
+
value={__DEV__ ? 'Development' : 'Production'}
|
|
424
422
|
icon="settings"
|
|
425
423
|
color="#34C759"
|
|
426
424
|
isLast
|
|
@@ -430,26 +428,26 @@ const AppInfoScreen: React.FC<BaseScreenProps> = ({
|
|
|
430
428
|
{/* User Information */}
|
|
431
429
|
<View style={styles.section}>
|
|
432
430
|
<Text style={styles.sectionTitle}>User Information</Text>
|
|
433
|
-
|
|
434
|
-
<InfoRow
|
|
435
|
-
label="Authentication Status"
|
|
436
|
-
value={
|
|
431
|
+
|
|
432
|
+
<InfoRow
|
|
433
|
+
label="Authentication Status"
|
|
434
|
+
value={isAuthenticated ? 'Authenticated' : 'Not Authenticated'}
|
|
437
435
|
icon="shield-checkmark"
|
|
438
|
-
color={
|
|
436
|
+
color={isAuthenticated ? '#34C759' : '#FF3B30'}
|
|
439
437
|
isFirst
|
|
440
438
|
/>
|
|
441
439
|
{user && (
|
|
442
440
|
<>
|
|
443
|
-
<InfoRow
|
|
444
|
-
label="User ID"
|
|
445
|
-
value={user.id}
|
|
446
|
-
copyable
|
|
441
|
+
<InfoRow
|
|
442
|
+
label="User ID"
|
|
443
|
+
value={user.id}
|
|
444
|
+
copyable
|
|
447
445
|
icon="person"
|
|
448
446
|
color="#007AFF"
|
|
449
447
|
/>
|
|
450
|
-
<InfoRow
|
|
451
|
-
label="Username"
|
|
452
|
-
value={user.username || 'N/A'}
|
|
448
|
+
<InfoRow
|
|
449
|
+
label="Username"
|
|
450
|
+
value={user.username || 'N/A'}
|
|
453
451
|
icon="at"
|
|
454
452
|
color="#5856D6"
|
|
455
453
|
onPress={() => {
|
|
@@ -461,23 +459,23 @@ const AppInfoScreen: React.FC<BaseScreenProps> = ({
|
|
|
461
459
|
}}
|
|
462
460
|
showChevron={true}
|
|
463
461
|
/>
|
|
464
|
-
<InfoRow
|
|
465
|
-
label="Email"
|
|
466
|
-
value={user.email || 'N/A'}
|
|
462
|
+
<InfoRow
|
|
463
|
+
label="Email"
|
|
464
|
+
value={user.email || 'N/A'}
|
|
467
465
|
icon="mail"
|
|
468
466
|
color="#FF9500"
|
|
469
467
|
/>
|
|
470
|
-
<InfoRow
|
|
471
|
-
label="Premium Status"
|
|
472
|
-
value={user.isPremium ? 'Premium' : 'Standard'}
|
|
468
|
+
<InfoRow
|
|
469
|
+
label="Premium Status"
|
|
470
|
+
value={user.isPremium ? 'Premium' : 'Standard'}
|
|
473
471
|
icon="star"
|
|
474
472
|
color={user.isPremium ? '#FFD700' : '#8E8E93'}
|
|
475
473
|
/>
|
|
476
474
|
</>
|
|
477
475
|
)}
|
|
478
|
-
<InfoRow
|
|
479
|
-
label="Total Active Sessions"
|
|
480
|
-
value={sessions?.length?.toString() || '0'}
|
|
476
|
+
<InfoRow
|
|
477
|
+
label="Total Active Sessions"
|
|
478
|
+
value={sessions?.length?.toString() || '0'}
|
|
481
479
|
icon="people"
|
|
482
480
|
color="#32D74B"
|
|
483
481
|
isLast
|
|
@@ -487,32 +485,32 @@ const AppInfoScreen: React.FC<BaseScreenProps> = ({
|
|
|
487
485
|
{/* API Configuration */}
|
|
488
486
|
<View style={styles.section}>
|
|
489
487
|
<Text style={styles.sectionTitle}>API Configuration</Text>
|
|
490
|
-
|
|
491
|
-
<InfoRow
|
|
492
|
-
label="API Base URL"
|
|
493
|
-
value={oxyServices?.getBaseURL() || 'Not configured'}
|
|
494
|
-
copyable
|
|
488
|
+
|
|
489
|
+
<InfoRow
|
|
490
|
+
label="API Base URL"
|
|
491
|
+
value={oxyServices?.getBaseURL() || 'Not configured'}
|
|
492
|
+
copyable
|
|
495
493
|
icon="server"
|
|
496
494
|
color="#007AFF"
|
|
497
495
|
isFirst
|
|
498
496
|
/>
|
|
499
|
-
<InfoRow
|
|
500
|
-
label="Connection Status"
|
|
497
|
+
<InfoRow
|
|
498
|
+
label="Connection Status"
|
|
501
499
|
value={
|
|
502
500
|
connectionStatus === 'checking' ? 'Checking...' :
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
501
|
+
connectionStatus === 'connected' ? 'Connected' :
|
|
502
|
+
connectionStatus === 'disconnected' ? 'Disconnected' :
|
|
503
|
+
'Unknown'
|
|
506
504
|
}
|
|
507
505
|
icon={
|
|
508
506
|
connectionStatus === 'checking' ? 'sync' :
|
|
509
|
-
|
|
510
|
-
|
|
507
|
+
connectionStatus === 'connected' ? 'wifi' :
|
|
508
|
+
'wifi-off'
|
|
511
509
|
}
|
|
512
510
|
color={
|
|
513
511
|
connectionStatus === 'checking' ? '#FF9500' :
|
|
514
|
-
|
|
515
|
-
|
|
512
|
+
connectionStatus === 'connected' ? '#34C759' :
|
|
513
|
+
'#FF3B30'
|
|
516
514
|
}
|
|
517
515
|
onPress={async () => {
|
|
518
516
|
setConnectionStatus('checking');
|
|
@@ -522,7 +520,7 @@ const AppInfoScreen: React.FC<BaseScreenProps> = ({
|
|
|
522
520
|
method: 'GET',
|
|
523
521
|
timeout: 3000,
|
|
524
522
|
} as any);
|
|
525
|
-
|
|
523
|
+
|
|
526
524
|
if (response.ok) {
|
|
527
525
|
setConnectionStatus('connected');
|
|
528
526
|
toast.success('API connection successful');
|
|
@@ -543,24 +541,24 @@ const AppInfoScreen: React.FC<BaseScreenProps> = ({
|
|
|
543
541
|
{/* Build Information */}
|
|
544
542
|
<View style={styles.section}>
|
|
545
543
|
<Text style={styles.sectionTitle}>Build Information</Text>
|
|
546
|
-
|
|
547
|
-
<InfoRow
|
|
548
|
-
label="Build Timestamp"
|
|
549
|
-
value={systemInfo?.timestamp || 'Loading...'}
|
|
550
|
-
copyable
|
|
544
|
+
|
|
545
|
+
<InfoRow
|
|
546
|
+
label="Build Timestamp"
|
|
547
|
+
value={systemInfo?.timestamp || 'Loading...'}
|
|
548
|
+
copyable
|
|
551
549
|
icon="time"
|
|
552
550
|
color="#007AFF"
|
|
553
551
|
isFirst
|
|
554
552
|
/>
|
|
555
|
-
<InfoRow
|
|
556
|
-
label="React Native"
|
|
557
|
-
value="Expo/React Native"
|
|
553
|
+
<InfoRow
|
|
554
|
+
label="React Native"
|
|
555
|
+
value="Expo/React Native"
|
|
558
556
|
icon="logo-react"
|
|
559
557
|
color="#61DAFB"
|
|
560
558
|
/>
|
|
561
|
-
<InfoRow
|
|
562
|
-
label="JavaScript Engine"
|
|
563
|
-
value="Hermes"
|
|
559
|
+
<InfoRow
|
|
560
|
+
label="JavaScript Engine"
|
|
561
|
+
value="Hermes"
|
|
564
562
|
icon="flash"
|
|
565
563
|
color="#FF3B30"
|
|
566
564
|
isLast
|
|
@@ -570,8 +568,8 @@ const AppInfoScreen: React.FC<BaseScreenProps> = ({
|
|
|
570
568
|
{/* Quick Actions */}
|
|
571
569
|
<View style={styles.section}>
|
|
572
570
|
<Text style={styles.sectionTitle}>Quick Actions</Text>
|
|
573
|
-
|
|
574
|
-
<TouchableOpacity
|
|
571
|
+
|
|
572
|
+
<TouchableOpacity
|
|
575
573
|
style={[styles.settingItem, styles.firstSettingItem]}
|
|
576
574
|
onPress={handleCopyFullReport}
|
|
577
575
|
>
|
|
@@ -586,10 +584,10 @@ const AppInfoScreen: React.FC<BaseScreenProps> = ({
|
|
|
586
584
|
</View>
|
|
587
585
|
<OxyIcon name="chevron-forward" size={16} color="#ccc" />
|
|
588
586
|
</TouchableOpacity>
|
|
589
|
-
|
|
590
|
-
<TouchableOpacity
|
|
587
|
+
|
|
588
|
+
<TouchableOpacity
|
|
591
589
|
style={[
|
|
592
|
-
styles.settingItem,
|
|
590
|
+
styles.settingItem,
|
|
593
591
|
styles.lastSettingItem,
|
|
594
592
|
isRunningSystemCheck && styles.disabledSettingItem
|
|
595
593
|
]}
|
|
@@ -597,22 +595,22 @@ const AppInfoScreen: React.FC<BaseScreenProps> = ({
|
|
|
597
595
|
disabled={isRunningSystemCheck}
|
|
598
596
|
>
|
|
599
597
|
<View style={styles.settingInfo}>
|
|
600
|
-
<OxyIcon
|
|
601
|
-
name={isRunningSystemCheck ? "sync" : "checkmark-circle"}
|
|
602
|
-
size={20}
|
|
603
|
-
color={isRunningSystemCheck ? "#FF9500" : "#34C759"}
|
|
598
|
+
<OxyIcon
|
|
599
|
+
name={isRunningSystemCheck ? "sync" : "checkmark-circle"}
|
|
600
|
+
size={20}
|
|
601
|
+
color={isRunningSystemCheck ? "#FF9500" : "#34C759"}
|
|
604
602
|
style={[
|
|
605
603
|
styles.settingIcon,
|
|
606
604
|
isRunningSystemCheck && styles.spinningIcon
|
|
607
|
-
]}
|
|
605
|
+
]}
|
|
608
606
|
/>
|
|
609
607
|
<View style={styles.settingDetails}>
|
|
610
608
|
<Text style={styles.settingLabel}>
|
|
611
609
|
{isRunningSystemCheck ? 'Running System Check...' : 'Run System Check'}
|
|
612
610
|
</Text>
|
|
613
611
|
<Text style={styles.settingDescription}>
|
|
614
|
-
{isRunningSystemCheck
|
|
615
|
-
? 'Checking API, authentication, and platform status...'
|
|
612
|
+
{isRunningSystemCheck
|
|
613
|
+
? 'Checking API, authentication, and platform status...'
|
|
616
614
|
: 'Verify application health and status'
|
|
617
615
|
}
|
|
618
616
|
</Text>
|