react-native-inapp-inspector 2.0.4 → 2.0.6
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/.gradle/8.9/checksums/checksums.lock +0 -0
- package/android/.gradle/8.9/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/8.9/checksums/sha1-checksums.bin +0 -0
- package/android/.gradle/8.9/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/8.9/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/8.9/fileChanges/last-build.bin +0 -0
- package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/8.9/gc.properties +0 -0
- package/android/.gradle/9.2.0/checksums/checksums.lock +0 -0
- package/android/.gradle/9.2.0/fileChanges/last-build.bin +0 -0
- package/android/.gradle/9.2.0/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/9.2.0/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/9.2.0/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/build/reports/problems/problems-report.html +659 -0
- package/android/src/main/java/com/inappinspector/NetworkInspectorModule.kt +11 -0
- package/dist/commonjs/components/Inspector/AuditTab.d.ts +3 -0
- package/dist/commonjs/components/Inspector/AuditTab.js +741 -0
- package/dist/commonjs/components/Inspector/DeviceTab.d.ts +3 -0
- package/dist/commonjs/components/Inspector/DeviceTab.js +717 -0
- package/dist/commonjs/components/Inspector/InspectorHeader.js +115 -75
- package/dist/commonjs/components/Inspector/MainScreen.js +16 -2
- package/dist/commonjs/components/Inspector/NetworkDetail.js +15 -0
- package/dist/commonjs/components/Inspector/NetworkTab.js +317 -12
- package/dist/commonjs/components/Inspector/NpmUpdateToast.js +88 -39
- package/dist/commonjs/components/Inspector/PerformanceHud.d.ts +7 -0
- package/dist/commonjs/components/Inspector/PerformanceHud.js +210 -0
- package/dist/commonjs/components/Inspector/PerformanceTab.js +30 -18
- package/dist/commonjs/components/Inspector/RequestReplayModal.d.ts +9 -0
- package/dist/commonjs/components/Inspector/RequestReplayModal.js +792 -0
- package/dist/commonjs/components/Inspector/RequestReplayView.d.ts +8 -0
- package/dist/commonjs/components/Inspector/RequestReplayView.js +871 -0
- package/dist/commonjs/components/Inspector/SettingsPanel.js +847 -370
- package/dist/commonjs/components/Inspector/StorageTab.d.ts +3 -0
- package/dist/commonjs/components/Inspector/StorageTab.js +610 -0
- package/dist/commonjs/components/Inspector/TabBar.js +23 -2
- package/dist/commonjs/components/Inspector/UpdateAvailableModal.d.ts +8 -0
- package/dist/commonjs/components/Inspector/UpdateAvailableModal.js +469 -0
- package/dist/commonjs/components/NetworkIcons.d.ts +12 -0
- package/dist/commonjs/components/NetworkIcons.js +72 -3
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/customHooks/storageInspector.d.ts +13 -0
- package/dist/commonjs/customHooks/storageInspector.js +179 -0
- package/dist/commonjs/helpers/deviceInfo.d.ts +4 -0
- package/dist/commonjs/helpers/deviceInfo.js +94 -0
- package/dist/commonjs/helpers/index.d.ts +2 -0
- package/dist/commonjs/helpers/index.js +12 -1
- package/dist/commonjs/helpers/packageAuditor.d.ts +5 -0
- package/dist/commonjs/helpers/packageAuditor.js +182 -0
- package/dist/commonjs/helpers/searchQueryParser.d.ts +8 -3
- package/dist/commonjs/helpers/searchQueryParser.js +85 -31
- package/dist/commonjs/helpers/telemetry.js +4 -4
- package/dist/commonjs/i18n/locales/en.json +3 -2
- package/dist/commonjs/index.d.ts +1 -0
- package/dist/commonjs/index.js +171 -16
- package/dist/commonjs/native/NativeInspector.d.ts +1 -0
- package/dist/commonjs/types/enums.d.ts +7 -0
- package/dist/commonjs/types/enums.js +7 -0
- package/dist/commonjs/types/interfaces.d.ts +82 -0
- package/dist/esm/components/Inspector/AuditTab.d.ts +3 -0
- package/dist/esm/components/Inspector/AuditTab.js +702 -0
- package/dist/esm/components/Inspector/DeviceTab.d.ts +3 -0
- package/dist/esm/components/Inspector/DeviceTab.js +678 -0
- package/dist/esm/components/Inspector/InspectorHeader.js +115 -75
- package/dist/esm/components/Inspector/MainScreen.js +16 -2
- package/dist/esm/components/Inspector/NetworkDetail.js +16 -1
- package/dist/esm/components/Inspector/NetworkTab.js +317 -12
- package/dist/esm/components/Inspector/NpmUpdateToast.js +88 -39
- package/dist/esm/components/Inspector/PerformanceHud.d.ts +7 -0
- package/dist/esm/components/Inspector/PerformanceHud.js +170 -0
- package/dist/esm/components/Inspector/PerformanceTab.js +31 -19
- package/dist/esm/components/Inspector/RequestReplayModal.d.ts +9 -0
- package/dist/esm/components/Inspector/RequestReplayModal.js +752 -0
- package/dist/esm/components/Inspector/RequestReplayView.d.ts +8 -0
- package/dist/esm/components/Inspector/RequestReplayView.js +831 -0
- package/dist/esm/components/Inspector/SettingsPanel.js +848 -371
- package/dist/esm/components/Inspector/StorageTab.d.ts +3 -0
- package/dist/esm/components/Inspector/StorageTab.js +571 -0
- package/dist/esm/components/Inspector/TabBar.js +24 -3
- package/dist/esm/components/Inspector/UpdateAvailableModal.d.ts +8 -0
- package/dist/esm/components/Inspector/UpdateAvailableModal.js +432 -0
- package/dist/esm/components/NetworkIcons.d.ts +12 -0
- package/dist/esm/components/NetworkIcons.js +57 -0
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/customHooks/storageInspector.d.ts +13 -0
- package/dist/esm/customHooks/storageInspector.js +170 -0
- package/dist/esm/helpers/deviceInfo.d.ts +4 -0
- package/dist/esm/helpers/deviceInfo.js +89 -0
- package/dist/esm/helpers/index.d.ts +2 -0
- package/dist/esm/helpers/index.js +10 -0
- package/dist/esm/helpers/packageAuditor.d.ts +5 -0
- package/dist/esm/helpers/packageAuditor.js +173 -0
- package/dist/esm/helpers/searchQueryParser.d.ts +8 -3
- package/dist/esm/helpers/searchQueryParser.js +85 -31
- package/dist/esm/helpers/telemetry.js +4 -4
- package/dist/esm/i18n/locales/en.json +3 -2
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +167 -15
- package/dist/esm/native/NativeInspector.d.ts +1 -0
- package/dist/esm/types/enums.d.ts +7 -0
- package/dist/esm/types/enums.js +7 -0
- package/dist/esm/types/interfaces.d.ts +82 -0
- package/ios/NetworkInspectorModule.mm +12 -5
- package/package.json +4 -1
|
@@ -18,10 +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, SunIcon, MoonIcon, ScreenIcon, MotionIcon, LayersIcon, EyeIcon, CheckIcon, TrashIcon, PackageIcon, ReduxIcon, PerformanceIcon, CrashIcon, ShieldAlertIcon, ForwardChevronIcon, ChevronDownIcon, } from '../NetworkIcons';
|
|
21
|
+
import { SignalIcon, TerminalIcon, AnalyticsIcon, SettingsIcon, SunIcon, MoonIcon, ScreenIcon, MotionIcon, LayersIcon, EyeIcon, CheckIcon, TrashIcon, PackageIcon, ReduxIcon, PerformanceIcon, CrashIcon, ShieldAlertIcon, ForwardChevronIcon, ChevronDownIcon, NpmIcon, DatabaseIcon, DevicePhoneIcon, ShieldCheckIcon, CpuIcon, } from '../NetworkIcons';
|
|
22
|
+
import { LIB_VERSION } from '../../constants';
|
|
23
|
+
import { copyToClipboard } from '../../helpers';
|
|
24
|
+
import { showToast } from '../../helpers/toast';
|
|
22
25
|
const SettingsPanel = () => {
|
|
23
26
|
const { t } = useTranslation();
|
|
24
|
-
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, } = useInspector();
|
|
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, isPerformanceHudEnabled, setIsPerformanceHudEnabled, reduxAutoRefresh, setReduxAutoRefreshState, reduxExpandDepth, setReduxExpandDepth, switchActiveTab, setSelected, setSelectedEvent, setReduxState, crashRecords, maxCrashLogs, setMaxCrashLogs, updateAvailable, latestNpmVersion, } = useInspector();
|
|
25
28
|
const [stagedHeight, setStagedHeight] = useState(modalHeightPercent);
|
|
26
29
|
const [telemetryConsent, setTelemetryConsentState] = useState(true);
|
|
27
30
|
useEffect(() => {
|
|
@@ -60,6 +63,27 @@ const SettingsPanel = () => {
|
|
|
60
63
|
icon: 'logs',
|
|
61
64
|
desc: 'Terminal console logs, warnings, errors & stack traces',
|
|
62
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
|
+
},
|
|
63
87
|
{
|
|
64
88
|
key: 'performance',
|
|
65
89
|
label: 'Performance Tracker',
|
|
@@ -102,6 +126,9 @@ const SettingsPanel = () => {
|
|
|
102
126
|
logs: Boolean(tabVisibility?.logs),
|
|
103
127
|
analytics: Boolean(tabVisibility?.analytics),
|
|
104
128
|
redux: Boolean(tabVisibility?.redux),
|
|
129
|
+
storage: Boolean(tabVisibility?.storage),
|
|
130
|
+
device: Boolean(tabVisibility?.device),
|
|
131
|
+
audit: Boolean(tabVisibility?.audit),
|
|
105
132
|
bundle: Boolean(tabVisibility?.bundle),
|
|
106
133
|
performance: Boolean(tabVisibility?.performance),
|
|
107
134
|
crash: Boolean(tabVisibility?.crash),
|
|
@@ -113,6 +140,9 @@ const SettingsPanel = () => {
|
|
|
113
140
|
logs: Boolean(tabVisibility?.logs),
|
|
114
141
|
analytics: Boolean(tabVisibility?.analytics),
|
|
115
142
|
redux: Boolean(tabVisibility?.redux),
|
|
143
|
+
storage: Boolean(tabVisibility?.storage),
|
|
144
|
+
device: Boolean(tabVisibility?.device),
|
|
145
|
+
audit: Boolean(tabVisibility?.audit),
|
|
116
146
|
bundle: Boolean(tabVisibility?.bundle),
|
|
117
147
|
performance: Boolean(tabVisibility?.performance),
|
|
118
148
|
crash: Boolean(tabVisibility?.crash),
|
|
@@ -220,13 +250,15 @@ const SettingsPanel = () => {
|
|
|
220
250
|
MAX
|
|
221
251
|
</Text>
|
|
222
252
|
</View>
|
|
223
|
-
{opts.numericInput.min !== undefined ||
|
|
253
|
+
{opts.numericInput.min !== undefined ||
|
|
254
|
+
opts.numericInput.max !== undefined ? (<Text style={{
|
|
224
255
|
fontFamily: AppFonts.interRegular,
|
|
225
256
|
fontSize: 10,
|
|
226
257
|
lineHeight: 13,
|
|
227
258
|
color: AppColors.grayTextWeak,
|
|
228
259
|
}}>
|
|
229
|
-
Range: {opts.numericInput.min ?? 1} -
|
|
260
|
+
Range: {opts.numericInput.min ?? 1} -{' '}
|
|
261
|
+
{opts.numericInput.max ?? '∞'}
|
|
230
262
|
</Text>) : null}
|
|
231
263
|
</View>)}
|
|
232
264
|
{opts.picker && (<View style={{
|
|
@@ -269,8 +301,8 @@ const SettingsPanel = () => {
|
|
|
269
301
|
backgroundColor: AppColors.grayBackground,
|
|
270
302
|
}}>
|
|
271
303
|
<ScrollView style={{ flex: 1 }} contentContainerStyle={{ padding: 16, paddingBottom: 100, gap: 14 }} showsVerticalScrollIndicator={false}>
|
|
272
|
-
|
|
273
|
-
|
|
304
|
+
{/* Segmented Top Navigation Sub-Tabs */}
|
|
305
|
+
<View style={{
|
|
274
306
|
flexDirection: 'row',
|
|
275
307
|
backgroundColor: AppColors.primaryLight,
|
|
276
308
|
borderRadius: 12,
|
|
@@ -282,71 +314,104 @@ const SettingsPanel = () => {
|
|
|
282
314
|
shadowRadius: 4,
|
|
283
315
|
shadowOffset: { width: 0, height: 2 },
|
|
284
316
|
}}>
|
|
285
|
-
|
|
317
|
+
{/* Tab 1: Modules & Tabs */}
|
|
318
|
+
<TouchableScale accessible={true} accessibilityRole="tab" accessibilityLabel={t('settings.modulesAndTools')} accessibilityState={{ selected: settingsActiveSubTab === 'module' }} onPress={() => {
|
|
286
319
|
animateNextLayout();
|
|
287
320
|
setSettingsActiveSubTab('module');
|
|
288
321
|
}} style={{
|
|
289
322
|
flex: 1,
|
|
290
|
-
paddingVertical:
|
|
323
|
+
paddingVertical: 8,
|
|
291
324
|
flexDirection: 'row',
|
|
292
325
|
alignItems: 'center',
|
|
293
326
|
justifyContent: 'center',
|
|
294
|
-
gap:
|
|
327
|
+
gap: 5,
|
|
295
328
|
borderRadius: 9,
|
|
296
329
|
backgroundColor: settingsActiveSubTab === 'module'
|
|
297
330
|
? AppColors.purple
|
|
298
331
|
: 'transparent',
|
|
299
332
|
}}>
|
|
300
|
-
|
|
333
|
+
<LayersIcon color={settingsActiveSubTab === 'module'
|
|
301
334
|
? AppColors.white
|
|
302
|
-
: AppColors.grayText} size={
|
|
303
|
-
|
|
335
|
+
: AppColors.grayText} size={12.5}/>
|
|
336
|
+
<Text style={{
|
|
304
337
|
fontFamily: AppFonts.interBold,
|
|
305
|
-
fontSize:
|
|
306
|
-
lineHeight:
|
|
338
|
+
fontSize: 11.5,
|
|
339
|
+
lineHeight: 15,
|
|
307
340
|
color: settingsActiveSubTab === 'module'
|
|
308
341
|
? AppColors.white
|
|
309
342
|
: AppColors.grayText,
|
|
310
343
|
}}>
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
344
|
+
{t('settings.modulesAndTools')}
|
|
345
|
+
</Text>
|
|
346
|
+
</TouchableScale>
|
|
347
|
+
|
|
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>
|
|
314
378
|
|
|
315
|
-
|
|
379
|
+
{/* Tab 3: UI & Appearance */}
|
|
380
|
+
<TouchableScale accessible={true} accessibilityRole="tab" accessibilityLabel={t('settings.uiPreferences')} accessibilityState={{ selected: settingsActiveSubTab === 'ui' }} onPress={() => {
|
|
316
381
|
animateNextLayout();
|
|
317
382
|
setSettingsActiveSubTab('ui');
|
|
318
383
|
}} style={{
|
|
319
384
|
flex: 1,
|
|
320
|
-
paddingVertical:
|
|
385
|
+
paddingVertical: 8,
|
|
321
386
|
flexDirection: 'row',
|
|
322
387
|
alignItems: 'center',
|
|
323
388
|
justifyContent: 'center',
|
|
324
|
-
gap:
|
|
389
|
+
gap: 5,
|
|
325
390
|
borderRadius: 9,
|
|
326
391
|
backgroundColor: settingsActiveSubTab === 'ui'
|
|
327
392
|
? AppColors.purple
|
|
328
393
|
: 'transparent',
|
|
329
394
|
}}>
|
|
330
|
-
|
|
395
|
+
<ScreenIcon color={settingsActiveSubTab === 'ui'
|
|
331
396
|
? AppColors.white
|
|
332
|
-
: AppColors.grayText} size={
|
|
333
|
-
|
|
397
|
+
: AppColors.grayText} size={12.5}/>
|
|
398
|
+
<Text style={{
|
|
334
399
|
fontFamily: AppFonts.interBold,
|
|
335
|
-
fontSize:
|
|
336
|
-
lineHeight:
|
|
400
|
+
fontSize: 11.5,
|
|
401
|
+
lineHeight: 15,
|
|
337
402
|
color: settingsActiveSubTab === 'ui'
|
|
338
403
|
? AppColors.white
|
|
339
404
|
: AppColors.grayText,
|
|
340
405
|
}}>
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
406
|
+
{t('settings.uiPreferences')}
|
|
407
|
+
</Text>
|
|
408
|
+
</TouchableScale>
|
|
409
|
+
</View>
|
|
345
410
|
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
411
|
+
{settingsActiveSubTab === 'module' && (<View style={{ gap: 12 }}>
|
|
412
|
+
{/* Individual Module Cards with Left Checkboxes */}
|
|
413
|
+
<View style={{ gap: 10 }}>
|
|
414
|
+
{allModules.map(moduleItem => {
|
|
350
415
|
const isReduxAvail = isReduxConnected();
|
|
351
416
|
const isAnalyticsAvail = isAnalyticsConnected();
|
|
352
417
|
const isUnavailable = (moduleItem.key === 'redux' && !isReduxAvail) ||
|
|
@@ -384,14 +449,14 @@ const SettingsPanel = () => {
|
|
|
384
449
|
shadowRadius: 5,
|
|
385
450
|
shadowOffset: { width: 0, height: 2 },
|
|
386
451
|
}}>
|
|
387
|
-
|
|
388
|
-
|
|
452
|
+
{/* Top Row: [Checkbox] -> [Icon Tile] -> [Title & Subtitle] */}
|
|
453
|
+
<View style={{
|
|
389
454
|
flexDirection: 'row',
|
|
390
455
|
alignItems: 'flex-start',
|
|
391
456
|
gap: 10,
|
|
392
457
|
}}>
|
|
393
|
-
|
|
394
|
-
|
|
458
|
+
{/* 1. Checkbox on the Left */}
|
|
459
|
+
<TouchableScale accessible={true} accessibilityRole="checkbox" accessibilityLabel={`Select ${moduleItem.label}`} accessibilityState={{
|
|
395
460
|
checked: isChecked,
|
|
396
461
|
disabled: isLocked,
|
|
397
462
|
}} disabled={isLocked} onPress={() => {
|
|
@@ -424,14 +489,14 @@ const SettingsPanel = () => {
|
|
|
424
489
|
shadowRadius: 2,
|
|
425
490
|
elevation: isChecked ? 2 : 0,
|
|
426
491
|
}}>
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
492
|
+
{moduleItem.key === 'apis' ? (<CheckIcon size={12} color={AppColors.blue500}/>) : isChecked ? (<CheckIcon size={12} color={AppColors.white}/>) : isLocked ? (<Svg width={10} height={10} viewBox="0 0 24 24" fill="none">
|
|
493
|
+
<Path d="M7 10V7a5 5 0 0 1 10 0v3" stroke={AppColors.grayText} strokeWidth="2.2" strokeLinecap="round"/>
|
|
494
|
+
<Path d="M5 10h14v9a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1z" fill={AppColors.grayText}/>
|
|
495
|
+
</Svg>) : null}
|
|
496
|
+
</TouchableScale>
|
|
432
497
|
|
|
433
|
-
|
|
434
|
-
|
|
498
|
+
{/* 2. Middle Tap Zone: Icon + Title & Desc */}
|
|
499
|
+
<TouchableScale accessible={true} accessibilityRole="button" accessibilityLabel={`${moduleItem.label} settings`} disabled={isUnavailable} onPress={() => {
|
|
435
500
|
animateNextLayout();
|
|
436
501
|
setSettingsPage(moduleItem.key);
|
|
437
502
|
}} style={{
|
|
@@ -440,8 +505,8 @@ const SettingsPanel = () => {
|
|
|
440
505
|
alignItems: 'flex-start',
|
|
441
506
|
gap: 10,
|
|
442
507
|
}}>
|
|
443
|
-
|
|
444
|
-
|
|
508
|
+
{/* Icon Tile */}
|
|
509
|
+
<View style={{
|
|
445
510
|
width: 36,
|
|
446
511
|
height: 36,
|
|
447
512
|
borderRadius: 10,
|
|
@@ -460,38 +525,47 @@ const SettingsPanel = () => {
|
|
|
460
525
|
justifyContent: 'center',
|
|
461
526
|
marginTop: 1,
|
|
462
527
|
}}>
|
|
463
|
-
|
|
528
|
+
{moduleItem.icon === 'apis' && (<SignalIcon color={isChecked
|
|
464
529
|
? AppColors.purple
|
|
465
530
|
: AppColors.grayTextWeak} size={16}/>)}
|
|
466
|
-
|
|
531
|
+
{moduleItem.icon === 'logs' && (<TerminalIcon color={isChecked
|
|
467
532
|
? AppColors.purple
|
|
468
533
|
: AppColors.grayTextWeak} size={16}/>)}
|
|
469
|
-
|
|
534
|
+
{moduleItem.icon === 'performance' && (<PerformanceIcon color={isChecked
|
|
470
535
|
? AppColors.purple
|
|
471
536
|
: AppColors.grayTextWeak} size={16}/>)}
|
|
472
|
-
|
|
537
|
+
{moduleItem.icon === 'bundle' && (<PackageIcon color={isChecked
|
|
473
538
|
? AppColors.purple
|
|
474
539
|
: AppColors.grayTextWeak} size={16}/>)}
|
|
475
|
-
|
|
540
|
+
{moduleItem.icon === 'crash' && (<CrashIcon color={isChecked
|
|
476
541
|
? AppColors.purple
|
|
477
542
|
: AppColors.grayTextWeak} size={16}/>)}
|
|
478
|
-
|
|
543
|
+
{moduleItem.icon === 'analytics' && (<AnalyticsIcon color={isChecked
|
|
479
544
|
? AppColors.purple
|
|
480
545
|
: AppColors.grayTextWeak} size={16}/>)}
|
|
481
|
-
|
|
546
|
+
{moduleItem.icon === 'storage' && (<DatabaseIcon color={isChecked
|
|
482
547
|
? AppColors.purple
|
|
483
548
|
: AppColors.grayTextWeak} size={16}/>)}
|
|
484
|
-
|
|
549
|
+
{moduleItem.icon === 'device' && (<DevicePhoneIcon color={isChecked
|
|
550
|
+
? AppColors.purple
|
|
551
|
+
: AppColors.grayTextWeak} size={16}/>)}
|
|
552
|
+
{moduleItem.icon === 'audit' && (<ShieldCheckIcon color={isChecked
|
|
553
|
+
? AppColors.purple
|
|
554
|
+
: AppColors.grayTextWeak} size={16}/>)}
|
|
555
|
+
{moduleItem.icon === 'redux' && (<ReduxIcon color={isChecked
|
|
556
|
+
? AppColors.purple
|
|
557
|
+
: AppColors.grayTextWeak} size={16}/>)}
|
|
558
|
+
</View>
|
|
485
559
|
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
560
|
+
{/* Titles & Status Pill */}
|
|
561
|
+
<View style={{ flex: 1, gap: 2 }}>
|
|
562
|
+
<View style={{
|
|
489
563
|
flexDirection: 'row',
|
|
490
564
|
alignItems: 'center',
|
|
491
565
|
gap: 6,
|
|
492
566
|
flexWrap: 'wrap',
|
|
493
567
|
}}>
|
|
494
|
-
|
|
568
|
+
<Text style={{
|
|
495
569
|
fontFamily: AppFonts.interBold,
|
|
496
570
|
fontSize: 14,
|
|
497
571
|
lineHeight: 18,
|
|
@@ -499,11 +573,11 @@ const SettingsPanel = () => {
|
|
|
499
573
|
? AppColors.grayText
|
|
500
574
|
: AppColors.primaryBlack,
|
|
501
575
|
}}>
|
|
502
|
-
|
|
503
|
-
|
|
576
|
+
{moduleItem.label}
|
|
577
|
+
</Text>
|
|
504
578
|
|
|
505
|
-
|
|
506
|
-
|
|
579
|
+
{/* Default Startup Tab Badge */}
|
|
580
|
+
{moduleItem.key === defaultTab &&
|
|
507
581
|
!isUnavailable && (<View style={{
|
|
508
582
|
flexDirection: 'row',
|
|
509
583
|
alignItems: 'center',
|
|
@@ -515,25 +589,25 @@ const SettingsPanel = () => {
|
|
|
515
589
|
borderColor: `${AppColors.purple}2E`,
|
|
516
590
|
gap: 3,
|
|
517
591
|
}}>
|
|
518
|
-
|
|
592
|
+
<View style={{
|
|
519
593
|
width: 4,
|
|
520
594
|
height: 4,
|
|
521
595
|
borderRadius: 2,
|
|
522
596
|
backgroundColor: AppColors.purple,
|
|
523
597
|
}}/>
|
|
524
|
-
|
|
598
|
+
<Text style={{
|
|
525
599
|
fontFamily: AppFonts.interBold,
|
|
526
600
|
fontSize: 8,
|
|
527
601
|
lineHeight: 11,
|
|
528
602
|
color: AppColors.purple,
|
|
529
603
|
letterSpacing: 0.4,
|
|
530
604
|
}}>
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
605
|
+
{t('settings.defaultBadge')}
|
|
606
|
+
</Text>
|
|
607
|
+
</View>)}
|
|
534
608
|
|
|
535
|
-
|
|
536
|
-
|
|
609
|
+
{/* Status Pill */}
|
|
610
|
+
{moduleItem.key === 'apis' ? (<View style={{
|
|
537
611
|
backgroundColor: `${AppColors.blue500}14`,
|
|
538
612
|
borderRadius: 4,
|
|
539
613
|
paddingHorizontal: 5,
|
|
@@ -541,16 +615,16 @@ const SettingsPanel = () => {
|
|
|
541
615
|
borderWidth: 1,
|
|
542
616
|
borderColor: `${AppColors.blue500}33`,
|
|
543
617
|
}}>
|
|
544
|
-
|
|
618
|
+
<Text style={{
|
|
545
619
|
fontFamily: AppFonts.interBold,
|
|
546
620
|
fontSize: 8,
|
|
547
621
|
lineHeight: 11,
|
|
548
622
|
color: AppColors.blue500,
|
|
549
623
|
letterSpacing: 0.3,
|
|
550
624
|
}}>
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
625
|
+
{t('settings.coreBadge')}
|
|
626
|
+
</Text>
|
|
627
|
+
</View>) : isUnavailable ? (<View style={{
|
|
554
628
|
backgroundColor: `${AppColors.amber500}18`,
|
|
555
629
|
borderRadius: 4,
|
|
556
630
|
paddingHorizontal: 5,
|
|
@@ -558,18 +632,18 @@ const SettingsPanel = () => {
|
|
|
558
632
|
borderWidth: 1,
|
|
559
633
|
borderColor: `${AppColors.amber500}35`,
|
|
560
634
|
}}>
|
|
561
|
-
|
|
635
|
+
<Text style={{
|
|
562
636
|
fontFamily: AppFonts.interBold,
|
|
563
637
|
fontSize: 8,
|
|
564
638
|
lineHeight: 11,
|
|
565
639
|
color: AppColors.amber700,
|
|
566
640
|
letterSpacing: 0.3,
|
|
567
641
|
}}>
|
|
568
|
-
|
|
642
|
+
{moduleItem.key === 'redux'
|
|
569
643
|
? t('settings.notConnectedBadge')
|
|
570
644
|
: t('settings.notDetectedBadge')}
|
|
571
|
-
|
|
572
|
-
|
|
645
|
+
</Text>
|
|
646
|
+
</View>) : isChecked ? (<View style={{
|
|
573
647
|
backgroundColor: `${AppColors.liveGreen}18`,
|
|
574
648
|
borderRadius: 4,
|
|
575
649
|
paddingHorizontal: 5,
|
|
@@ -577,16 +651,16 @@ const SettingsPanel = () => {
|
|
|
577
651
|
borderWidth: 1,
|
|
578
652
|
borderColor: `${AppColors.liveGreen}38`,
|
|
579
653
|
}}>
|
|
580
|
-
|
|
654
|
+
<Text style={{
|
|
581
655
|
fontFamily: AppFonts.interBold,
|
|
582
656
|
fontSize: 8,
|
|
583
657
|
lineHeight: 11,
|
|
584
658
|
color: AppColors.green700,
|
|
585
659
|
letterSpacing: 0.3,
|
|
586
660
|
}}>
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
661
|
+
{t('settings.activeBadge')}
|
|
662
|
+
</Text>
|
|
663
|
+
</View>) : (<View style={{
|
|
590
664
|
backgroundColor: `${AppColors.grayTextWeak}18`,
|
|
591
665
|
borderRadius: 4,
|
|
592
666
|
paddingHorizontal: 5,
|
|
@@ -594,33 +668,33 @@ const SettingsPanel = () => {
|
|
|
594
668
|
borderWidth: 1,
|
|
595
669
|
borderColor: `${AppColors.grayTextWeak}2E`,
|
|
596
670
|
}}>
|
|
597
|
-
|
|
671
|
+
<Text style={{
|
|
598
672
|
fontFamily: AppFonts.interBold,
|
|
599
673
|
fontSize: 8,
|
|
600
674
|
lineHeight: 11,
|
|
601
675
|
color: AppColors.grayTextWeak,
|
|
602
676
|
letterSpacing: 0.3,
|
|
603
677
|
}}>
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
678
|
+
{t('settings.dormantBadge')}
|
|
679
|
+
</Text>
|
|
680
|
+
</View>)}
|
|
681
|
+
</View>
|
|
608
682
|
|
|
609
|
-
|
|
683
|
+
<Text style={{
|
|
610
684
|
fontFamily: AppFonts.interRegular,
|
|
611
685
|
fontSize: 11,
|
|
612
686
|
color: AppColors.grayText,
|
|
613
687
|
lineHeight: 15,
|
|
614
688
|
marginTop: 1,
|
|
615
689
|
}}>
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
690
|
+
{moduleItem.desc}
|
|
691
|
+
</Text>
|
|
692
|
+
</View>
|
|
693
|
+
</TouchableScale>
|
|
694
|
+
</View>
|
|
621
695
|
|
|
622
|
-
|
|
623
|
-
|
|
696
|
+
{/* Card Footer: Live Stats + Configure Button */}
|
|
697
|
+
{!isUnavailable && (<View style={{
|
|
624
698
|
flexDirection: 'row',
|
|
625
699
|
alignItems: 'center',
|
|
626
700
|
justifyContent: 'space-between',
|
|
@@ -628,14 +702,14 @@ const SettingsPanel = () => {
|
|
|
628
702
|
borderTopWidth: 1,
|
|
629
703
|
borderTopColor: AppColors.dividerColor,
|
|
630
704
|
}}>
|
|
631
|
-
|
|
632
|
-
|
|
705
|
+
{/* Live Info Pill */}
|
|
706
|
+
<View style={{
|
|
633
707
|
flexDirection: 'row',
|
|
634
708
|
alignItems: 'center',
|
|
635
709
|
gap: 6,
|
|
636
710
|
flex: 1,
|
|
637
711
|
}}>
|
|
638
|
-
|
|
712
|
+
<View style={{
|
|
639
713
|
width: 6,
|
|
640
714
|
height: 6,
|
|
641
715
|
borderRadius: 3,
|
|
@@ -643,18 +717,18 @@ const SettingsPanel = () => {
|
|
|
643
717
|
? AppColors.liveGreen
|
|
644
718
|
: AppColors.grayTextWeak,
|
|
645
719
|
}}/>
|
|
646
|
-
|
|
720
|
+
<Text style={{
|
|
647
721
|
fontFamily: AppFonts.interMedium,
|
|
648
722
|
fontSize: 11,
|
|
649
723
|
color: AppColors.grayText,
|
|
650
724
|
lineHeight: 14,
|
|
651
725
|
}}>
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
726
|
+
{liveStats}
|
|
727
|
+
</Text>
|
|
728
|
+
</View>
|
|
655
729
|
|
|
656
|
-
|
|
657
|
-
|
|
730
|
+
{/* Sleek Configure Button */}
|
|
731
|
+
<TouchableScale accessible={true} accessibilityRole="button" accessibilityLabel={`Configure ${moduleItem.label} settings`} onPress={() => {
|
|
658
732
|
animateNextLayout();
|
|
659
733
|
setSettingsPage(moduleItem.key);
|
|
660
734
|
}} style={{
|
|
@@ -668,24 +742,27 @@ const SettingsPanel = () => {
|
|
|
668
742
|
borderWidth: 1,
|
|
669
743
|
borderColor: `${AppColors.purple}26`,
|
|
670
744
|
}}>
|
|
671
|
-
|
|
672
|
-
|
|
745
|
+
<SettingsIcon color={AppColors.purple} size={11}/>
|
|
746
|
+
<Text style={{
|
|
673
747
|
fontFamily: AppFonts.interBold,
|
|
674
748
|
fontSize: 11,
|
|
675
749
|
lineHeight: 14,
|
|
676
750
|
color: AppColors.purple,
|
|
677
751
|
}}>
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
752
|
+
{t('settings.configure')}
|
|
753
|
+
</Text>
|
|
754
|
+
<ForwardChevronIcon color={AppColors.purple} size={9}/>
|
|
755
|
+
</TouchableScale>
|
|
756
|
+
</View>)}
|
|
757
|
+
</View>);
|
|
684
758
|
})}
|
|
685
|
-
|
|
759
|
+
</View>
|
|
760
|
+
</View>)}
|
|
686
761
|
|
|
687
|
-
|
|
688
|
-
|
|
762
|
+
{/* ─── TAB 2: RAM & RESOURCE LIMITS ──────────────────────────────────── */}
|
|
763
|
+
{settingsActiveSubTab === 'limits' && (<View style={{ gap: 14 }}>
|
|
764
|
+
{/* Section 1: RAM-Based Auto Limits */}
|
|
765
|
+
<View style={{
|
|
689
766
|
backgroundColor: AppColors.primaryLight,
|
|
690
767
|
borderRadius: 14,
|
|
691
768
|
borderWidth: 1,
|
|
@@ -694,29 +771,29 @@ const SettingsPanel = () => {
|
|
|
694
771
|
padding: 14,
|
|
695
772
|
gap: 12,
|
|
696
773
|
}}>
|
|
697
|
-
|
|
774
|
+
<Text style={{
|
|
698
775
|
fontFamily: AppFonts.interBold,
|
|
699
776
|
fontSize: 11,
|
|
700
777
|
lineHeight: 14,
|
|
701
778
|
color: AppColors.grayTextWeak,
|
|
702
779
|
letterSpacing: 0.8,
|
|
703
780
|
}}>
|
|
704
|
-
|
|
705
|
-
|
|
781
|
+
RAM-BASED AUTO TUNING
|
|
782
|
+
</Text>
|
|
706
783
|
|
|
707
|
-
|
|
708
|
-
|
|
784
|
+
{/* Auto RAM Limit Toggle */}
|
|
785
|
+
<View style={{
|
|
709
786
|
flexDirection: 'row',
|
|
710
787
|
alignItems: 'center',
|
|
711
788
|
justifyContent: 'space-between',
|
|
712
789
|
}}>
|
|
713
|
-
|
|
790
|
+
<View style={{
|
|
714
791
|
flexDirection: 'row',
|
|
715
792
|
alignItems: 'center',
|
|
716
793
|
gap: 10,
|
|
717
794
|
flex: 1,
|
|
718
795
|
}}>
|
|
719
|
-
|
|
796
|
+
<View style={{
|
|
720
797
|
width: 32,
|
|
721
798
|
height: 32,
|
|
722
799
|
borderRadius: 8,
|
|
@@ -724,30 +801,31 @@ const SettingsPanel = () => {
|
|
|
724
801
|
alignItems: 'center',
|
|
725
802
|
justifyContent: 'center',
|
|
726
803
|
}}>
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
804
|
+
<PerformanceIcon color={AppColors.purple} size={15}/>
|
|
805
|
+
</View>
|
|
806
|
+
<View style={{ flex: 1 }}>
|
|
807
|
+
<Text style={{
|
|
731
808
|
fontFamily: AppFonts.interBold,
|
|
732
809
|
fontSize: 13.5,
|
|
733
810
|
lineHeight: 18,
|
|
734
811
|
color: AppColors.primaryBlack,
|
|
735
812
|
}}>
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
813
|
+
Auto-Calculate Limits from Device RAM
|
|
814
|
+
</Text>
|
|
815
|
+
<Text style={{
|
|
739
816
|
fontFamily: AppFonts.interRegular,
|
|
740
817
|
fontSize: 11,
|
|
741
818
|
lineHeight: 15,
|
|
742
819
|
color: AppColors.grayText,
|
|
743
820
|
marginTop: 1,
|
|
744
821
|
}}>
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
</
|
|
822
|
+
Automatically set API, Logs, Analytics & Crash limits
|
|
823
|
+
based on available memory
|
|
824
|
+
</Text>
|
|
748
825
|
</View>
|
|
826
|
+
</View>
|
|
749
827
|
|
|
750
|
-
|
|
828
|
+
<TouchableScale accessible={true} accessibilityRole="switch" accessibilityLabel="Toggle auto RAM limit calculation" accessibilityState={{ checked: isAutoRamLimitEnabled }} onPress={() => setIsAutoRamLimitEnabled(prev => !prev)} style={{
|
|
751
829
|
width: 42,
|
|
752
830
|
height: 24,
|
|
753
831
|
borderRadius: 12,
|
|
@@ -756,9 +834,11 @@ const SettingsPanel = () => {
|
|
|
756
834
|
: AppColors.grayBorderSecondary,
|
|
757
835
|
padding: 2,
|
|
758
836
|
justifyContent: 'center',
|
|
759
|
-
alignItems: isAutoRamLimitEnabled
|
|
837
|
+
alignItems: isAutoRamLimitEnabled
|
|
838
|
+
? 'flex-end'
|
|
839
|
+
: 'flex-start',
|
|
760
840
|
}}>
|
|
761
|
-
|
|
841
|
+
<View style={{
|
|
762
842
|
width: 20,
|
|
763
843
|
height: 20,
|
|
764
844
|
borderRadius: 10,
|
|
@@ -768,14 +848,14 @@ const SettingsPanel = () => {
|
|
|
768
848
|
shadowRadius: 2,
|
|
769
849
|
shadowOffset: { width: 0, height: 1 },
|
|
770
850
|
}}/>
|
|
771
|
-
|
|
772
|
-
|
|
851
|
+
</TouchableScale>
|
|
852
|
+
</View>
|
|
773
853
|
|
|
774
|
-
|
|
854
|
+
<View style={{ height: 1, backgroundColor: AppColors.dividerColor }}/>
|
|
775
855
|
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
856
|
+
{/* Device Free RAM Display */}
|
|
857
|
+
<View style={{ flexDirection: 'row', alignItems: 'center', gap: 10 }}>
|
|
858
|
+
<View style={{
|
|
779
859
|
width: 32,
|
|
780
860
|
height: 32,
|
|
781
861
|
borderRadius: 8,
|
|
@@ -785,10 +865,12 @@ const SettingsPanel = () => {
|
|
|
785
865
|
alignItems: 'center',
|
|
786
866
|
justifyContent: 'center',
|
|
787
867
|
}}>
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
868
|
+
<SignalIcon color={isAutoRamLimitEnabled
|
|
869
|
+
? AppColors.purple
|
|
870
|
+
: AppColors.grayTextWeak} size={15}/>
|
|
871
|
+
</View>
|
|
872
|
+
<View style={{ flex: 1 }}>
|
|
873
|
+
<Text style={{
|
|
792
874
|
fontFamily: AppFonts.interBold,
|
|
793
875
|
fontSize: 13.5,
|
|
794
876
|
lineHeight: 18,
|
|
@@ -796,19 +878,19 @@ const SettingsPanel = () => {
|
|
|
796
878
|
? AppColors.primaryBlack
|
|
797
879
|
: AppColors.grayText,
|
|
798
880
|
}}>
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
881
|
+
Detected Free RAM
|
|
882
|
+
</Text>
|
|
883
|
+
<Text style={{
|
|
802
884
|
fontFamily: AppFonts.interRegular,
|
|
803
885
|
fontSize: 11,
|
|
804
886
|
lineHeight: 15,
|
|
805
887
|
color: AppColors.grayText,
|
|
806
888
|
marginTop: 1,
|
|
807
889
|
}}>
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
890
|
+
{deviceFreeRamMb} MB available
|
|
891
|
+
</Text>
|
|
892
|
+
</View>
|
|
893
|
+
<View style={{
|
|
812
894
|
paddingHorizontal: 10,
|
|
813
895
|
paddingVertical: 5,
|
|
814
896
|
borderRadius: 8,
|
|
@@ -820,7 +902,7 @@ const SettingsPanel = () => {
|
|
|
820
902
|
? `${AppColors.purple}26`
|
|
821
903
|
: AppColors.dividerColor,
|
|
822
904
|
}}>
|
|
823
|
-
|
|
905
|
+
<Text style={{
|
|
824
906
|
fontFamily: AppFonts.interBold,
|
|
825
907
|
fontSize: 12,
|
|
826
908
|
lineHeight: 15,
|
|
@@ -828,27 +910,49 @@ const SettingsPanel = () => {
|
|
|
828
910
|
? AppColors.purple
|
|
829
911
|
: AppColors.grayText,
|
|
830
912
|
}}>
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
</View>
|
|
913
|
+
{deviceFreeRamMb} MB
|
|
914
|
+
</Text>
|
|
834
915
|
</View>
|
|
916
|
+
</View>
|
|
835
917
|
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
918
|
+
{/* Current Auto-Calculated Limits Preview */}
|
|
919
|
+
{isAutoRamLimitEnabled && (<View style={{
|
|
920
|
+
marginTop: 8,
|
|
921
|
+
paddingTop: 8,
|
|
922
|
+
borderTopWidth: 1,
|
|
923
|
+
borderTopColor: AppColors.dividerColor,
|
|
924
|
+
gap: 6,
|
|
925
|
+
}}>
|
|
926
|
+
<Text style={{
|
|
839
927
|
fontFamily: AppFonts.interBold,
|
|
840
928
|
fontSize: 11.5,
|
|
841
929
|
lineHeight: 15,
|
|
842
930
|
color: AppColors.purple,
|
|
843
931
|
}}>
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
{
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
932
|
+
Auto Profile: {autoRamProfile.profileName}
|
|
933
|
+
</Text>
|
|
934
|
+
<View style={{ flexDirection: 'row', flexWrap: 'wrap', gap: 8 }}>
|
|
935
|
+
{[
|
|
936
|
+
{
|
|
937
|
+
label: 'APIs',
|
|
938
|
+
value: autoRamProfile.maxNetworkLogs,
|
|
939
|
+
color: AppColors.blue500,
|
|
940
|
+
},
|
|
941
|
+
{
|
|
942
|
+
label: 'Logs',
|
|
943
|
+
value: autoRamProfile.maxConsoleLogs,
|
|
944
|
+
color: AppColors.sky500,
|
|
945
|
+
},
|
|
946
|
+
{
|
|
947
|
+
label: 'Analytics',
|
|
948
|
+
value: autoRamProfile.maxAnalyticsEvents,
|
|
949
|
+
color: AppColors.purple,
|
|
950
|
+
},
|
|
951
|
+
{
|
|
952
|
+
label: 'Crash',
|
|
953
|
+
value: autoRamProfile.maxCrashRecords,
|
|
954
|
+
color: AppColors.errorColor,
|
|
955
|
+
},
|
|
852
956
|
].map(item => (<View key={item.label} style={{
|
|
853
957
|
flexDirection: 'row',
|
|
854
958
|
alignItems: 'center',
|
|
@@ -860,29 +964,63 @@ const SettingsPanel = () => {
|
|
|
860
964
|
borderWidth: 1,
|
|
861
965
|
borderColor: `${item.color}33`,
|
|
862
966
|
}}>
|
|
863
|
-
|
|
967
|
+
<Text style={{
|
|
864
968
|
fontFamily: AppFonts.interBold,
|
|
865
969
|
fontSize: 10.5,
|
|
866
970
|
lineHeight: 14,
|
|
867
971
|
color: item.color,
|
|
868
972
|
}}>
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
973
|
+
{item.label}
|
|
974
|
+
</Text>
|
|
975
|
+
<Text style={{
|
|
872
976
|
fontFamily: AppFonts.interBold,
|
|
873
977
|
fontSize: 10.5,
|
|
874
978
|
lineHeight: 14,
|
|
875
979
|
color: item.color,
|
|
876
980
|
}}>
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
981
|
+
{item.value}
|
|
982
|
+
</Text>
|
|
983
|
+
</View>))}
|
|
984
|
+
</View>
|
|
985
|
+
</View>)}
|
|
986
|
+
|
|
987
|
+
<View style={{ height: 1, backgroundColor: AppColors.dividerColor }}/>
|
|
988
|
+
|
|
989
|
+
{/* Floating Mini Performance HUD Toggle */}
|
|
990
|
+
{renderSettingRow({
|
|
991
|
+
icon: <PerformanceIcon color={AppColors.purple} size={16}/>,
|
|
992
|
+
label: 'Show Mini Performance HUD Overlay',
|
|
993
|
+
description: 'Floating on-screen real-time FPS and Memory/Heap widget',
|
|
994
|
+
right: (<TouchableScale accessible={true} accessibilityRole="switch" accessibilityLabel="Toggle mini performance HUD overlay" accessibilityState={{ checked: isPerformanceHudEnabled }} onPress={() => setIsPerformanceHudEnabled(prev => !prev)} style={{
|
|
995
|
+
width: 42,
|
|
996
|
+
height: 24,
|
|
997
|
+
borderRadius: 12,
|
|
998
|
+
backgroundColor: isPerformanceHudEnabled
|
|
999
|
+
? AppColors.purple
|
|
1000
|
+
: AppColors.grayBorderSecondary,
|
|
1001
|
+
padding: 2,
|
|
1002
|
+
justifyContent: 'center',
|
|
1003
|
+
alignItems: isPerformanceHudEnabled
|
|
1004
|
+
? 'flex-end'
|
|
1005
|
+
: 'flex-start',
|
|
1006
|
+
}}>
|
|
1007
|
+
<View style={{
|
|
1008
|
+
width: 20,
|
|
1009
|
+
height: 20,
|
|
1010
|
+
borderRadius: 10,
|
|
1011
|
+
backgroundColor: AppColors.white,
|
|
1012
|
+
shadowColor: AppColors.black,
|
|
1013
|
+
shadowOpacity: 0.18,
|
|
1014
|
+
shadowRadius: 2,
|
|
1015
|
+
shadowOffset: { width: 0, height: 1 },
|
|
1016
|
+
}}/>
|
|
1017
|
+
</TouchableScale>),
|
|
1018
|
+
isLast: true,
|
|
1019
|
+
})}
|
|
1020
|
+
</View>
|
|
1021
|
+
|
|
1022
|
+
{/* Section 2: Fine-Tuned Resource Limits */}
|
|
1023
|
+
<View style={{
|
|
886
1024
|
backgroundColor: AppColors.primaryLight,
|
|
887
1025
|
borderRadius: 14,
|
|
888
1026
|
borderWidth: 1,
|
|
@@ -891,28 +1029,233 @@ const SettingsPanel = () => {
|
|
|
891
1029
|
padding: 14,
|
|
892
1030
|
gap: 12,
|
|
893
1031
|
}}>
|
|
894
|
-
|
|
1032
|
+
<Text style={{
|
|
895
1033
|
fontFamily: AppFonts.interBold,
|
|
896
1034
|
fontSize: 11,
|
|
897
1035
|
lineHeight: 14,
|
|
898
1036
|
color: AppColors.grayTextWeak,
|
|
899
1037
|
letterSpacing: 0.8,
|
|
900
1038
|
}}>
|
|
901
|
-
|
|
902
|
-
|
|
1039
|
+
MANUAL RESOURCE THRESHOLDS
|
|
1040
|
+
</Text>
|
|
903
1041
|
|
|
904
|
-
|
|
1042
|
+
{renderSettingRow({
|
|
1043
|
+
icon: <SignalIcon color={AppColors.purple} size={16}/>,
|
|
1044
|
+
label: 'Max Network / API Logs',
|
|
1045
|
+
description: 'Maximum in-memory API requests tracked before rotation',
|
|
1046
|
+
numericInput: {
|
|
1047
|
+
value: maxNetworkLogs,
|
|
1048
|
+
onChange: setMaxNetworkLogs,
|
|
1049
|
+
min: 10,
|
|
1050
|
+
max: 100,
|
|
1051
|
+
placeholder: '10 - 100',
|
|
1052
|
+
},
|
|
1053
|
+
})}
|
|
1054
|
+
|
|
1055
|
+
{renderSettingRow({
|
|
1056
|
+
icon: <TerminalIcon color={AppColors.purple} size={16}/>,
|
|
1057
|
+
label: 'Max Console Logs',
|
|
1058
|
+
description: 'Maximum log entries kept across info/warn/error streams',
|
|
1059
|
+
numericInput: {
|
|
1060
|
+
value: maxConsoleLogs,
|
|
1061
|
+
onChange: setMaxConsoleLogs,
|
|
1062
|
+
min: 20,
|
|
1063
|
+
max: 300,
|
|
1064
|
+
placeholder: '20 - 300',
|
|
1065
|
+
},
|
|
1066
|
+
})}
|
|
1067
|
+
|
|
1068
|
+
{renderSettingRow({
|
|
1069
|
+
icon: <AnalyticsIcon color={AppColors.purple} size={16}/>,
|
|
1070
|
+
label: 'Max Analytics Events',
|
|
1071
|
+
description: 'Capacity for captured analytics payloads & telemetry pings',
|
|
1072
|
+
numericInput: {
|
|
1073
|
+
value: maxAnalyticsEventsLimit,
|
|
1074
|
+
onChange: setMaxAnalyticsEventsLimit,
|
|
1075
|
+
min: 20,
|
|
1076
|
+
max: 200,
|
|
1077
|
+
placeholder: '20 - 200',
|
|
1078
|
+
},
|
|
1079
|
+
})}
|
|
1080
|
+
|
|
1081
|
+
{renderSettingRow({
|
|
1082
|
+
icon: <CrashIcon color={AppColors.errorColor} size={16}/>,
|
|
1083
|
+
label: 'Max Crash Records',
|
|
1084
|
+
description: 'Stored fatal exceptions and crash diagnostics logs',
|
|
1085
|
+
numericInput: {
|
|
1086
|
+
value: maxCrashLogs,
|
|
1087
|
+
onChange: setMaxCrashLogs,
|
|
1088
|
+
min: 5,
|
|
1089
|
+
max: 50,
|
|
1090
|
+
placeholder: '5 - 50',
|
|
1091
|
+
},
|
|
1092
|
+
isLast: true,
|
|
1093
|
+
})}
|
|
1094
|
+
</View>
|
|
1095
|
+
|
|
1096
|
+
{/* Section 3: Storage & Cache Cleansing */}
|
|
1097
|
+
<View style={{
|
|
1098
|
+
backgroundColor: AppColors.primaryLight,
|
|
1099
|
+
borderRadius: 14,
|
|
1100
|
+
borderWidth: 1,
|
|
1101
|
+
borderColor: AppColors.grayBorderSecondary,
|
|
1102
|
+
overflow: 'hidden',
|
|
1103
|
+
padding: 14,
|
|
1104
|
+
gap: 12,
|
|
1105
|
+
}}>
|
|
1106
|
+
<Text style={{
|
|
1107
|
+
fontFamily: AppFonts.interBold,
|
|
1108
|
+
fontSize: 11,
|
|
1109
|
+
lineHeight: 14,
|
|
1110
|
+
color: AppColors.grayTextWeak,
|
|
1111
|
+
letterSpacing: 0.8,
|
|
1112
|
+
}}>
|
|
1113
|
+
STORAGE & CACHE CLEANSING
|
|
1114
|
+
</Text>
|
|
1115
|
+
|
|
1116
|
+
{renderSettingRow({
|
|
1117
|
+
icon: <TrashIcon color={AppColors.errorColor} size={16}/>,
|
|
1118
|
+
label: 'Clear All Network Logs',
|
|
1119
|
+
description: `${logs.length} requests in memory`,
|
|
1120
|
+
onPress: () => {
|
|
1121
|
+
clearNetworkLogs();
|
|
1122
|
+
setSelected(null);
|
|
1123
|
+
Alert.alert(t('common.success'), 'Network logs cleared successfully.');
|
|
1124
|
+
},
|
|
1125
|
+
right: (<View style={{
|
|
1126
|
+
paddingHorizontal: 10,
|
|
1127
|
+
paddingVertical: 4,
|
|
1128
|
+
borderRadius: 6,
|
|
1129
|
+
backgroundColor: `${AppColors.errorColor}14`,
|
|
1130
|
+
borderWidth: 1,
|
|
1131
|
+
borderColor: `${AppColors.errorColor}33`,
|
|
1132
|
+
}}>
|
|
1133
|
+
<Text style={{
|
|
1134
|
+
fontFamily: AppFonts.interBold,
|
|
1135
|
+
fontSize: 11,
|
|
1136
|
+
color: AppColors.errorColor,
|
|
1137
|
+
}}>
|
|
1138
|
+
Clear ({logs.length})
|
|
1139
|
+
</Text>
|
|
1140
|
+
</View>),
|
|
1141
|
+
})}
|
|
1142
|
+
|
|
1143
|
+
{renderSettingRow({
|
|
1144
|
+
icon: <TrashIcon color={AppColors.errorColor} size={16}/>,
|
|
1145
|
+
label: 'Clear All Console Logs',
|
|
1146
|
+
description: `${consoleLogs.length} logs in memory`,
|
|
1147
|
+
onPress: () => {
|
|
1148
|
+
clearConsoleLogs();
|
|
1149
|
+
Alert.alert(t('common.success'), 'Console logs cleared successfully.');
|
|
1150
|
+
},
|
|
1151
|
+
right: (<View style={{
|
|
1152
|
+
paddingHorizontal: 10,
|
|
1153
|
+
paddingVertical: 4,
|
|
1154
|
+
borderRadius: 6,
|
|
1155
|
+
backgroundColor: `${AppColors.errorColor}14`,
|
|
1156
|
+
borderWidth: 1,
|
|
1157
|
+
borderColor: `${AppColors.errorColor}33`,
|
|
1158
|
+
}}>
|
|
1159
|
+
<Text style={{
|
|
1160
|
+
fontFamily: AppFonts.interBold,
|
|
1161
|
+
fontSize: 11,
|
|
1162
|
+
color: AppColors.errorColor,
|
|
1163
|
+
}}>
|
|
1164
|
+
Clear ({consoleLogs.length})
|
|
1165
|
+
</Text>
|
|
1166
|
+
</View>),
|
|
1167
|
+
})}
|
|
1168
|
+
|
|
1169
|
+
{renderSettingRow({
|
|
1170
|
+
icon: <TrashIcon color={AppColors.errorColor} size={16}/>,
|
|
1171
|
+
label: 'Clear Analytics Events',
|
|
1172
|
+
description: `${analyticsEvents.length} events recorded`,
|
|
1173
|
+
onPress: () => {
|
|
1174
|
+
clearAnalyticsEvents();
|
|
1175
|
+
setSelectedEvent(null);
|
|
1176
|
+
Alert.alert(t('common.success'), 'Analytics events cleared successfully.');
|
|
1177
|
+
},
|
|
1178
|
+
right: (<View style={{
|
|
1179
|
+
paddingHorizontal: 10,
|
|
1180
|
+
paddingVertical: 4,
|
|
1181
|
+
borderRadius: 6,
|
|
1182
|
+
backgroundColor: `${AppColors.errorColor}14`,
|
|
1183
|
+
borderWidth: 1,
|
|
1184
|
+
borderColor: `${AppColors.errorColor}33`,
|
|
1185
|
+
}}>
|
|
1186
|
+
<Text style={{
|
|
1187
|
+
fontFamily: AppFonts.interBold,
|
|
1188
|
+
fontSize: 11,
|
|
1189
|
+
color: AppColors.errorColor,
|
|
1190
|
+
}}>
|
|
1191
|
+
Clear ({analyticsEvents.length})
|
|
1192
|
+
</Text>
|
|
1193
|
+
</View>),
|
|
1194
|
+
})}
|
|
1195
|
+
|
|
1196
|
+
{renderSettingRow({
|
|
1197
|
+
icon: <TrashIcon color={AppColors.errorColor} size={16}/>,
|
|
1198
|
+
label: 'Clear Crash Logs',
|
|
1199
|
+
description: `${crashRecords.length} crash dumps recorded`,
|
|
1200
|
+
onPress: () => {
|
|
1201
|
+
clearCrashRecords();
|
|
1202
|
+
Alert.alert(t('common.success'), 'Crash records cleared successfully.');
|
|
1203
|
+
},
|
|
1204
|
+
isLast: true,
|
|
1205
|
+
right: (<View style={{
|
|
1206
|
+
paddingHorizontal: 10,
|
|
1207
|
+
paddingVertical: 4,
|
|
1208
|
+
borderRadius: 6,
|
|
1209
|
+
backgroundColor: `${AppColors.errorColor}14`,
|
|
1210
|
+
borderWidth: 1,
|
|
1211
|
+
borderColor: `${AppColors.errorColor}33`,
|
|
1212
|
+
}}>
|
|
1213
|
+
<Text style={{
|
|
1214
|
+
fontFamily: AppFonts.interBold,
|
|
1215
|
+
fontSize: 11,
|
|
1216
|
+
color: AppColors.errorColor,
|
|
1217
|
+
}}>
|
|
1218
|
+
Clear ({crashRecords.length})
|
|
1219
|
+
</Text>
|
|
1220
|
+
</View>),
|
|
1221
|
+
})}
|
|
1222
|
+
</View>
|
|
1223
|
+
</View>)}
|
|
1224
|
+
|
|
1225
|
+
{/* ─── TAB 3: UI & APPEARANCE ────────────────────────────────────────── */}
|
|
1226
|
+
{settingsActiveSubTab === 'ui' && (<View style={{ gap: 14 }}>
|
|
1227
|
+
{/* Section 1: Appearance */}
|
|
1228
|
+
<View style={{
|
|
1229
|
+
backgroundColor: AppColors.primaryLight,
|
|
1230
|
+
borderRadius: 14,
|
|
1231
|
+
borderWidth: 1,
|
|
1232
|
+
borderColor: AppColors.grayBorderSecondary,
|
|
1233
|
+
overflow: 'hidden',
|
|
1234
|
+
padding: 14,
|
|
1235
|
+
gap: 12,
|
|
1236
|
+
}}>
|
|
1237
|
+
<Text style={{
|
|
1238
|
+
fontFamily: AppFonts.interBold,
|
|
1239
|
+
fontSize: 11,
|
|
1240
|
+
lineHeight: 14,
|
|
1241
|
+
color: AppColors.grayTextWeak,
|
|
1242
|
+
letterSpacing: 0.8,
|
|
1243
|
+
}}>
|
|
1244
|
+
{t('settings.appearanceTheme')}
|
|
1245
|
+
</Text>
|
|
1246
|
+
|
|
1247
|
+
<View style={{
|
|
905
1248
|
flexDirection: 'row',
|
|
906
1249
|
alignItems: 'center',
|
|
907
1250
|
justifyContent: 'space-between',
|
|
908
1251
|
}}>
|
|
909
|
-
|
|
1252
|
+
<View style={{
|
|
910
1253
|
flexDirection: 'row',
|
|
911
1254
|
alignItems: 'center',
|
|
912
1255
|
gap: 10,
|
|
913
1256
|
flex: 1,
|
|
914
1257
|
}}>
|
|
915
|
-
|
|
1258
|
+
<View style={{
|
|
916
1259
|
width: 32,
|
|
917
1260
|
height: 32,
|
|
918
1261
|
borderRadius: 8,
|
|
@@ -920,30 +1263,30 @@ const SettingsPanel = () => {
|
|
|
920
1263
|
alignItems: 'center',
|
|
921
1264
|
justifyContent: 'center',
|
|
922
1265
|
}}>
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
1266
|
+
{isDark ? (<SunIcon color={AppColors.purple} size={15}/>) : (<MoonIcon color={AppColors.purple} size={15}/>)}
|
|
1267
|
+
</View>
|
|
1268
|
+
<View style={{ flex: 1 }}>
|
|
1269
|
+
<Text style={{
|
|
927
1270
|
fontFamily: AppFonts.interBold,
|
|
928
1271
|
fontSize: 13.5,
|
|
929
1272
|
lineHeight: 18,
|
|
930
1273
|
color: AppColors.primaryBlack,
|
|
931
1274
|
}}>
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
1275
|
+
{t('settings.general.darkMode')}
|
|
1276
|
+
</Text>
|
|
1277
|
+
<Text style={{
|
|
935
1278
|
fontFamily: AppFonts.interRegular,
|
|
936
1279
|
fontSize: 11,
|
|
937
1280
|
lineHeight: 15,
|
|
938
1281
|
color: AppColors.grayText,
|
|
939
1282
|
marginTop: 1,
|
|
940
1283
|
}}>
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
</View>
|
|
1284
|
+
{t('settings.general.darkModeDescription')}
|
|
1285
|
+
</Text>
|
|
944
1286
|
</View>
|
|
1287
|
+
</View>
|
|
945
1288
|
|
|
946
|
-
|
|
1289
|
+
<TouchableScale accessible={true} accessibilityRole="switch" accessibilityLabel="Toggle Dark Theme" accessibilityState={{ checked: isDark }} onPress={() => {
|
|
947
1290
|
const newTheme = !isDark;
|
|
948
1291
|
setIsDark(newTheme);
|
|
949
1292
|
toggleGlobalTheme(newTheme);
|
|
@@ -958,7 +1301,7 @@ const SettingsPanel = () => {
|
|
|
958
1301
|
justifyContent: 'center',
|
|
959
1302
|
alignItems: isDark ? 'flex-end' : 'flex-start',
|
|
960
1303
|
}}>
|
|
961
|
-
|
|
1304
|
+
<View style={{
|
|
962
1305
|
width: 20,
|
|
963
1306
|
height: 20,
|
|
964
1307
|
borderRadius: 10,
|
|
@@ -968,12 +1311,12 @@ const SettingsPanel = () => {
|
|
|
968
1311
|
shadowRadius: 2,
|
|
969
1312
|
shadowOffset: { width: 0, height: 1 },
|
|
970
1313
|
}}/>
|
|
971
|
-
|
|
972
|
-
</View>
|
|
1314
|
+
</TouchableScale>
|
|
973
1315
|
</View>
|
|
1316
|
+
</View>
|
|
974
1317
|
|
|
975
|
-
|
|
976
|
-
|
|
1318
|
+
{/* Section 2: Window & Layout */}
|
|
1319
|
+
<View style={{
|
|
977
1320
|
backgroundColor: AppColors.primaryLight,
|
|
978
1321
|
borderRadius: 14,
|
|
979
1322
|
borderWidth: 1,
|
|
@@ -982,31 +1325,31 @@ const SettingsPanel = () => {
|
|
|
982
1325
|
padding: 14,
|
|
983
1326
|
gap: 14,
|
|
984
1327
|
}}>
|
|
985
|
-
|
|
1328
|
+
<Text style={{
|
|
986
1329
|
fontFamily: AppFonts.interBold,
|
|
987
1330
|
fontSize: 11,
|
|
988
1331
|
lineHeight: 14,
|
|
989
1332
|
color: AppColors.grayTextWeak,
|
|
990
1333
|
letterSpacing: 0.8,
|
|
991
1334
|
}}>
|
|
992
|
-
|
|
993
|
-
|
|
1335
|
+
{t('settings.windowLayout')}
|
|
1336
|
+
</Text>
|
|
994
1337
|
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
1338
|
+
{/* Modal Height */}
|
|
1339
|
+
<View style={{ gap: 8 }}>
|
|
1340
|
+
<View style={{
|
|
998
1341
|
flexDirection: 'row',
|
|
999
1342
|
alignItems: 'center',
|
|
1000
1343
|
justifyContent: 'space-between',
|
|
1001
1344
|
gap: 10,
|
|
1002
1345
|
}}>
|
|
1003
|
-
|
|
1346
|
+
<View style={{
|
|
1004
1347
|
flexDirection: 'row',
|
|
1005
1348
|
alignItems: 'center',
|
|
1006
1349
|
gap: 10,
|
|
1007
1350
|
flex: 1,
|
|
1008
1351
|
}}>
|
|
1009
|
-
|
|
1352
|
+
<View style={{
|
|
1010
1353
|
width: 32,
|
|
1011
1354
|
height: 32,
|
|
1012
1355
|
borderRadius: 8,
|
|
@@ -1014,30 +1357,30 @@ const SettingsPanel = () => {
|
|
|
1014
1357
|
alignItems: 'center',
|
|
1015
1358
|
justifyContent: 'center',
|
|
1016
1359
|
}}>
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1360
|
+
<ScreenIcon color={AppColors.purple} size={15}/>
|
|
1361
|
+
</View>
|
|
1362
|
+
<View style={{ flex: 1 }}>
|
|
1363
|
+
<Text style={{
|
|
1021
1364
|
fontFamily: AppFonts.interBold,
|
|
1022
1365
|
fontSize: 13.5,
|
|
1023
1366
|
lineHeight: 18,
|
|
1024
1367
|
color: AppColors.primaryBlack,
|
|
1025
1368
|
}}>
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1369
|
+
{t('settings.general.modalHeight')}
|
|
1370
|
+
</Text>
|
|
1371
|
+
<Text style={{
|
|
1029
1372
|
fontFamily: AppFonts.interRegular,
|
|
1030
1373
|
fontSize: 11,
|
|
1031
1374
|
lineHeight: 15,
|
|
1032
1375
|
color: AppColors.grayText,
|
|
1033
1376
|
marginTop: 1,
|
|
1034
1377
|
}}>
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
</View>
|
|
1378
|
+
{t('settings.general.modalHeightDescription')}
|
|
1379
|
+
</Text>
|
|
1038
1380
|
</View>
|
|
1381
|
+
</View>
|
|
1039
1382
|
|
|
1040
|
-
|
|
1383
|
+
{stagedHeight !== modalHeightPercent && (<TouchableScale onPress={() => {
|
|
1041
1384
|
setModalHeightPercent(stagedHeight);
|
|
1042
1385
|
}} style={{
|
|
1043
1386
|
flexDirection: 'row',
|
|
@@ -1053,32 +1396,32 @@ const SettingsPanel = () => {
|
|
|
1053
1396
|
shadowRadius: 2,
|
|
1054
1397
|
elevation: 2,
|
|
1055
1398
|
}}>
|
|
1056
|
-
|
|
1057
|
-
|
|
1399
|
+
<CheckIcon size={11} color={AppColors.white}/>
|
|
1400
|
+
<Text style={{
|
|
1058
1401
|
fontFamily: AppFonts.interBold,
|
|
1059
1402
|
fontSize: 11,
|
|
1060
1403
|
color: AppColors.white,
|
|
1061
|
-
}}>
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1404
|
+
}}>
|
|
1405
|
+
Save ({stagedHeight}%)
|
|
1406
|
+
</Text>
|
|
1407
|
+
</TouchableScale>)}
|
|
1408
|
+
</View>
|
|
1066
1409
|
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
</View>
|
|
1410
|
+
<View style={{ marginTop: 6 }}>
|
|
1411
|
+
<Slider value={stagedHeight} onValueChange={setStagedHeight} min={50} max={90} step={5} quickPresets={[50, 60, 70, 80, 90]} formatLabel={val => `${Math.round(val)}%`}/>
|
|
1070
1412
|
</View>
|
|
1413
|
+
</View>
|
|
1071
1414
|
|
|
1072
|
-
|
|
1415
|
+
<View style={{ height: 1, backgroundColor: AppColors.dividerColor }}/>
|
|
1073
1416
|
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1417
|
+
{/* Modal Animation */}
|
|
1418
|
+
<View style={{ gap: 8 }}>
|
|
1419
|
+
<View style={{
|
|
1077
1420
|
flexDirection: 'row',
|
|
1078
1421
|
alignItems: 'center',
|
|
1079
1422
|
gap: 10,
|
|
1080
1423
|
}}>
|
|
1081
|
-
|
|
1424
|
+
<View style={{
|
|
1082
1425
|
width: 32,
|
|
1083
1426
|
height: 32,
|
|
1084
1427
|
borderRadius: 8,
|
|
@@ -1086,30 +1429,30 @@ const SettingsPanel = () => {
|
|
|
1086
1429
|
alignItems: 'center',
|
|
1087
1430
|
justifyContent: 'center',
|
|
1088
1431
|
}}>
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1432
|
+
<MotionIcon color={AppColors.purple} size={15}/>
|
|
1433
|
+
</View>
|
|
1434
|
+
<View style={{ flex: 1 }}>
|
|
1435
|
+
<Text style={{
|
|
1093
1436
|
fontFamily: AppFonts.interBold,
|
|
1094
1437
|
fontSize: 13.5,
|
|
1095
1438
|
lineHeight: 18,
|
|
1096
1439
|
color: AppColors.primaryBlack,
|
|
1097
1440
|
}}>
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1441
|
+
{t('settings.general.modalAnimation')}
|
|
1442
|
+
</Text>
|
|
1443
|
+
<Text style={{
|
|
1101
1444
|
fontFamily: AppFonts.interRegular,
|
|
1102
1445
|
fontSize: 11,
|
|
1103
1446
|
lineHeight: 15,
|
|
1104
1447
|
color: AppColors.grayText,
|
|
1105
1448
|
marginTop: 1,
|
|
1106
1449
|
}}>
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
</View>
|
|
1450
|
+
{t('settings.general.modalAnimationDescription')}
|
|
1451
|
+
</Text>
|
|
1110
1452
|
</View>
|
|
1453
|
+
</View>
|
|
1111
1454
|
|
|
1112
|
-
|
|
1455
|
+
<View style={{
|
|
1113
1456
|
flexDirection: 'row',
|
|
1114
1457
|
backgroundColor: AppColors.grayBackground,
|
|
1115
1458
|
borderRadius: 10,
|
|
@@ -1117,7 +1460,7 @@ const SettingsPanel = () => {
|
|
|
1117
1460
|
borderWidth: 1,
|
|
1118
1461
|
borderColor: AppColors.dividerColor,
|
|
1119
1462
|
}}>
|
|
1120
|
-
|
|
1463
|
+
{[
|
|
1121
1464
|
{ key: 'slide', label: 'Slide Up' },
|
|
1122
1465
|
{ key: 'fade', label: 'Fade' },
|
|
1123
1466
|
{ key: 'none', label: 'None' },
|
|
@@ -1132,7 +1475,7 @@ const SettingsPanel = () => {
|
|
|
1132
1475
|
? AppColors.purple
|
|
1133
1476
|
: 'transparent',
|
|
1134
1477
|
}}>
|
|
1135
|
-
|
|
1478
|
+
<Text style={{
|
|
1136
1479
|
fontFamily: AppFonts.interBold,
|
|
1137
1480
|
fontSize: 11.5,
|
|
1138
1481
|
lineHeight: 15,
|
|
@@ -1140,16 +1483,16 @@ const SettingsPanel = () => {
|
|
|
1140
1483
|
? AppColors.white
|
|
1141
1484
|
: AppColors.grayText,
|
|
1142
1485
|
}}>
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1486
|
+
{opt.label}
|
|
1487
|
+
</Text>
|
|
1488
|
+
</TouchableScale>);
|
|
1146
1489
|
})}
|
|
1147
|
-
</View>
|
|
1148
1490
|
</View>
|
|
1149
1491
|
</View>
|
|
1492
|
+
</View>
|
|
1150
1493
|
|
|
1151
|
-
|
|
1152
|
-
|
|
1494
|
+
{/* Section 3: Default Startup Tab */}
|
|
1495
|
+
<View style={{
|
|
1153
1496
|
backgroundColor: AppColors.primaryLight,
|
|
1154
1497
|
borderRadius: 14,
|
|
1155
1498
|
borderWidth: 1,
|
|
@@ -1158,22 +1501,22 @@ const SettingsPanel = () => {
|
|
|
1158
1501
|
padding: 14,
|
|
1159
1502
|
gap: 12,
|
|
1160
1503
|
}}>
|
|
1161
|
-
|
|
1504
|
+
<Text style={{
|
|
1162
1505
|
fontFamily: AppFonts.interBold,
|
|
1163
1506
|
fontSize: 11,
|
|
1164
1507
|
lineHeight: 14,
|
|
1165
1508
|
color: AppColors.grayTextWeak,
|
|
1166
1509
|
letterSpacing: 0.8,
|
|
1167
1510
|
}}>
|
|
1168
|
-
|
|
1169
|
-
|
|
1511
|
+
{t('settings.startupDefault')}
|
|
1512
|
+
</Text>
|
|
1170
1513
|
|
|
1171
|
-
|
|
1514
|
+
<View style={{
|
|
1172
1515
|
flexDirection: 'row',
|
|
1173
1516
|
alignItems: 'center',
|
|
1174
1517
|
gap: 10,
|
|
1175
1518
|
}}>
|
|
1176
|
-
|
|
1519
|
+
<View style={{
|
|
1177
1520
|
width: 32,
|
|
1178
1521
|
height: 32,
|
|
1179
1522
|
borderRadius: 8,
|
|
@@ -1181,32 +1524,32 @@ const SettingsPanel = () => {
|
|
|
1181
1524
|
alignItems: 'center',
|
|
1182
1525
|
justifyContent: 'center',
|
|
1183
1526
|
}}>
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1527
|
+
<LayersIcon color={AppColors.purple} size={15}/>
|
|
1528
|
+
</View>
|
|
1529
|
+
<View style={{ flex: 1 }}>
|
|
1530
|
+
<Text style={{
|
|
1188
1531
|
fontFamily: AppFonts.interBold,
|
|
1189
1532
|
fontSize: 13.5,
|
|
1190
1533
|
lineHeight: 18,
|
|
1191
1534
|
color: AppColors.primaryBlack,
|
|
1192
1535
|
}}>
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1536
|
+
{t('settings.general.defaultOpeningTab')}
|
|
1537
|
+
</Text>
|
|
1538
|
+
<Text style={{
|
|
1196
1539
|
fontFamily: AppFonts.interRegular,
|
|
1197
1540
|
fontSize: 11,
|
|
1198
1541
|
lineHeight: 15,
|
|
1199
1542
|
color: AppColors.grayText,
|
|
1200
1543
|
marginTop: 1,
|
|
1201
1544
|
}}>
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
</View>
|
|
1545
|
+
{t('settings.general.defaultOpeningTabDesc')}
|
|
1546
|
+
</Text>
|
|
1205
1547
|
</View>
|
|
1548
|
+
</View>
|
|
1206
1549
|
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1550
|
+
{/* Sleek Interactive Dropdown Picker */}
|
|
1551
|
+
<View style={{ marginTop: 6, gap: 6 }}>
|
|
1552
|
+
<TouchableScale accessible={true} accessibilityRole="button" accessibilityLabel={`Default opening tab: ${allModules.find(m => m.key === defaultTab)?.label || 'APIs'}`} onPress={() => setIsDefaultTabDropdownOpen(prev => !prev)} style={{
|
|
1210
1553
|
flexDirection: 'row',
|
|
1211
1554
|
alignItems: 'center',
|
|
1212
1555
|
justifyContent: 'space-between',
|
|
@@ -1219,53 +1562,54 @@ const SettingsPanel = () => {
|
|
|
1219
1562
|
paddingHorizontal: 14,
|
|
1220
1563
|
paddingVertical: 11,
|
|
1221
1564
|
}}>
|
|
1222
|
-
|
|
1565
|
+
<View style={{
|
|
1223
1566
|
flexDirection: 'row',
|
|
1224
1567
|
alignItems: 'center',
|
|
1225
1568
|
gap: 10,
|
|
1226
1569
|
flex: 1,
|
|
1227
1570
|
}}>
|
|
1228
|
-
|
|
1571
|
+
<View style={{
|
|
1229
1572
|
width: 8,
|
|
1230
1573
|
height: 8,
|
|
1231
1574
|
borderRadius: 4,
|
|
1232
1575
|
backgroundColor: AppColors.purple,
|
|
1233
1576
|
}}/>
|
|
1234
|
-
|
|
1577
|
+
<Text style={{
|
|
1235
1578
|
fontFamily: AppFonts.interBold,
|
|
1236
1579
|
fontSize: 13.5,
|
|
1237
1580
|
lineHeight: 18,
|
|
1238
1581
|
color: AppColors.primaryBlack,
|
|
1239
1582
|
}}>
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1583
|
+
{allModules.find(m => m.key === defaultTab)?.label ||
|
|
1584
|
+
'APIs (Network)'}
|
|
1585
|
+
</Text>
|
|
1586
|
+
<View style={{
|
|
1243
1587
|
backgroundColor: `${AppColors.purple}14`,
|
|
1244
1588
|
paddingHorizontal: 6,
|
|
1245
1589
|
paddingVertical: 1.5,
|
|
1246
1590
|
borderRadius: 6,
|
|
1247
1591
|
}}>
|
|
1248
|
-
|
|
1592
|
+
<Text style={{
|
|
1249
1593
|
fontFamily: AppFonts.interBold,
|
|
1250
1594
|
fontSize: 8.5,
|
|
1251
1595
|
color: AppColors.purple,
|
|
1252
1596
|
}}>
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
</View>
|
|
1597
|
+
DEFAULT
|
|
1598
|
+
</Text>
|
|
1256
1599
|
</View>
|
|
1600
|
+
</View>
|
|
1257
1601
|
|
|
1258
|
-
|
|
1602
|
+
<View style={{
|
|
1259
1603
|
transform: [
|
|
1260
1604
|
{ rotate: isDefaultTabDropdownOpen ? '180deg' : '0deg' },
|
|
1261
1605
|
],
|
|
1262
1606
|
}}>
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1607
|
+
<ChevronDownIcon color={AppColors.grayText} size={15}/>
|
|
1608
|
+
</View>
|
|
1609
|
+
</TouchableScale>
|
|
1266
1610
|
|
|
1267
|
-
|
|
1268
|
-
|
|
1611
|
+
{/* Dropdown Options List */}
|
|
1612
|
+
{isDefaultTabDropdownOpen && (<View style={{
|
|
1269
1613
|
backgroundColor: AppColors.primaryLight,
|
|
1270
1614
|
borderRadius: 10,
|
|
1271
1615
|
borderWidth: 1,
|
|
@@ -1277,7 +1621,7 @@ const SettingsPanel = () => {
|
|
|
1277
1621
|
shadowOffset: { width: 0, height: 3 },
|
|
1278
1622
|
elevation: 4,
|
|
1279
1623
|
}}>
|
|
1280
|
-
|
|
1624
|
+
{allModules
|
|
1281
1625
|
.filter(tab => tab.key === 'apis' ||
|
|
1282
1626
|
stagedTabVisibility?.[tab.key] ||
|
|
1283
1627
|
tabVisibility?.[tab.key])
|
|
@@ -1299,12 +1643,12 @@ const SettingsPanel = () => {
|
|
|
1299
1643
|
borderBottomWidth: isLast ? 0 : 1,
|
|
1300
1644
|
borderBottomColor: AppColors.dividerColor,
|
|
1301
1645
|
}}>
|
|
1302
|
-
|
|
1646
|
+
<View style={{
|
|
1303
1647
|
flexDirection: 'row',
|
|
1304
1648
|
alignItems: 'center',
|
|
1305
1649
|
gap: 10,
|
|
1306
1650
|
}}>
|
|
1307
|
-
|
|
1651
|
+
<View style={{
|
|
1308
1652
|
width: 6,
|
|
1309
1653
|
height: 6,
|
|
1310
1654
|
borderRadius: 3,
|
|
@@ -1312,7 +1656,7 @@ const SettingsPanel = () => {
|
|
|
1312
1656
|
? AppColors.purple
|
|
1313
1657
|
: AppColors.grayTextWeak,
|
|
1314
1658
|
}}/>
|
|
1315
|
-
|
|
1659
|
+
<Text style={{
|
|
1316
1660
|
fontFamily: isActive
|
|
1317
1661
|
? AppFonts.interBold
|
|
1318
1662
|
: AppFonts.interMedium,
|
|
@@ -1321,18 +1665,18 @@ const SettingsPanel = () => {
|
|
|
1321
1665
|
? AppColors.purple
|
|
1322
1666
|
: AppColors.primaryBlack,
|
|
1323
1667
|
}}>
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1668
|
+
{tab.label}
|
|
1669
|
+
</Text>
|
|
1670
|
+
</View>
|
|
1671
|
+
{isActive && (<CheckIcon size={14} color={AppColors.purple}/>)}
|
|
1672
|
+
</TouchableScale>);
|
|
1329
1673
|
})}
|
|
1330
|
-
|
|
1331
|
-
</View>
|
|
1674
|
+
</View>)}
|
|
1332
1675
|
</View>
|
|
1676
|
+
</View>
|
|
1333
1677
|
|
|
1334
|
-
|
|
1335
|
-
|
|
1678
|
+
{/* Section 4: Privacy & Diagnostics */}
|
|
1679
|
+
<View style={{
|
|
1336
1680
|
backgroundColor: AppColors.primaryLight,
|
|
1337
1681
|
borderRadius: 14,
|
|
1338
1682
|
borderWidth: 1,
|
|
@@ -1341,29 +1685,29 @@ const SettingsPanel = () => {
|
|
|
1341
1685
|
padding: 14,
|
|
1342
1686
|
gap: 12,
|
|
1343
1687
|
}}>
|
|
1344
|
-
|
|
1688
|
+
<Text style={{
|
|
1345
1689
|
fontFamily: AppFonts.interBold,
|
|
1346
1690
|
fontSize: 11,
|
|
1347
1691
|
lineHeight: 14,
|
|
1348
1692
|
color: AppColors.grayTextWeak,
|
|
1349
1693
|
letterSpacing: 0.8,
|
|
1350
1694
|
}}>
|
|
1351
|
-
|
|
1352
|
-
|
|
1695
|
+
PRIVACY & ANONYMOUS DIAGNOSTICS
|
|
1696
|
+
</Text>
|
|
1353
1697
|
|
|
1354
|
-
|
|
1698
|
+
<View style={{
|
|
1355
1699
|
flexDirection: 'row',
|
|
1356
1700
|
alignItems: 'center',
|
|
1357
1701
|
justifyContent: 'space-between',
|
|
1358
1702
|
}}>
|
|
1359
|
-
|
|
1703
|
+
<View style={{
|
|
1360
1704
|
flexDirection: 'row',
|
|
1361
1705
|
alignItems: 'center',
|
|
1362
1706
|
gap: 10,
|
|
1363
1707
|
flex: 1,
|
|
1364
1708
|
marginRight: 10,
|
|
1365
1709
|
}}>
|
|
1366
|
-
|
|
1710
|
+
<View style={{
|
|
1367
1711
|
width: 32,
|
|
1368
1712
|
height: 32,
|
|
1369
1713
|
borderRadius: 8,
|
|
@@ -1371,30 +1715,32 @@ const SettingsPanel = () => {
|
|
|
1371
1715
|
alignItems: 'center',
|
|
1372
1716
|
justifyContent: 'center',
|
|
1373
1717
|
}}>
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1718
|
+
<ShieldAlertIcon color={AppColors.purple} size={15}/>
|
|
1719
|
+
</View>
|
|
1720
|
+
<View style={{ flex: 1 }}>
|
|
1721
|
+
<Text style={{
|
|
1378
1722
|
fontFamily: AppFonts.interBold,
|
|
1379
1723
|
fontSize: 13.5,
|
|
1380
1724
|
lineHeight: 18,
|
|
1381
1725
|
color: AppColors.primaryBlack,
|
|
1382
1726
|
}}>
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1727
|
+
Help Improve In-App Inspector
|
|
1728
|
+
</Text>
|
|
1729
|
+
<Text style={{
|
|
1386
1730
|
fontFamily: AppFonts.interRegular,
|
|
1387
1731
|
fontSize: 11,
|
|
1388
1732
|
lineHeight: 15,
|
|
1389
1733
|
color: AppColors.grayText,
|
|
1390
1734
|
marginTop: 1,
|
|
1391
1735
|
}}>
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1736
|
+
Share non-identifiable technical metrics (RN version, JS
|
|
1737
|
+
engine, device model). No user data or network payloads
|
|
1738
|
+
are captured.
|
|
1739
|
+
</Text>
|
|
1395
1740
|
</View>
|
|
1741
|
+
</View>
|
|
1396
1742
|
|
|
1397
|
-
|
|
1743
|
+
<TouchableScale accessible={true} accessibilityRole="switch" accessibilityLabel="Toggle Anonymous Telemetry" accessibilityState={{ checked: telemetryConsent }} onPress={handleToggleTelemetry} style={{
|
|
1398
1744
|
width: 42,
|
|
1399
1745
|
height: 24,
|
|
1400
1746
|
borderRadius: 12,
|
|
@@ -1405,7 +1751,7 @@ const SettingsPanel = () => {
|
|
|
1405
1751
|
justifyContent: 'center',
|
|
1406
1752
|
alignItems: telemetryConsent ? 'flex-end' : 'flex-start',
|
|
1407
1753
|
}}>
|
|
1408
|
-
|
|
1754
|
+
<View style={{
|
|
1409
1755
|
width: 20,
|
|
1410
1756
|
height: 20,
|
|
1411
1757
|
borderRadius: 10,
|
|
@@ -1415,12 +1761,12 @@ const SettingsPanel = () => {
|
|
|
1415
1761
|
shadowRadius: 2,
|
|
1416
1762
|
shadowOffset: { width: 0, height: 1 },
|
|
1417
1763
|
}}/>
|
|
1418
|
-
|
|
1419
|
-
</View>
|
|
1764
|
+
</TouchableScale>
|
|
1420
1765
|
</View>
|
|
1766
|
+
</View>
|
|
1421
1767
|
|
|
1422
|
-
|
|
1423
|
-
|
|
1768
|
+
{/* Section 5: Notifications & Toasts */}
|
|
1769
|
+
<View style={{
|
|
1424
1770
|
backgroundColor: AppColors.primaryLight,
|
|
1425
1771
|
borderRadius: 14,
|
|
1426
1772
|
borderWidth: 1,
|
|
@@ -1429,29 +1775,29 @@ const SettingsPanel = () => {
|
|
|
1429
1775
|
padding: 14,
|
|
1430
1776
|
gap: 12,
|
|
1431
1777
|
}}>
|
|
1432
|
-
|
|
1778
|
+
<Text style={{
|
|
1433
1779
|
fontFamily: AppFonts.interBold,
|
|
1434
1780
|
fontSize: 11,
|
|
1435
1781
|
lineHeight: 14,
|
|
1436
1782
|
color: AppColors.grayTextWeak,
|
|
1437
1783
|
letterSpacing: 0.8,
|
|
1438
1784
|
}}>
|
|
1439
|
-
|
|
1440
|
-
|
|
1785
|
+
NOTIFICATIONS & TOASTS
|
|
1786
|
+
</Text>
|
|
1441
1787
|
|
|
1442
|
-
|
|
1788
|
+
<View style={{
|
|
1443
1789
|
flexDirection: 'row',
|
|
1444
1790
|
alignItems: 'center',
|
|
1445
1791
|
justifyContent: 'space-between',
|
|
1446
1792
|
}}>
|
|
1447
|
-
|
|
1793
|
+
<View style={{
|
|
1448
1794
|
flexDirection: 'row',
|
|
1449
1795
|
alignItems: 'center',
|
|
1450
1796
|
gap: 10,
|
|
1451
1797
|
flex: 1,
|
|
1452
1798
|
marginRight: 10,
|
|
1453
1799
|
}}>
|
|
1454
|
-
|
|
1800
|
+
<View style={{
|
|
1455
1801
|
width: 32,
|
|
1456
1802
|
height: 32,
|
|
1457
1803
|
borderRadius: 8,
|
|
@@ -1459,30 +1805,31 @@ const SettingsPanel = () => {
|
|
|
1459
1805
|
alignItems: 'center',
|
|
1460
1806
|
justifyContent: 'center',
|
|
1461
1807
|
}}>
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1808
|
+
<PackageIcon color={AppColors.purple} size={15}/>
|
|
1809
|
+
</View>
|
|
1810
|
+
<View style={{ flex: 1 }}>
|
|
1811
|
+
<Text style={{
|
|
1466
1812
|
fontFamily: AppFonts.interBold,
|
|
1467
1813
|
fontSize: 13.5,
|
|
1468
1814
|
lineHeight: 18,
|
|
1469
1815
|
color: AppColors.primaryBlack,
|
|
1470
1816
|
}}>
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1817
|
+
NPM Update Toast
|
|
1818
|
+
</Text>
|
|
1819
|
+
<Text style={{
|
|
1474
1820
|
fontFamily: AppFonts.interRegular,
|
|
1475
1821
|
fontSize: 11,
|
|
1476
1822
|
lineHeight: 15,
|
|
1477
1823
|
color: AppColors.grayText,
|
|
1478
1824
|
marginTop: 1,
|
|
1479
1825
|
}}>
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
</
|
|
1826
|
+
Show a floating toast banner with countdown progress when
|
|
1827
|
+
a newer release is published on npm.
|
|
1828
|
+
</Text>
|
|
1483
1829
|
</View>
|
|
1830
|
+
</View>
|
|
1484
1831
|
|
|
1485
|
-
|
|
1832
|
+
<TouchableScale accessible={true} accessibilityRole="switch" accessibilityLabel="Toggle NPM Update Toast" accessibilityState={{ checked: showUpdateToast }} onPress={() => setShowUpdateToast(prev => !prev)} style={{
|
|
1486
1833
|
width: 42,
|
|
1487
1834
|
height: 24,
|
|
1488
1835
|
borderRadius: 12,
|
|
@@ -1493,7 +1840,7 @@ const SettingsPanel = () => {
|
|
|
1493
1840
|
justifyContent: 'center',
|
|
1494
1841
|
alignItems: showUpdateToast ? 'flex-end' : 'flex-start',
|
|
1495
1842
|
}}>
|
|
1496
|
-
|
|
1843
|
+
<View style={{
|
|
1497
1844
|
width: 20,
|
|
1498
1845
|
height: 20,
|
|
1499
1846
|
borderRadius: 10,
|
|
@@ -1503,15 +1850,137 @@ const SettingsPanel = () => {
|
|
|
1503
1850
|
shadowRadius: 2,
|
|
1504
1851
|
shadowOffset: { width: 0, height: 1 },
|
|
1505
1852
|
}}/>
|
|
1506
|
-
|
|
1853
|
+
</TouchableScale>
|
|
1854
|
+
</View>
|
|
1855
|
+
</View>
|
|
1856
|
+
|
|
1857
|
+
{/* Section 6: NPM Package & Updates */}
|
|
1858
|
+
<View style={{
|
|
1859
|
+
backgroundColor: AppColors.primaryLight,
|
|
1860
|
+
borderRadius: 14,
|
|
1861
|
+
borderWidth: 1,
|
|
1862
|
+
borderColor: AppColors.grayBorderSecondary,
|
|
1863
|
+
overflow: 'hidden',
|
|
1864
|
+
padding: 14,
|
|
1865
|
+
gap: 12,
|
|
1866
|
+
}}>
|
|
1867
|
+
<Text style={{
|
|
1868
|
+
fontFamily: AppFonts.interBold,
|
|
1869
|
+
fontSize: 11,
|
|
1870
|
+
lineHeight: 14,
|
|
1871
|
+
color: AppColors.grayTextWeak,
|
|
1872
|
+
letterSpacing: 0.8,
|
|
1873
|
+
}}>
|
|
1874
|
+
PACKAGE VERSION & UPDATES
|
|
1875
|
+
</Text>
|
|
1876
|
+
|
|
1877
|
+
<View style={{
|
|
1878
|
+
flexDirection: 'row',
|
|
1879
|
+
alignItems: 'center',
|
|
1880
|
+
justifyContent: 'space-between',
|
|
1881
|
+
}}>
|
|
1882
|
+
<View style={{
|
|
1883
|
+
flexDirection: 'row',
|
|
1884
|
+
alignItems: 'center',
|
|
1885
|
+
gap: 10,
|
|
1886
|
+
flex: 1,
|
|
1887
|
+
marginRight: 8,
|
|
1888
|
+
}}>
|
|
1889
|
+
<View style={{
|
|
1890
|
+
width: 32,
|
|
1891
|
+
height: 32,
|
|
1892
|
+
borderRadius: 8,
|
|
1893
|
+
backgroundColor: '#CB383715',
|
|
1894
|
+
alignItems: 'center',
|
|
1895
|
+
justifyContent: 'center',
|
|
1896
|
+
}}>
|
|
1897
|
+
<NpmIcon color="#CB3837" size={16}/>
|
|
1898
|
+
</View>
|
|
1899
|
+
<View style={{ flex: 1 }}>
|
|
1900
|
+
<View style={{
|
|
1901
|
+
flexDirection: 'row',
|
|
1902
|
+
alignItems: 'center',
|
|
1903
|
+
gap: 6,
|
|
1904
|
+
}}>
|
|
1905
|
+
<Text style={{
|
|
1906
|
+
fontFamily: AppFonts.interBold,
|
|
1907
|
+
fontSize: 13.5,
|
|
1908
|
+
lineHeight: 18,
|
|
1909
|
+
color: AppColors.primaryBlack,
|
|
1910
|
+
}}>
|
|
1911
|
+
v{LIB_VERSION}
|
|
1912
|
+
</Text>
|
|
1913
|
+
{updateAvailable ? (<View style={{
|
|
1914
|
+
backgroundColor: '#F59E0B20',
|
|
1915
|
+
paddingHorizontal: 6,
|
|
1916
|
+
paddingVertical: 1.5,
|
|
1917
|
+
borderRadius: 5,
|
|
1918
|
+
borderWidth: 1,
|
|
1919
|
+
borderColor: '#F59E0B60',
|
|
1920
|
+
}}>
|
|
1921
|
+
<Text style={{
|
|
1922
|
+
fontFamily: AppFonts.interBold,
|
|
1923
|
+
fontSize: 9.5,
|
|
1924
|
+
color: '#D97706',
|
|
1925
|
+
}}>
|
|
1926
|
+
v{latestNpmVersion} Available ⚡
|
|
1927
|
+
</Text>
|
|
1928
|
+
</View>) : (<View style={{
|
|
1929
|
+
backgroundColor: `${AppColors.emerald500}20`,
|
|
1930
|
+
paddingHorizontal: 6,
|
|
1931
|
+
paddingVertical: 1.5,
|
|
1932
|
+
borderRadius: 5,
|
|
1933
|
+
borderWidth: 1,
|
|
1934
|
+
borderColor: `${AppColors.emerald500}50`,
|
|
1935
|
+
}}>
|
|
1936
|
+
<Text style={{
|
|
1937
|
+
fontFamily: AppFonts.interBold,
|
|
1938
|
+
fontSize: 9.5,
|
|
1939
|
+
color: AppColors.emerald600,
|
|
1940
|
+
}}>
|
|
1941
|
+
Up to date
|
|
1942
|
+
</Text>
|
|
1943
|
+
</View>)}
|
|
1944
|
+
</View>
|
|
1945
|
+
<Text style={{
|
|
1946
|
+
fontFamily: AppFonts.interRegular,
|
|
1947
|
+
fontSize: 11,
|
|
1948
|
+
lineHeight: 15,
|
|
1949
|
+
color: AppColors.grayText,
|
|
1950
|
+
marginTop: 1,
|
|
1951
|
+
}}>
|
|
1952
|
+
{updateAvailable
|
|
1953
|
+
? `A newer version (v${latestNpmVersion}) is available on npm registry.`
|
|
1954
|
+
: 'You are running the latest version from npm registry.'}
|
|
1955
|
+
</Text>
|
|
1956
|
+
</View>
|
|
1507
1957
|
</View>
|
|
1958
|
+
|
|
1959
|
+
{updateAvailable && (<TouchableScale onPress={() => {
|
|
1960
|
+
copyToClipboard('npm install react-native-inapp-inspector@latest', 'Install Command');
|
|
1961
|
+
showToast('Copied npm install command!');
|
|
1962
|
+
}} style={{
|
|
1963
|
+
backgroundColor: AppColors.purple,
|
|
1964
|
+
paddingVertical: 6,
|
|
1965
|
+
paddingHorizontal: 10,
|
|
1966
|
+
borderRadius: 8,
|
|
1967
|
+
}}>
|
|
1968
|
+
<Text style={{
|
|
1969
|
+
fontFamily: AppFonts.interBold,
|
|
1970
|
+
fontSize: 11,
|
|
1971
|
+
color: AppColors.white,
|
|
1972
|
+
}}>
|
|
1973
|
+
Copy Upgrade
|
|
1974
|
+
</Text>
|
|
1975
|
+
</TouchableScale>)}
|
|
1508
1976
|
</View>
|
|
1509
|
-
</View>
|
|
1510
|
-
|
|
1511
|
-
|
|
1977
|
+
</View>
|
|
1978
|
+
</View>)}
|
|
1979
|
+
<View style={{ height: 48 }}/>
|
|
1980
|
+
</ScrollView>
|
|
1512
1981
|
|
|
1513
|
-
|
|
1514
|
-
|
|
1982
|
+
{/* Bottom Sticky Action Bar for Save Changes */}
|
|
1983
|
+
{settingsActiveSubTab === 'module' && (<View style={{
|
|
1515
1984
|
paddingHorizontal: 16,
|
|
1516
1985
|
paddingTop: 12,
|
|
1517
1986
|
paddingBottom: Platform.OS === 'ios' ? 36 : 24,
|
|
@@ -1527,16 +1996,16 @@ const SettingsPanel = () => {
|
|
|
1527
1996
|
shadowOffset: { width: 0, height: -3 },
|
|
1528
1997
|
elevation: 8,
|
|
1529
1998
|
}}>
|
|
1530
|
-
|
|
1531
|
-
|
|
1999
|
+
<View style={{ flex: 1 }}>
|
|
2000
|
+
<Text style={{
|
|
1532
2001
|
fontFamily: AppFonts.interBold,
|
|
1533
2002
|
fontSize: 13,
|
|
1534
2003
|
lineHeight: 17,
|
|
1535
2004
|
color: AppColors.primaryBlack,
|
|
1536
2005
|
}}>
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
2006
|
+
{stagedActiveCount} of {allModules.length} Modules Active
|
|
2007
|
+
</Text>
|
|
2008
|
+
<Text style={{
|
|
1540
2009
|
fontFamily: AppFonts.interRegular,
|
|
1541
2010
|
fontSize: 11,
|
|
1542
2011
|
lineHeight: 15,
|
|
@@ -1545,13 +2014,13 @@ const SettingsPanel = () => {
|
|
|
1545
2014
|
: AppColors.grayText,
|
|
1546
2015
|
marginTop: 1,
|
|
1547
2016
|
}}>
|
|
1548
|
-
|
|
2017
|
+
{hasUnsavedChanges
|
|
1549
2018
|
? t('settings.unsavedPending')
|
|
1550
2019
|
: t('settings.allSynchronized')}
|
|
1551
|
-
|
|
1552
|
-
|
|
2020
|
+
</Text>
|
|
2021
|
+
</View>
|
|
1553
2022
|
|
|
1554
|
-
|
|
2023
|
+
<TouchableScale accessible={true} accessibilityRole="button" accessibilityLabel="Save Changes" onPress={handleSaveChanges} style={{
|
|
1555
2024
|
flexDirection: 'row',
|
|
1556
2025
|
alignItems: 'center',
|
|
1557
2026
|
gap: 6,
|
|
@@ -1562,18 +2031,18 @@ const SettingsPanel = () => {
|
|
|
1562
2031
|
paddingVertical: 10,
|
|
1563
2032
|
borderRadius: 10,
|
|
1564
2033
|
}}>
|
|
1565
|
-
|
|
1566
|
-
|
|
2034
|
+
<CheckIcon size={14} color={hasUnsavedChanges ? AppColors.white : AppColors.purple}/>
|
|
2035
|
+
<Text style={{
|
|
1567
2036
|
fontFamily: AppFonts.interBold,
|
|
1568
2037
|
fontSize: 13,
|
|
1569
2038
|
lineHeight: 17,
|
|
1570
2039
|
color: hasUnsavedChanges ? AppColors.white : AppColors.purple,
|
|
1571
2040
|
}}>
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
2041
|
+
{t('settings.saveChanges')}
|
|
2042
|
+
</Text>
|
|
2043
|
+
</TouchableScale>
|
|
2044
|
+
</View>)}
|
|
2045
|
+
</View>);
|
|
1577
2046
|
let content = null;
|
|
1578
2047
|
let title = '';
|
|
1579
2048
|
let icon = null;
|
|
@@ -1615,7 +2084,9 @@ const SettingsPanel = () => {
|
|
|
1615
2084
|
{renderSettingRow({
|
|
1616
2085
|
icon: <TrashIcon color={AppColors.errorColor} size={16}/>,
|
|
1617
2086
|
label: t('settings.apis.clearNetworkLogs'),
|
|
1618
|
-
description: t('settings.apis.clearNetworkLogsDescription', {
|
|
2087
|
+
description: t('settings.apis.clearNetworkLogsDescription', {
|
|
2088
|
+
count: logs.length,
|
|
2089
|
+
}),
|
|
1619
2090
|
isLast: true,
|
|
1620
2091
|
onPress: () => {
|
|
1621
2092
|
clearNetworkLogs();
|
|
@@ -1802,9 +2273,7 @@ const SettingsPanel = () => {
|
|
|
1802
2273
|
: AppColors.grayBorderSecondary,
|
|
1803
2274
|
padding: 2,
|
|
1804
2275
|
justifyContent: 'center',
|
|
1805
|
-
alignItems: showDuplicateLogs
|
|
1806
|
-
? 'flex-end'
|
|
1807
|
-
: 'flex-start',
|
|
2276
|
+
alignItems: showDuplicateLogs ? 'flex-end' : 'flex-start',
|
|
1808
2277
|
}}>
|
|
1809
2278
|
<View style={{
|
|
1810
2279
|
width: 20,
|
|
@@ -1830,7 +2299,9 @@ const SettingsPanel = () => {
|
|
|
1830
2299
|
{renderSettingRow({
|
|
1831
2300
|
icon: <TrashIcon color={AppColors.errorColor} size={16}/>,
|
|
1832
2301
|
label: t('settings.logs.clearConsoleLogs'),
|
|
1833
|
-
description: t('settings.logs.clearConsoleLogsDescription', {
|
|
2302
|
+
description: t('settings.logs.clearConsoleLogsDescription', {
|
|
2303
|
+
count: consoleLogs.length,
|
|
2304
|
+
}),
|
|
1834
2305
|
isLast: true,
|
|
1835
2306
|
onPress: () => {
|
|
1836
2307
|
clearConsoleLogs();
|
|
@@ -1873,7 +2344,9 @@ const SettingsPanel = () => {
|
|
|
1873
2344
|
{renderSettingRow({
|
|
1874
2345
|
icon: <AnalyticsIcon color={AppColors.purple} size={16}/>,
|
|
1875
2346
|
label: t('settings.analytics.maxAnalyticsEvents'),
|
|
1876
|
-
description: t('settings.analytics.maxAnalyticsEventsDescription', {
|
|
2347
|
+
description: t('settings.analytics.maxAnalyticsEventsDescription', {
|
|
2348
|
+
count: analyticsEvents.length,
|
|
2349
|
+
}),
|
|
1877
2350
|
numericInput: {
|
|
1878
2351
|
value: maxAnalyticsEventsLimit,
|
|
1879
2352
|
onChange: setMaxAnalyticsEventsLimit,
|
|
@@ -1926,7 +2399,9 @@ const SettingsPanel = () => {
|
|
|
1926
2399
|
else if (settingsPage === 'redux') {
|
|
1927
2400
|
title = t('settings.redux.title');
|
|
1928
2401
|
icon = <ReduxIcon color={AppColors.white} size={16}/>;
|
|
1929
|
-
rightInfo = t('settings.redux.reducers', {
|
|
2402
|
+
rightInfo = t('settings.redux.reducers', {
|
|
2403
|
+
count: Object.keys(reduxState || {}).length,
|
|
2404
|
+
});
|
|
1930
2405
|
content = (<ScrollView style={{ flex: 1 }} contentContainerStyle={{ padding: 16, paddingBottom: 100, gap: 12 }}>
|
|
1931
2406
|
<View style={{
|
|
1932
2407
|
backgroundColor: AppColors.primaryLight,
|
|
@@ -2071,7 +2546,9 @@ const SettingsPanel = () => {
|
|
|
2071
2546
|
{renderSettingRow({
|
|
2072
2547
|
icon: <TrashIcon color={AppColors.errorColor} size={16}/>,
|
|
2073
2548
|
label: t('settings.crash.clearHistory'),
|
|
2074
|
-
description: t('settings.crash.clearHistoryDesc', {
|
|
2549
|
+
description: t('settings.crash.clearHistoryDesc', {
|
|
2550
|
+
count: crashRecords?.length || 0,
|
|
2551
|
+
}),
|
|
2075
2552
|
isLast: true,
|
|
2076
2553
|
onPress: () => {
|
|
2077
2554
|
clearCrashRecords();
|