react-native-inapp-inspector 2.0.7 → 2.2.0
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/android/src/main/java/com/inappinspector/NetworkInspectorModule.kt +0 -11
- package/dist/commonjs/components/Inspector/InspectorHeader.js +25 -28
- package/dist/commonjs/components/Inspector/MainScreen.js +2 -19
- package/dist/commonjs/components/Inspector/NetworkDetail.js +0 -15
- package/dist/commonjs/components/Inspector/PerformanceTab.js +18 -30
- package/dist/commonjs/components/Inspector/SettingsPanel.js +49 -448
- package/dist/commonjs/components/Inspector/TabBar.js +2 -23
- package/dist/commonjs/components/NetworkIcons.d.ts +0 -12
- package/dist/commonjs/components/NetworkIcons.js +3 -72
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/helpers/index.d.ts +0 -2
- package/dist/commonjs/helpers/index.js +1 -12
- package/dist/commonjs/helpers/settingsStore.d.ts +1 -1
- package/dist/commonjs/helpers/settingsStore.js +2 -4
- package/dist/commonjs/i18n/locales/en.json +2 -3
- package/dist/commonjs/index.d.ts +0 -1
- package/dist/commonjs/index.js +9 -127
- package/dist/commonjs/native/NativeInspector.d.ts +0 -1
- package/dist/commonjs/types/enums.d.ts +0 -7
- package/dist/commonjs/types/enums.js +0 -7
- package/dist/commonjs/types/interfaces.d.ts +0 -77
- package/dist/esm/components/Inspector/InspectorHeader.js +25 -28
- package/dist/esm/components/Inspector/MainScreen.js +2 -19
- package/dist/esm/components/Inspector/NetworkDetail.js +1 -16
- package/dist/esm/components/Inspector/PerformanceTab.js +19 -31
- package/dist/esm/components/Inspector/SettingsPanel.js +50 -449
- package/dist/esm/components/Inspector/TabBar.js +3 -24
- package/dist/esm/components/NetworkIcons.d.ts +0 -12
- package/dist/esm/components/NetworkIcons.js +0 -57
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/helpers/index.d.ts +0 -2
- package/dist/esm/helpers/index.js +0 -10
- package/dist/esm/helpers/settingsStore.d.ts +1 -1
- package/dist/esm/helpers/settingsStore.js +2 -4
- package/dist/esm/i18n/locales/en.json +2 -3
- package/dist/esm/index.d.ts +0 -1
- package/dist/esm/index.js +8 -123
- package/dist/esm/native/NativeInspector.d.ts +0 -1
- package/dist/esm/types/enums.d.ts +0 -7
- package/dist/esm/types/enums.js +0 -7
- package/dist/esm/types/interfaces.d.ts +0 -77
- package/ios/NetworkInspectorModule.mm +5 -12
- package/package.json +1 -4
- package/dist/commonjs/components/Inspector/AuditTab.d.ts +0 -3
- package/dist/commonjs/components/Inspector/AuditTab.js +0 -741
- package/dist/commonjs/components/Inspector/DeviceTab.d.ts +0 -3
- package/dist/commonjs/components/Inspector/DeviceTab.js +0 -717
- package/dist/commonjs/components/Inspector/FirstTimeWalkthroughModal.d.ts +0 -7
- package/dist/commonjs/components/Inspector/FirstTimeWalkthroughModal.js +0 -600
- package/dist/commonjs/components/Inspector/PerformanceHud.d.ts +0 -7
- package/dist/commonjs/components/Inspector/PerformanceHud.js +0 -210
- package/dist/commonjs/components/Inspector/RequestReplayModal.d.ts +0 -9
- package/dist/commonjs/components/Inspector/RequestReplayModal.js +0 -792
- package/dist/commonjs/components/Inspector/RequestReplayView.d.ts +0 -8
- package/dist/commonjs/components/Inspector/RequestReplayView.js +0 -871
- package/dist/commonjs/components/Inspector/StorageTab.d.ts +0 -3
- package/dist/commonjs/components/Inspector/StorageTab.js +0 -610
- package/dist/commonjs/customHooks/storageInspector.d.ts +0 -13
- package/dist/commonjs/customHooks/storageInspector.js +0 -179
- package/dist/commonjs/helpers/deviceInfo.d.ts +0 -4
- package/dist/commonjs/helpers/deviceInfo.js +0 -94
- package/dist/commonjs/helpers/packageAuditor.d.ts +0 -5
- package/dist/commonjs/helpers/packageAuditor.js +0 -182
- package/dist/esm/components/Inspector/AuditTab.d.ts +0 -3
- package/dist/esm/components/Inspector/AuditTab.js +0 -702
- package/dist/esm/components/Inspector/DeviceTab.d.ts +0 -3
- package/dist/esm/components/Inspector/DeviceTab.js +0 -678
- package/dist/esm/components/Inspector/FirstTimeWalkthroughModal.d.ts +0 -7
- package/dist/esm/components/Inspector/FirstTimeWalkthroughModal.js +0 -560
- package/dist/esm/components/Inspector/PerformanceHud.d.ts +0 -7
- package/dist/esm/components/Inspector/PerformanceHud.js +0 -170
- package/dist/esm/components/Inspector/RequestReplayModal.d.ts +0 -9
- package/dist/esm/components/Inspector/RequestReplayModal.js +0 -752
- package/dist/esm/components/Inspector/RequestReplayView.d.ts +0 -8
- package/dist/esm/components/Inspector/RequestReplayView.js +0 -831
- package/dist/esm/components/Inspector/StorageTab.d.ts +0 -3
- package/dist/esm/components/Inspector/StorageTab.js +0 -571
- package/dist/esm/customHooks/storageInspector.d.ts +0 -13
- package/dist/esm/customHooks/storageInspector.js +0 -170
- package/dist/esm/helpers/deviceInfo.d.ts +0 -4
- package/dist/esm/helpers/deviceInfo.js +0 -89
- package/dist/esm/helpers/packageAuditor.d.ts +0 -5
- package/dist/esm/helpers/packageAuditor.js +0 -173
|
@@ -18,13 +18,13 @@ import { isReduxConnected } from '../../customHooks/reduxLogger';
|
|
|
18
18
|
import { isAnalyticsConnected } from '../../customHooks/analyticsLogger';
|
|
19
19
|
import { useTranslation } from '../../i18n';
|
|
20
20
|
import { getTelemetryConsentStatus, setTelemetryConsent, sendSessionTelemetryPing, } from '../../helpers/telemetry';
|
|
21
|
-
import { SignalIcon, TerminalIcon, AnalyticsIcon, SettingsIcon,
|
|
21
|
+
import { SignalIcon, TerminalIcon, AnalyticsIcon, SettingsIcon, SunIcon, MoonIcon, ScreenIcon, MotionIcon, LayersIcon, EyeIcon, CheckIcon, TrashIcon, PackageIcon, ReduxIcon, PerformanceIcon, CrashIcon, ShieldAlertIcon, ForwardChevronIcon, ChevronDownIcon, NpmIcon, } from '../NetworkIcons';
|
|
22
22
|
import { LIB_VERSION } from '../../constants';
|
|
23
23
|
import { copyToClipboard } from '../../helpers';
|
|
24
24
|
import { showToast } from '../../helpers/toast';
|
|
25
25
|
const SettingsPanel = () => {
|
|
26
26
|
const { t } = useTranslation();
|
|
27
|
-
const { settingsPage, setSettingsPage, settingsActiveSubTab, setSettingsActiveSubTab, tabVisibility, toggleTabVisibility, defaultTab, setDefaultTab, isDark, setIsDark, modalHeightPercent, setModalHeightPercent, modalAnimationType, setModalAnimationType, showDuplicateLogs, setShowDuplicateLogs, showUpdateToast, setShowUpdateToast, showConsoleLevels, setShowConsoleLevels, resetToDefaults, storage, logs, consoleLogs, analyticsEvents, reduxState, maxNetworkLogs, setMaxNetworkLogs, maxConsoleLogs, setMaxConsoleLogs, maxAnalyticsEventsLimit, setMaxAnalyticsEventsLimit, isAutoRamLimitEnabled, setIsAutoRamLimitEnabled, deviceFreeRamMb,
|
|
27
|
+
const { settingsPage, setSettingsPage, settingsActiveSubTab, setSettingsActiveSubTab, tabVisibility, toggleTabVisibility, defaultTab, setDefaultTab, isDark, setIsDark, modalHeightPercent, setModalHeightPercent, modalAnimationType, setModalAnimationType, showDuplicateLogs, setShowDuplicateLogs, showUpdateToast, setShowUpdateToast, showConsoleLevels, setShowConsoleLevels, resetToDefaults, storage, logs, consoleLogs, analyticsEvents, reduxState, maxNetworkLogs, setMaxNetworkLogs, maxConsoleLogs, setMaxConsoleLogs, maxAnalyticsEventsLimit, setMaxAnalyticsEventsLimit, isAutoRamLimitEnabled, setIsAutoRamLimitEnabled, deviceFreeRamMb, reduxAutoRefresh, setReduxAutoRefreshState, reduxExpandDepth, setReduxExpandDepth, switchActiveTab, setSelected, setSelectedEvent, setReduxState, crashRecords, maxCrashLogs, setMaxCrashLogs, updateAvailable, latestNpmVersion, } = useInspector();
|
|
28
28
|
const [stagedHeight, setStagedHeight] = useState(modalHeightPercent);
|
|
29
29
|
const [telemetryConsent, setTelemetryConsentState] = useState(true);
|
|
30
30
|
useEffect(() => {
|
|
@@ -63,27 +63,6 @@ const SettingsPanel = () => {
|
|
|
63
63
|
icon: 'logs',
|
|
64
64
|
desc: 'Terminal console logs, warnings, errors & stack traces',
|
|
65
65
|
},
|
|
66
|
-
{
|
|
67
|
-
key: 'storage',
|
|
68
|
-
label: 'Storage (AsyncStorage)',
|
|
69
|
-
category: 'core',
|
|
70
|
-
icon: 'storage',
|
|
71
|
-
desc: 'Browse, edit, create and delete local key-value storage & JSON',
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
key: 'device',
|
|
75
|
-
label: 'Device & System Info',
|
|
76
|
-
category: 'diagnostic',
|
|
77
|
-
icon: 'device',
|
|
78
|
-
desc: 'Hermes runtime, Fabric New Arch, screen metrics & build info',
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
key: 'audit',
|
|
82
|
-
label: 'Code Quality & Package Audit',
|
|
83
|
-
category: 'diagnostic',
|
|
84
|
-
icon: 'audit',
|
|
85
|
-
desc: 'Audit dependencies, peer conflicts, TS schema errors & React Native anti-patterns',
|
|
86
|
-
},
|
|
87
66
|
{
|
|
88
67
|
key: 'performance',
|
|
89
68
|
label: 'Performance Tracker',
|
|
@@ -126,9 +105,6 @@ const SettingsPanel = () => {
|
|
|
126
105
|
logs: Boolean(tabVisibility?.logs),
|
|
127
106
|
analytics: Boolean(tabVisibility?.analytics),
|
|
128
107
|
redux: Boolean(tabVisibility?.redux),
|
|
129
|
-
storage: Boolean(tabVisibility?.storage),
|
|
130
|
-
device: Boolean(tabVisibility?.device),
|
|
131
|
-
audit: Boolean(tabVisibility?.audit),
|
|
132
108
|
bundle: Boolean(tabVisibility?.bundle),
|
|
133
109
|
performance: Boolean(tabVisibility?.performance),
|
|
134
110
|
crash: Boolean(tabVisibility?.crash),
|
|
@@ -140,9 +116,6 @@ const SettingsPanel = () => {
|
|
|
140
116
|
logs: Boolean(tabVisibility?.logs),
|
|
141
117
|
analytics: Boolean(tabVisibility?.analytics),
|
|
142
118
|
redux: Boolean(tabVisibility?.redux),
|
|
143
|
-
storage: Boolean(tabVisibility?.storage),
|
|
144
|
-
device: Boolean(tabVisibility?.device),
|
|
145
|
-
audit: Boolean(tabVisibility?.audit),
|
|
146
119
|
bundle: Boolean(tabVisibility?.bundle),
|
|
147
120
|
performance: Boolean(tabVisibility?.performance),
|
|
148
121
|
crash: Boolean(tabVisibility?.crash),
|
|
@@ -314,17 +287,16 @@ const SettingsPanel = () => {
|
|
|
314
287
|
shadowRadius: 4,
|
|
315
288
|
shadowOffset: { width: 0, height: 2 },
|
|
316
289
|
}}>
|
|
317
|
-
{/* Tab 1: Modules & Tabs */}
|
|
318
290
|
<TouchableScale accessible={true} accessibilityRole="tab" accessibilityLabel={t('settings.modulesAndTools')} accessibilityState={{ selected: settingsActiveSubTab === 'module' }} onPress={() => {
|
|
319
291
|
animateNextLayout();
|
|
320
292
|
setSettingsActiveSubTab('module');
|
|
321
293
|
}} style={{
|
|
322
294
|
flex: 1,
|
|
323
|
-
paddingVertical:
|
|
295
|
+
paddingVertical: 9,
|
|
324
296
|
flexDirection: 'row',
|
|
325
297
|
alignItems: 'center',
|
|
326
298
|
justifyContent: 'center',
|
|
327
|
-
gap:
|
|
299
|
+
gap: 6,
|
|
328
300
|
borderRadius: 9,
|
|
329
301
|
backgroundColor: settingsActiveSubTab === 'module'
|
|
330
302
|
? AppColors.purple
|
|
@@ -332,11 +304,11 @@ const SettingsPanel = () => {
|
|
|
332
304
|
}}>
|
|
333
305
|
<LayersIcon color={settingsActiveSubTab === 'module'
|
|
334
306
|
? AppColors.white
|
|
335
|
-
: AppColors.grayText} size={
|
|
307
|
+
: AppColors.grayText} size={13}/>
|
|
336
308
|
<Text style={{
|
|
337
309
|
fontFamily: AppFonts.interBold,
|
|
338
|
-
fontSize:
|
|
339
|
-
lineHeight:
|
|
310
|
+
fontSize: 12.5,
|
|
311
|
+
lineHeight: 16,
|
|
340
312
|
color: settingsActiveSubTab === 'module'
|
|
341
313
|
? AppColors.white
|
|
342
314
|
: AppColors.grayText,
|
|
@@ -345,48 +317,16 @@ const SettingsPanel = () => {
|
|
|
345
317
|
</Text>
|
|
346
318
|
</TouchableScale>
|
|
347
319
|
|
|
348
|
-
{/* Tab 2: RAM & Limits */}
|
|
349
|
-
<TouchableScale accessible={true} accessibilityRole="tab" accessibilityLabel={t('settings.ramLimits')} accessibilityState={{ selected: settingsActiveSubTab === 'limits' }} onPress={() => {
|
|
350
|
-
animateNextLayout();
|
|
351
|
-
setSettingsActiveSubTab('limits');
|
|
352
|
-
}} style={{
|
|
353
|
-
flex: 1,
|
|
354
|
-
paddingVertical: 8,
|
|
355
|
-
flexDirection: 'row',
|
|
356
|
-
alignItems: 'center',
|
|
357
|
-
justifyContent: 'center',
|
|
358
|
-
gap: 5,
|
|
359
|
-
borderRadius: 9,
|
|
360
|
-
backgroundColor: settingsActiveSubTab === 'limits'
|
|
361
|
-
? AppColors.purple
|
|
362
|
-
: 'transparent',
|
|
363
|
-
}}>
|
|
364
|
-
<CpuIcon color={settingsActiveSubTab === 'limits'
|
|
365
|
-
? AppColors.white
|
|
366
|
-
: AppColors.grayText} size={12.5}/>
|
|
367
|
-
<Text style={{
|
|
368
|
-
fontFamily: AppFonts.interBold,
|
|
369
|
-
fontSize: 11.5,
|
|
370
|
-
lineHeight: 15,
|
|
371
|
-
color: settingsActiveSubTab === 'limits'
|
|
372
|
-
? AppColors.white
|
|
373
|
-
: AppColors.grayText,
|
|
374
|
-
}}>
|
|
375
|
-
{t('settings.ramLimits')}
|
|
376
|
-
</Text>
|
|
377
|
-
</TouchableScale>
|
|
378
|
-
|
|
379
|
-
{/* Tab 3: UI & Appearance */}
|
|
380
320
|
<TouchableScale accessible={true} accessibilityRole="tab" accessibilityLabel={t('settings.uiPreferences')} accessibilityState={{ selected: settingsActiveSubTab === 'ui' }} onPress={() => {
|
|
381
321
|
animateNextLayout();
|
|
382
322
|
setSettingsActiveSubTab('ui');
|
|
383
323
|
}} style={{
|
|
384
324
|
flex: 1,
|
|
385
|
-
paddingVertical:
|
|
325
|
+
paddingVertical: 9,
|
|
386
326
|
flexDirection: 'row',
|
|
387
327
|
alignItems: 'center',
|
|
388
328
|
justifyContent: 'center',
|
|
389
|
-
gap:
|
|
329
|
+
gap: 6,
|
|
390
330
|
borderRadius: 9,
|
|
391
331
|
backgroundColor: settingsActiveSubTab === 'ui'
|
|
392
332
|
? AppColors.purple
|
|
@@ -394,11 +334,11 @@ const SettingsPanel = () => {
|
|
|
394
334
|
}}>
|
|
395
335
|
<ScreenIcon color={settingsActiveSubTab === 'ui'
|
|
396
336
|
? AppColors.white
|
|
397
|
-
: AppColors.grayText} size={
|
|
337
|
+
: AppColors.grayText} size={13}/>
|
|
398
338
|
<Text style={{
|
|
399
339
|
fontFamily: AppFonts.interBold,
|
|
400
|
-
fontSize:
|
|
401
|
-
lineHeight:
|
|
340
|
+
fontSize: 12.5,
|
|
341
|
+
lineHeight: 16,
|
|
402
342
|
color: settingsActiveSubTab === 'ui'
|
|
403
343
|
? AppColors.white
|
|
404
344
|
: AppColors.grayText,
|
|
@@ -408,7 +348,7 @@ const SettingsPanel = () => {
|
|
|
408
348
|
</TouchableScale>
|
|
409
349
|
</View>
|
|
410
350
|
|
|
411
|
-
{settingsActiveSubTab === 'module'
|
|
351
|
+
{settingsActiveSubTab === 'module' ? (<View style={{ gap: 12 }}>
|
|
412
352
|
{/* Individual Module Cards with Left Checkboxes */}
|
|
413
353
|
<View style={{ gap: 10 }}>
|
|
414
354
|
{allModules.map(moduleItem => {
|
|
@@ -424,23 +364,17 @@ const SettingsPanel = () => {
|
|
|
424
364
|
? `${logs.length} requests • Limit: ${maxNetworkLogs}`
|
|
425
365
|
: moduleItem.key === 'logs'
|
|
426
366
|
? `${consoleLogs.length} logs • Limit: ${maxConsoleLogs}`
|
|
427
|
-
: moduleItem.key === '
|
|
428
|
-
?
|
|
429
|
-
: moduleItem.key === '
|
|
430
|
-
?
|
|
431
|
-
: moduleItem.key === '
|
|
432
|
-
? `${
|
|
433
|
-
: moduleItem.key === '
|
|
434
|
-
?
|
|
435
|
-
: moduleItem.key === '
|
|
436
|
-
?
|
|
437
|
-
:
|
|
438
|
-
? `${crashRecords?.length || 0} crashes recorded • Crash Guard`
|
|
439
|
-
: moduleItem.key === 'analytics'
|
|
440
|
-
? `${analyticsEvents.length} events logged`
|
|
441
|
-
: moduleItem.key === 'redux'
|
|
442
|
-
? `${Object.keys(reduxState || {}).length} slices • Depth: ${reduxExpandDepth}`
|
|
443
|
-
: '';
|
|
367
|
+
: moduleItem.key === 'performance'
|
|
368
|
+
? '60 FPS Target • Memory Telemetry'
|
|
369
|
+
: moduleItem.key === 'bundle'
|
|
370
|
+
? 'Metro Packager • Dependency Map'
|
|
371
|
+
: moduleItem.key === 'crash'
|
|
372
|
+
? `${crashRecords?.length || 0} crashes recorded • Crash Guard`
|
|
373
|
+
: moduleItem.key === 'analytics'
|
|
374
|
+
? `${analyticsEvents.length} events logged`
|
|
375
|
+
: moduleItem.key === 'redux'
|
|
376
|
+
? `${Object.keys(reduxState || {}).length} slices • Depth: ${reduxExpandDepth}`
|
|
377
|
+
: '';
|
|
444
378
|
return (<View key={moduleItem.key} style={{
|
|
445
379
|
backgroundColor: AppColors.primaryLight,
|
|
446
380
|
borderRadius: 14,
|
|
@@ -549,15 +483,6 @@ const SettingsPanel = () => {
|
|
|
549
483
|
{moduleItem.icon === 'analytics' && (<AnalyticsIcon color={isChecked
|
|
550
484
|
? AppColors.purple
|
|
551
485
|
: AppColors.grayTextWeak} size={16}/>)}
|
|
552
|
-
{moduleItem.icon === 'storage' && (<DatabaseIcon color={isChecked
|
|
553
|
-
? AppColors.purple
|
|
554
|
-
: AppColors.grayTextWeak} size={16}/>)}
|
|
555
|
-
{moduleItem.icon === 'device' && (<DevicePhoneIcon color={isChecked
|
|
556
|
-
? AppColors.purple
|
|
557
|
-
: AppColors.grayTextWeak} size={16}/>)}
|
|
558
|
-
{moduleItem.icon === 'audit' && (<ShieldCheckIcon color={isChecked
|
|
559
|
-
? AppColors.purple
|
|
560
|
-
: AppColors.grayTextWeak} size={16}/>)}
|
|
561
486
|
{moduleItem.icon === 'redux' && (<ReduxIcon color={isChecked
|
|
562
487
|
? AppColors.purple
|
|
563
488
|
: AppColors.grayTextWeak} size={16}/>)}
|
|
@@ -709,29 +634,29 @@ const SettingsPanel = () => {
|
|
|
709
634
|
borderTopColor: AppColors.dividerColor,
|
|
710
635
|
}}>
|
|
711
636
|
{/* Live Info Pill */}
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
637
|
+
<View style={{
|
|
638
|
+
flexDirection: 'row',
|
|
639
|
+
alignItems: 'center',
|
|
640
|
+
gap: 6,
|
|
641
|
+
flex: 1,
|
|
642
|
+
}}>
|
|
643
|
+
<View style={{
|
|
644
|
+
width: 6,
|
|
645
|
+
height: 6,
|
|
646
|
+
borderRadius: 3,
|
|
647
|
+
backgroundColor: isChecked
|
|
648
|
+
? AppColors.liveGreen
|
|
649
|
+
: AppColors.grayTextWeak,
|
|
650
|
+
}}/>
|
|
651
|
+
<Text style={{
|
|
652
|
+
fontFamily: AppFonts.interMedium,
|
|
653
|
+
fontSize: 11,
|
|
654
|
+
color: AppColors.grayText,
|
|
655
|
+
lineHeight: 14,
|
|
656
|
+
}}>
|
|
657
|
+
{liveStats}
|
|
658
|
+
</Text>
|
|
659
|
+
</View>
|
|
735
660
|
|
|
736
661
|
{/* Sleek Configure Button */}
|
|
737
662
|
<TouchableScale accessible={true} accessibilityRole="button" accessibilityLabel={`Configure ${moduleItem.label} settings`} onPress={() => {
|
|
@@ -763,11 +688,8 @@ const SettingsPanel = () => {
|
|
|
763
688
|
</View>);
|
|
764
689
|
})}
|
|
765
690
|
</View>
|
|
766
|
-
</View>)}
|
|
767
691
|
|
|
768
|
-
|
|
769
|
-
{settingsActiveSubTab === 'limits' && (<View style={{ gap: 14 }}>
|
|
770
|
-
{/* Section 1: RAM-Based Auto Limits */}
|
|
692
|
+
{/* Section 3.5: RAM-Based Auto Limits */}
|
|
771
693
|
<View style={{
|
|
772
694
|
backgroundColor: AppColors.primaryLight,
|
|
773
695
|
borderRadius: 14,
|
|
@@ -784,7 +706,7 @@ const SettingsPanel = () => {
|
|
|
784
706
|
color: AppColors.grayTextWeak,
|
|
785
707
|
letterSpacing: 0.8,
|
|
786
708
|
}}>
|
|
787
|
-
RAM-
|
|
709
|
+
RAM-Based Auto Limits
|
|
788
710
|
</Text>
|
|
789
711
|
|
|
790
712
|
{/* Auto RAM Limit Toggle */}
|
|
@@ -989,329 +911,8 @@ const SettingsPanel = () => {
|
|
|
989
911
|
</View>))}
|
|
990
912
|
</View>
|
|
991
913
|
</View>)}
|
|
992
|
-
|
|
993
|
-
<View style={{ height: 1, backgroundColor: AppColors.dividerColor }}/>
|
|
994
|
-
|
|
995
|
-
{/* Floating Mini Performance HUD Toggle */}
|
|
996
|
-
{renderSettingRow({
|
|
997
|
-
icon: <PerformanceIcon color={AppColors.purple} size={16}/>,
|
|
998
|
-
label: 'Show Mini Performance HUD Overlay',
|
|
999
|
-
description: 'Floating on-screen real-time FPS and Memory/Heap widget',
|
|
1000
|
-
right: (<TouchableScale accessible={true} accessibilityRole="switch" accessibilityLabel="Toggle mini performance HUD overlay" accessibilityState={{ checked: isPerformanceHudEnabled }} onPress={() => setIsPerformanceHudEnabled(prev => !prev)} style={{
|
|
1001
|
-
width: 42,
|
|
1002
|
-
height: 24,
|
|
1003
|
-
borderRadius: 12,
|
|
1004
|
-
backgroundColor: isPerformanceHudEnabled
|
|
1005
|
-
? AppColors.purple
|
|
1006
|
-
: AppColors.grayBorderSecondary,
|
|
1007
|
-
padding: 2,
|
|
1008
|
-
justifyContent: 'center',
|
|
1009
|
-
alignItems: isPerformanceHudEnabled
|
|
1010
|
-
? 'flex-end'
|
|
1011
|
-
: 'flex-start',
|
|
1012
|
-
}}>
|
|
1013
|
-
<View style={{
|
|
1014
|
-
width: 20,
|
|
1015
|
-
height: 20,
|
|
1016
|
-
borderRadius: 10,
|
|
1017
|
-
backgroundColor: AppColors.white,
|
|
1018
|
-
shadowColor: AppColors.black,
|
|
1019
|
-
shadowOpacity: 0.18,
|
|
1020
|
-
shadowRadius: 2,
|
|
1021
|
-
shadowOffset: { width: 0, height: 1 },
|
|
1022
|
-
}}/>
|
|
1023
|
-
</TouchableScale>),
|
|
1024
|
-
isLast: true,
|
|
1025
|
-
})}
|
|
1026
|
-
</View>
|
|
1027
|
-
|
|
1028
|
-
{/* Section 2: Fine-Tuned Resource Limits */}
|
|
1029
|
-
<View style={{
|
|
1030
|
-
backgroundColor: AppColors.primaryLight,
|
|
1031
|
-
borderRadius: 14,
|
|
1032
|
-
borderWidth: 1,
|
|
1033
|
-
borderColor: AppColors.grayBorderSecondary,
|
|
1034
|
-
overflow: 'hidden',
|
|
1035
|
-
padding: 14,
|
|
1036
|
-
gap: 12,
|
|
1037
|
-
}}>
|
|
1038
|
-
<Text style={{
|
|
1039
|
-
fontFamily: AppFonts.interBold,
|
|
1040
|
-
fontSize: 11,
|
|
1041
|
-
lineHeight: 14,
|
|
1042
|
-
color: AppColors.grayTextWeak,
|
|
1043
|
-
letterSpacing: 0.8,
|
|
1044
|
-
}}>
|
|
1045
|
-
MANUAL RESOURCE THRESHOLDS
|
|
1046
|
-
</Text>
|
|
1047
|
-
|
|
1048
|
-
{renderSettingRow({
|
|
1049
|
-
icon: <SignalIcon color={AppColors.purple} size={16}/>,
|
|
1050
|
-
label: 'Max Network / API Logs',
|
|
1051
|
-
description: 'Maximum in-memory API requests tracked before rotation',
|
|
1052
|
-
numericInput: {
|
|
1053
|
-
value: maxNetworkLogs,
|
|
1054
|
-
onChange: setMaxNetworkLogs,
|
|
1055
|
-
min: 10,
|
|
1056
|
-
max: 100,
|
|
1057
|
-
placeholder: '10 - 100',
|
|
1058
|
-
},
|
|
1059
|
-
})}
|
|
1060
|
-
|
|
1061
|
-
{renderSettingRow({
|
|
1062
|
-
icon: <TerminalIcon color={AppColors.purple} size={16}/>,
|
|
1063
|
-
label: 'Max Console Logs',
|
|
1064
|
-
description: 'Maximum log entries kept across info/warn/error streams',
|
|
1065
|
-
numericInput: {
|
|
1066
|
-
value: maxConsoleLogs,
|
|
1067
|
-
onChange: setMaxConsoleLogs,
|
|
1068
|
-
min: 20,
|
|
1069
|
-
max: 300,
|
|
1070
|
-
placeholder: '20 - 300',
|
|
1071
|
-
},
|
|
1072
|
-
})}
|
|
1073
|
-
|
|
1074
|
-
{renderSettingRow({
|
|
1075
|
-
icon: <AnalyticsIcon color={AppColors.purple} size={16}/>,
|
|
1076
|
-
label: 'Max Analytics Events',
|
|
1077
|
-
description: 'Capacity for captured analytics payloads & telemetry pings',
|
|
1078
|
-
numericInput: {
|
|
1079
|
-
value: maxAnalyticsEventsLimit,
|
|
1080
|
-
onChange: setMaxAnalyticsEventsLimit,
|
|
1081
|
-
min: 20,
|
|
1082
|
-
max: 200,
|
|
1083
|
-
placeholder: '20 - 200',
|
|
1084
|
-
},
|
|
1085
|
-
})}
|
|
1086
|
-
|
|
1087
|
-
{renderSettingRow({
|
|
1088
|
-
icon: <CrashIcon color={AppColors.errorColor} size={16}/>,
|
|
1089
|
-
label: 'Max Crash Records',
|
|
1090
|
-
description: 'Stored fatal exceptions and crash diagnostics logs',
|
|
1091
|
-
numericInput: {
|
|
1092
|
-
value: maxCrashLogs,
|
|
1093
|
-
onChange: setMaxCrashLogs,
|
|
1094
|
-
min: 5,
|
|
1095
|
-
max: 50,
|
|
1096
|
-
placeholder: '5 - 50',
|
|
1097
|
-
},
|
|
1098
|
-
isLast: true,
|
|
1099
|
-
})}
|
|
1100
|
-
</View>
|
|
1101
|
-
|
|
1102
|
-
{/* Section 3: Storage & Cache Cleansing */}
|
|
1103
|
-
<View style={{
|
|
1104
|
-
backgroundColor: AppColors.primaryLight,
|
|
1105
|
-
borderRadius: 14,
|
|
1106
|
-
borderWidth: 1,
|
|
1107
|
-
borderColor: AppColors.grayBorderSecondary,
|
|
1108
|
-
overflow: 'hidden',
|
|
1109
|
-
padding: 14,
|
|
1110
|
-
gap: 12,
|
|
1111
|
-
}}>
|
|
1112
|
-
<Text style={{
|
|
1113
|
-
fontFamily: AppFonts.interBold,
|
|
1114
|
-
fontSize: 11,
|
|
1115
|
-
lineHeight: 14,
|
|
1116
|
-
color: AppColors.grayTextWeak,
|
|
1117
|
-
letterSpacing: 0.8,
|
|
1118
|
-
}}>
|
|
1119
|
-
STORAGE & CACHE CLEANSING
|
|
1120
|
-
</Text>
|
|
1121
|
-
|
|
1122
|
-
{renderSettingRow({
|
|
1123
|
-
icon: <TrashIcon color={AppColors.errorColor} size={16}/>,
|
|
1124
|
-
label: 'Clear All Network Logs',
|
|
1125
|
-
description: `${logs.length} requests in memory`,
|
|
1126
|
-
onPress: () => {
|
|
1127
|
-
clearNetworkLogs();
|
|
1128
|
-
setSelected(null);
|
|
1129
|
-
Alert.alert(t('common.success'), 'Network logs cleared successfully.');
|
|
1130
|
-
},
|
|
1131
|
-
right: (<View style={{
|
|
1132
|
-
paddingHorizontal: 10,
|
|
1133
|
-
paddingVertical: 4,
|
|
1134
|
-
borderRadius: 6,
|
|
1135
|
-
backgroundColor: `${AppColors.errorColor}14`,
|
|
1136
|
-
borderWidth: 1,
|
|
1137
|
-
borderColor: `${AppColors.errorColor}33`,
|
|
1138
|
-
}}>
|
|
1139
|
-
<Text style={{
|
|
1140
|
-
fontFamily: AppFonts.interBold,
|
|
1141
|
-
fontSize: 11,
|
|
1142
|
-
color: AppColors.errorColor,
|
|
1143
|
-
}}>
|
|
1144
|
-
Clear ({logs.length})
|
|
1145
|
-
</Text>
|
|
1146
|
-
</View>),
|
|
1147
|
-
})}
|
|
1148
|
-
|
|
1149
|
-
{renderSettingRow({
|
|
1150
|
-
icon: <TrashIcon color={AppColors.errorColor} size={16}/>,
|
|
1151
|
-
label: 'Clear All Console Logs',
|
|
1152
|
-
description: `${consoleLogs.length} logs in memory`,
|
|
1153
|
-
onPress: () => {
|
|
1154
|
-
clearConsoleLogs();
|
|
1155
|
-
Alert.alert(t('common.success'), 'Console logs cleared successfully.');
|
|
1156
|
-
},
|
|
1157
|
-
right: (<View style={{
|
|
1158
|
-
paddingHorizontal: 10,
|
|
1159
|
-
paddingVertical: 4,
|
|
1160
|
-
borderRadius: 6,
|
|
1161
|
-
backgroundColor: `${AppColors.errorColor}14`,
|
|
1162
|
-
borderWidth: 1,
|
|
1163
|
-
borderColor: `${AppColors.errorColor}33`,
|
|
1164
|
-
}}>
|
|
1165
|
-
<Text style={{
|
|
1166
|
-
fontFamily: AppFonts.interBold,
|
|
1167
|
-
fontSize: 11,
|
|
1168
|
-
color: AppColors.errorColor,
|
|
1169
|
-
}}>
|
|
1170
|
-
Clear ({consoleLogs.length})
|
|
1171
|
-
</Text>
|
|
1172
|
-
</View>),
|
|
1173
|
-
})}
|
|
1174
|
-
|
|
1175
|
-
{renderSettingRow({
|
|
1176
|
-
icon: <TrashIcon color={AppColors.errorColor} size={16}/>,
|
|
1177
|
-
label: 'Clear Analytics Events',
|
|
1178
|
-
description: `${analyticsEvents.length} events recorded`,
|
|
1179
|
-
onPress: () => {
|
|
1180
|
-
clearAnalyticsEvents();
|
|
1181
|
-
setSelectedEvent(null);
|
|
1182
|
-
Alert.alert(t('common.success'), 'Analytics events cleared successfully.');
|
|
1183
|
-
},
|
|
1184
|
-
right: (<View style={{
|
|
1185
|
-
paddingHorizontal: 10,
|
|
1186
|
-
paddingVertical: 4,
|
|
1187
|
-
borderRadius: 6,
|
|
1188
|
-
backgroundColor: `${AppColors.errorColor}14`,
|
|
1189
|
-
borderWidth: 1,
|
|
1190
|
-
borderColor: `${AppColors.errorColor}33`,
|
|
1191
|
-
}}>
|
|
1192
|
-
<Text style={{
|
|
1193
|
-
fontFamily: AppFonts.interBold,
|
|
1194
|
-
fontSize: 11,
|
|
1195
|
-
color: AppColors.errorColor,
|
|
1196
|
-
}}>
|
|
1197
|
-
Clear ({analyticsEvents.length})
|
|
1198
|
-
</Text>
|
|
1199
|
-
</View>),
|
|
1200
|
-
})}
|
|
1201
|
-
|
|
1202
|
-
{renderSettingRow({
|
|
1203
|
-
icon: <TrashIcon color={AppColors.errorColor} size={16}/>,
|
|
1204
|
-
label: 'Clear Crash Logs',
|
|
1205
|
-
description: `${crashRecords.length} crash dumps recorded`,
|
|
1206
|
-
onPress: () => {
|
|
1207
|
-
clearCrashRecords();
|
|
1208
|
-
Alert.alert(t('common.success'), 'Crash records cleared successfully.');
|
|
1209
|
-
},
|
|
1210
|
-
isLast: true,
|
|
1211
|
-
right: (<View style={{
|
|
1212
|
-
paddingHorizontal: 10,
|
|
1213
|
-
paddingVertical: 4,
|
|
1214
|
-
borderRadius: 6,
|
|
1215
|
-
backgroundColor: `${AppColors.errorColor}14`,
|
|
1216
|
-
borderWidth: 1,
|
|
1217
|
-
borderColor: `${AppColors.errorColor}33`,
|
|
1218
|
-
}}>
|
|
1219
|
-
<Text style={{
|
|
1220
|
-
fontFamily: AppFonts.interBold,
|
|
1221
|
-
fontSize: 11,
|
|
1222
|
-
color: AppColors.errorColor,
|
|
1223
|
-
}}>
|
|
1224
|
-
Clear ({crashRecords.length})
|
|
1225
|
-
</Text>
|
|
1226
|
-
</View>),
|
|
1227
|
-
})}
|
|
1228
914
|
</View>
|
|
1229
|
-
</View>)}
|
|
1230
|
-
|
|
1231
|
-
{/* ─── TAB 3: UI & APPEARANCE ────────────────────────────────────────── */}
|
|
1232
|
-
{settingsActiveSubTab === 'ui' && (<View style={{ gap: 14 }}>
|
|
1233
|
-
{/* Section 0: Interactive Walkthrough Tour */}
|
|
1234
|
-
<View style={{
|
|
1235
|
-
backgroundColor: AppColors.primaryLight,
|
|
1236
|
-
borderRadius: 14,
|
|
1237
|
-
borderWidth: 1,
|
|
1238
|
-
borderColor: AppColors.grayBorderSecondary,
|
|
1239
|
-
overflow: 'hidden',
|
|
1240
|
-
padding: 14,
|
|
1241
|
-
gap: 12,
|
|
1242
|
-
}}>
|
|
1243
|
-
<Text style={{
|
|
1244
|
-
fontFamily: AppFonts.interBold,
|
|
1245
|
-
fontSize: 11,
|
|
1246
|
-
lineHeight: 14,
|
|
1247
|
-
color: AppColors.grayTextWeak,
|
|
1248
|
-
letterSpacing: 0.8,
|
|
1249
|
-
}}>
|
|
1250
|
-
ONBOARDING & GUIDE
|
|
1251
|
-
</Text>
|
|
1252
|
-
|
|
1253
|
-
<View style={{
|
|
1254
|
-
flexDirection: 'row',
|
|
1255
|
-
alignItems: 'center',
|
|
1256
|
-
justifyContent: 'space-between',
|
|
1257
|
-
gap: 10,
|
|
1258
|
-
}}>
|
|
1259
|
-
<View style={{
|
|
1260
|
-
flexDirection: 'row',
|
|
1261
|
-
alignItems: 'center',
|
|
1262
|
-
gap: 10,
|
|
1263
|
-
flex: 1,
|
|
1264
|
-
}}>
|
|
1265
|
-
<View style={{
|
|
1266
|
-
width: 34,
|
|
1267
|
-
height: 34,
|
|
1268
|
-
borderRadius: 9,
|
|
1269
|
-
backgroundColor: `${AppColors.purple}16`,
|
|
1270
|
-
alignItems: 'center',
|
|
1271
|
-
justifyContent: 'center',
|
|
1272
|
-
}}>
|
|
1273
|
-
<GlobeIcon color={AppColors.purple} size={16}/>
|
|
1274
|
-
</View>
|
|
1275
|
-
<View style={{ flex: 1 }}>
|
|
1276
|
-
<Text style={{
|
|
1277
|
-
fontFamily: AppFonts.interBold,
|
|
1278
|
-
fontSize: 13.5,
|
|
1279
|
-
lineHeight: 18,
|
|
1280
|
-
color: AppColors.primaryBlack,
|
|
1281
|
-
}}>
|
|
1282
|
-
First-Time Walkthrough
|
|
1283
|
-
</Text>
|
|
1284
|
-
<Text style={{
|
|
1285
|
-
fontFamily: AppFonts.interRegular,
|
|
1286
|
-
fontSize: 11.5,
|
|
1287
|
-
color: AppColors.grayTextWeak,
|
|
1288
|
-
marginTop: 1,
|
|
1289
|
-
lineHeight: 16,
|
|
1290
|
-
}}>
|
|
1291
|
-
Explore features, gestures & developer tools
|
|
1292
|
-
</Text>
|
|
1293
|
-
</View>
|
|
1294
|
-
</View>
|
|
1295
|
-
|
|
1296
|
-
<TouchableScale style={{
|
|
1297
|
-
backgroundColor: `${AppColors.purple}14`,
|
|
1298
|
-
borderColor: `${AppColors.purple}30`,
|
|
1299
|
-
borderWidth: 1,
|
|
1300
|
-
paddingHorizontal: 12,
|
|
1301
|
-
paddingVertical: 7,
|
|
1302
|
-
borderRadius: 8,
|
|
1303
|
-
}} onPress={openWalkthrough} hitSlop={8}>
|
|
1304
|
-
<Text style={{
|
|
1305
|
-
fontFamily: AppFonts.interBold,
|
|
1306
|
-
fontSize: 12,
|
|
1307
|
-
color: AppColors.purple,
|
|
1308
|
-
}}>
|
|
1309
|
-
Start Tour →
|
|
1310
|
-
</Text>
|
|
1311
|
-
</TouchableScale>
|
|
1312
|
-
</View>
|
|
1313
|
-
</View>
|
|
1314
|
-
|
|
915
|
+
</View>) : (<View style={{ gap: 14 }}>
|
|
1315
916
|
{/* Section 1: Appearance */}
|
|
1316
917
|
<View style={{
|
|
1317
918
|
backgroundColor: AppColors.primaryLight,
|