react-native-inapp-inspector 2.3.7 → 2.3.9
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/dist/commonjs/components/Inspector/AnalyticsTab.js +27 -2
- package/dist/commonjs/components/Inspector/BundleTab.js +3 -0
- package/dist/commonjs/components/Inspector/ConsoleTab.js +24 -1
- package/dist/commonjs/components/Inspector/CrashTab.js +30 -1
- package/dist/commonjs/components/Inspector/FeatureUnderDevNotice.d.ts +7 -0
- package/dist/commonjs/components/Inspector/FeatureUnderDevNotice.js +111 -0
- package/dist/commonjs/components/Inspector/InspectorHeader.js +225 -108
- package/dist/commonjs/components/Inspector/NpmUpdateToast.js +1 -1
- package/dist/commonjs/components/Inspector/PerformanceTab.js +3 -0
- package/dist/commonjs/components/Inspector/ReduxTab.js +24 -1
- package/dist/commonjs/components/Inspector/SettingsPanel.js +73 -88
- package/dist/commonjs/components/Inspector/StorageTab.js +37 -11
- package/dist/commonjs/components/Inspector/UpdateAvailableModal.js +2 -0
- package/dist/commonjs/components/LogCard.js +33 -3
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/customHooks/networkLogger.js +2 -0
- package/dist/commonjs/helpers/telemetry.js +34 -0
- package/dist/commonjs/index.js +3 -0
- package/dist/esm/components/Inspector/AnalyticsTab.js +29 -4
- package/dist/esm/components/Inspector/BundleTab.js +3 -0
- package/dist/esm/components/Inspector/ConsoleTab.js +26 -3
- package/dist/esm/components/Inspector/CrashTab.js +32 -3
- package/dist/esm/components/Inspector/FeatureUnderDevNotice.d.ts +7 -0
- package/dist/esm/components/Inspector/FeatureUnderDevNotice.js +74 -0
- package/dist/esm/components/Inspector/InspectorHeader.js +226 -109
- package/dist/esm/components/Inspector/NpmUpdateToast.js +1 -1
- package/dist/esm/components/Inspector/PerformanceTab.js +3 -0
- package/dist/esm/components/Inspector/ReduxTab.js +26 -3
- package/dist/esm/components/Inspector/SettingsPanel.js +73 -88
- package/dist/esm/components/Inspector/StorageTab.js +39 -13
- package/dist/esm/components/Inspector/UpdateAvailableModal.js +2 -0
- package/dist/esm/components/LogCard.js +34 -4
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/customHooks/networkLogger.js +2 -0
- package/dist/esm/helpers/telemetry.js +34 -0
- package/dist/esm/index.js +3 -0
- package/package.json +1 -1
- package/src/components/Inspector/AnalyticsTab.tsx +71 -43
- package/src/components/Inspector/BundleTab.tsx +3 -0
- package/src/components/Inspector/ConsoleTab.tsx +28 -1
- package/src/components/Inspector/CrashTab.tsx +45 -14
- package/src/components/Inspector/FeatureUnderDevNotice.tsx +94 -0
- package/src/components/Inspector/InspectorHeader.tsx +257 -115
- package/src/components/Inspector/NpmUpdateToast.tsx +1 -1
- package/src/components/Inspector/PerformanceTab.tsx +3 -0
- package/src/components/Inspector/ReduxTab.tsx +28 -1
- package/src/components/Inspector/SettingsPanel.tsx +93 -132
- package/src/components/Inspector/StorageTab.tsx +56 -27
- package/src/components/Inspector/UpdateAvailableModal.tsx +2 -0
- package/src/components/LogCard.tsx +41 -4
- package/src/constants/version.ts +1 -1
- package/src/customHooks/networkLogger.ts +2 -0
- package/src/helpers/telemetry.ts +36 -0
- package/src/index.tsx +5 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
|
-
import { Alert, Animated, Linking, Platform, Pressable, Text, View, } from 'react-native';
|
|
2
|
+
import { Alert, Animated, Linking, Platform, Pressable, ScrollView, Text, useWindowDimensions, View, } from 'react-native';
|
|
3
3
|
import LinearGradient from 'react-native-linear-gradient';
|
|
4
4
|
import { useInspector } from './InspectorContext';
|
|
5
5
|
import TouchableScale from '../TouchableScale';
|
|
@@ -15,6 +15,10 @@ import { UpdateAvailableModal } from './UpdateAvailableModal';
|
|
|
15
15
|
import { WhiteBackNavigation, TrashIcon, SettingsIcon, CloseWhite, ClockIcon, SizeIcon, AppleIcon, AndroidIcon, NpmIcon, ResetIcon, BoltIcon, } from '../NetworkIcons';
|
|
16
16
|
const InspectorHeader = React.memo(() => {
|
|
17
17
|
const { modalHeightPercent, appIcon, selected, setSelected, selectedEvent, setSelectedEvent, selectedLog, setSelectedLog, selectedReduxSlice, setSelectedReduxSlice, selectedReduxAction, setSelectedReduxAction, reduxState, reduxLastActionMap, showHeaderInfo, setShowHeaderInfo, updateAvailable, latestNpmVersion, clearAnim, activePulseAnim, unreadPulseAnim, runClearAllWithAnimation, settingsPage, setSettingsPage, resetToDefaults, closeModal, detailTitle, activeTab, environment, visible, selectedCrash, setSelectedCrash, } = useInspector();
|
|
18
|
+
const { width: windowWidth } = useWindowDimensions();
|
|
19
|
+
const isNarrow = windowWidth < 360;
|
|
20
|
+
const isCompact = windowWidth < 400;
|
|
21
|
+
const isTablet = windowWidth >= 600;
|
|
18
22
|
const [showUpdateModal, setShowUpdateModal] = React.useState(false);
|
|
19
23
|
const [appVersionString, setAppVersionString] = React.useState(() => {
|
|
20
24
|
return getAppVersionAndBuild().formatted;
|
|
@@ -93,16 +97,25 @@ const InspectorHeader = React.memo(() => {
|
|
|
93
97
|
}
|
|
94
98
|
}, [settingsPage]);
|
|
95
99
|
const headerTopPadding = Platform.OS === 'ios' && modalHeightPercent >= 95 ? 44 : 0;
|
|
100
|
+
const buttonSize = isNarrow ? 28 : isCompact ? 30 : 32;
|
|
101
|
+
const logoSize = isNarrow ? 36 : isCompact ? 40 : 44;
|
|
96
102
|
return (<>
|
|
97
103
|
<LinearGradient colors={['#4F46E5', '#7C3AED']} start={{ x: 0, y: 0 }} end={{ x: 1, y: 1 }} style={styles.headerGradient}>
|
|
98
104
|
<View style={{ paddingTop: headerTopPadding, width: '100%' }}>
|
|
99
|
-
<View style={
|
|
105
|
+
<View style={[
|
|
106
|
+
styles.header,
|
|
107
|
+
{
|
|
108
|
+
paddingHorizontal: isNarrow ? 8 : 12,
|
|
109
|
+
paddingVertical: isNarrow ? 6 : 8,
|
|
110
|
+
minHeight: isNarrow ? 48 : 52,
|
|
111
|
+
},
|
|
112
|
+
]}>
|
|
100
113
|
<View style={[
|
|
101
114
|
styles.headerLeft,
|
|
102
115
|
{
|
|
103
116
|
flexDirection: 'row',
|
|
104
117
|
alignItems: 'center',
|
|
105
|
-
gap: 8,
|
|
118
|
+
gap: isNarrow ? 6 : 8,
|
|
106
119
|
flex: !isDetailView ? 1 : 0,
|
|
107
120
|
minWidth: 0,
|
|
108
121
|
},
|
|
@@ -127,9 +140,9 @@ const InspectorHeader = React.memo(() => {
|
|
|
127
140
|
});
|
|
128
141
|
}} hitSlop={15} style={[
|
|
129
142
|
{
|
|
130
|
-
width:
|
|
131
|
-
height:
|
|
132
|
-
borderRadius:
|
|
143
|
+
width: isNarrow ? 32 : 36,
|
|
144
|
+
height: isNarrow ? 32 : 36,
|
|
145
|
+
borderRadius: isNarrow ? 16 : 18,
|
|
133
146
|
alignItems: 'center',
|
|
134
147
|
justifyContent: 'center',
|
|
135
148
|
backgroundColor: `${AppColors.white}2E`,
|
|
@@ -138,12 +151,11 @@ const InspectorHeader = React.memo(() => {
|
|
|
138
151
|
},
|
|
139
152
|
!isAnySelected && { display: 'none' },
|
|
140
153
|
]}>
|
|
141
|
-
|
|
142
154
|
<View style={{
|
|
143
155
|
position: 'absolute',
|
|
144
|
-
width:
|
|
145
|
-
height:
|
|
146
|
-
borderRadius:
|
|
156
|
+
width: isNarrow ? 40 : 44,
|
|
157
|
+
height: isNarrow ? 40 : 44,
|
|
158
|
+
borderRadius: 22,
|
|
147
159
|
backgroundColor: `${AppColors.white}1A`,
|
|
148
160
|
}}/>
|
|
149
161
|
<WhiteBackNavigation />
|
|
@@ -153,7 +165,7 @@ const InspectorHeader = React.memo(() => {
|
|
|
153
165
|
<View style={{ flexDirection: 'row', alignItems: 'center', gap: 6 }}>
|
|
154
166
|
<Text style={{
|
|
155
167
|
fontFamily: AppFonts.interBold,
|
|
156
|
-
fontSize: 16,
|
|
168
|
+
fontSize: isNarrow ? 14 : 16,
|
|
157
169
|
color: AppColors.white,
|
|
158
170
|
letterSpacing: -0.2,
|
|
159
171
|
}} numberOfLines={1}>
|
|
@@ -161,7 +173,7 @@ const InspectorHeader = React.memo(() => {
|
|
|
161
173
|
</Text>
|
|
162
174
|
{settingsPage === 'main' && (<View style={{
|
|
163
175
|
backgroundColor: `${AppColors.white}26`,
|
|
164
|
-
paddingHorizontal: 6,
|
|
176
|
+
paddingHorizontal: isNarrow ? 4 : 6,
|
|
165
177
|
paddingVertical: 1.5,
|
|
166
178
|
borderRadius: 10,
|
|
167
179
|
borderWidth: 1,
|
|
@@ -169,7 +181,7 @@ const InspectorHeader = React.memo(() => {
|
|
|
169
181
|
}}>
|
|
170
182
|
<Text style={{
|
|
171
183
|
fontFamily: AppFonts.interBold,
|
|
172
|
-
fontSize: 9,
|
|
184
|
+
fontSize: isNarrow ? 8 : 9,
|
|
173
185
|
color: AppColors.white,
|
|
174
186
|
}}>
|
|
175
187
|
v{LIB_VERSION}
|
|
@@ -178,7 +190,7 @@ const InspectorHeader = React.memo(() => {
|
|
|
178
190
|
</View>
|
|
179
191
|
<Text style={{
|
|
180
192
|
fontFamily: AppFonts.interRegular,
|
|
181
|
-
fontSize: 10.5,
|
|
193
|
+
fontSize: isNarrow ? 9.5 : 10.5,
|
|
182
194
|
color: `${AppColors.white}CC`,
|
|
183
195
|
}} numberOfLines={1}>
|
|
184
196
|
{settingsPage === 'main'
|
|
@@ -188,20 +200,27 @@ const InspectorHeader = React.memo(() => {
|
|
|
188
200
|
</View>) : !isAnySelected ? (<View style={{
|
|
189
201
|
flexDirection: 'row',
|
|
190
202
|
alignItems: 'center',
|
|
191
|
-
gap: 8,
|
|
203
|
+
gap: isNarrow ? 6 : 8,
|
|
192
204
|
flex: 1,
|
|
193
205
|
minWidth: 0,
|
|
194
|
-
marginRight:
|
|
206
|
+
marginRight: 4,
|
|
195
207
|
}}>
|
|
196
|
-
<AppHeaderLogo size={
|
|
197
|
-
<View style={{ gap: 2
|
|
208
|
+
<AppHeaderLogo size={logoSize} customIcon={appIcon}/>
|
|
209
|
+
<View style={{ gap: 2, flex: 1, minWidth: 0 }}>
|
|
198
210
|
<View style={{
|
|
199
211
|
flexDirection: 'row',
|
|
200
212
|
alignItems: 'center',
|
|
201
|
-
gap: 6,
|
|
213
|
+
gap: isNarrow ? 4 : 6,
|
|
202
214
|
minWidth: 0,
|
|
203
215
|
}}>
|
|
204
|
-
<Text style={[
|
|
216
|
+
<Text style={[
|
|
217
|
+
styles.headerTitle,
|
|
218
|
+
{
|
|
219
|
+
fontSize: isNarrow ? 13.5 : isCompact ? 14.5 : 15.5,
|
|
220
|
+
flexShrink: 1,
|
|
221
|
+
paddingBottom: 0,
|
|
222
|
+
},
|
|
223
|
+
]} numberOfLines={1} ellipsizeMode="tail">
|
|
205
224
|
{getAppName()}
|
|
206
225
|
</Text>
|
|
207
226
|
<View style={[
|
|
@@ -210,11 +229,18 @@ const InspectorHeader = React.memo(() => {
|
|
|
210
229
|
backgroundColor: envConfig.bg,
|
|
211
230
|
borderColor: envConfig.border,
|
|
212
231
|
flexShrink: 0,
|
|
232
|
+
paddingHorizontal: isNarrow ? 4.5 : 6,
|
|
213
233
|
paddingVertical: 1.5,
|
|
214
234
|
marginBottom: 0,
|
|
215
235
|
},
|
|
216
236
|
]}>
|
|
217
|
-
<Text style={[
|
|
237
|
+
<Text style={[
|
|
238
|
+
styles.envBadgeText,
|
|
239
|
+
{
|
|
240
|
+
color: envConfig.text,
|
|
241
|
+
fontSize: isNarrow ? 8.5 : 9.5,
|
|
242
|
+
},
|
|
243
|
+
]}>
|
|
218
244
|
{envConfig.label}
|
|
219
245
|
</Text>
|
|
220
246
|
</View>
|
|
@@ -223,9 +249,9 @@ const InspectorHeader = React.memo(() => {
|
|
|
223
249
|
alignItems: 'center',
|
|
224
250
|
backgroundColor: '#F59E0B',
|
|
225
251
|
borderRadius: 5,
|
|
226
|
-
paddingHorizontal: 5.5,
|
|
252
|
+
paddingHorizontal: isNarrow ? 4 : 5.5,
|
|
227
253
|
paddingVertical: 1.5,
|
|
228
|
-
gap: 3
|
|
254
|
+
gap: 3,
|
|
229
255
|
shadowColor: '#F59E0B',
|
|
230
256
|
shadowOffset: { width: 0, height: 1.5 },
|
|
231
257
|
shadowOpacity: 0.35,
|
|
@@ -241,15 +267,15 @@ const InspectorHeader = React.memo(() => {
|
|
|
241
267
|
opacity: activePulseAnim,
|
|
242
268
|
transform: [{ scale: unreadPulseAnim }],
|
|
243
269
|
}}/>
|
|
244
|
-
<Text style={{
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
<BoltIcon size={9} color="#FFFFFF"/>
|
|
270
|
+
{!isNarrow && (<Text style={{
|
|
271
|
+
fontFamily: AppFonts.interBold,
|
|
272
|
+
fontSize: 8.5,
|
|
273
|
+
color: '#FFFFFF',
|
|
274
|
+
letterSpacing: 0.3,
|
|
275
|
+
}}>
|
|
276
|
+
UPDATE
|
|
277
|
+
</Text>)}
|
|
278
|
+
<BoltIcon size={isNarrow ? 8 : 9} color="#FFFFFF"/>
|
|
253
279
|
</Pressable>)}
|
|
254
280
|
</View>
|
|
255
281
|
|
|
@@ -257,7 +283,7 @@ const InspectorHeader = React.memo(() => {
|
|
|
257
283
|
<View style={{
|
|
258
284
|
flexDirection: 'row',
|
|
259
285
|
alignItems: 'center',
|
|
260
|
-
gap: 5,
|
|
286
|
+
gap: isNarrow ? 4 : 5,
|
|
261
287
|
minWidth: 0,
|
|
262
288
|
}}>
|
|
263
289
|
<View style={{
|
|
@@ -265,20 +291,21 @@ const InspectorHeader = React.memo(() => {
|
|
|
265
291
|
alignItems: 'center',
|
|
266
292
|
backgroundColor: `${AppColors.white}1F`,
|
|
267
293
|
borderRadius: 5,
|
|
268
|
-
paddingHorizontal: 6,
|
|
294
|
+
paddingHorizontal: isNarrow ? 4.5 : 6,
|
|
269
295
|
paddingVertical: 2,
|
|
270
|
-
gap:
|
|
296
|
+
gap: 3.5,
|
|
271
297
|
borderWidth: 1,
|
|
272
298
|
borderColor: `${AppColors.white}2E`,
|
|
273
|
-
flexShrink:
|
|
299
|
+
flexShrink: 1,
|
|
300
|
+
minWidth: 0,
|
|
274
301
|
}}>
|
|
275
|
-
{Platform.OS === 'ios' ? (<AppleIcon color={`${AppColors.white}E6`} size={10}/>) : (<AndroidIcon color={`${AppColors.white}E6`} size={10}/>)}
|
|
302
|
+
{Platform.OS === 'ios' ? (<AppleIcon color={`${AppColors.white}E6`} size={isNarrow ? 9 : 10}/>) : (<AndroidIcon color={`${AppColors.white}E6`} size={isNarrow ? 9 : 10}/>)}
|
|
276
303
|
<Text style={{
|
|
277
304
|
fontFamily: AppFonts.interMedium,
|
|
278
|
-
fontSize: 9.5,
|
|
305
|
+
fontSize: isNarrow ? 8.5 : 9.5,
|
|
279
306
|
color: `${AppColors.white}EB`,
|
|
280
307
|
letterSpacing: 0.1,
|
|
281
|
-
}} numberOfLines={1}>
|
|
308
|
+
}} numberOfLines={1} ellipsizeMode="tail">
|
|
282
309
|
{appVersionString}
|
|
283
310
|
</Text>
|
|
284
311
|
</View>
|
|
@@ -295,17 +322,17 @@ const InspectorHeader = React.memo(() => {
|
|
|
295
322
|
alignItems: 'center',
|
|
296
323
|
backgroundColor: `${AppColors.white}1F`,
|
|
297
324
|
borderRadius: 5,
|
|
298
|
-
paddingHorizontal: 6,
|
|
325
|
+
paddingHorizontal: isNarrow ? 4.5 : 6,
|
|
299
326
|
paddingVertical: 2,
|
|
300
|
-
gap:
|
|
327
|
+
gap: 3.5,
|
|
301
328
|
borderWidth: 1,
|
|
302
329
|
borderColor: `${AppColors.white}2E`,
|
|
303
330
|
flexShrink: 0,
|
|
304
331
|
}}>
|
|
305
|
-
<NpmIcon size={10} color="#FF6B6B"/>
|
|
332
|
+
<NpmIcon size={isNarrow ? 9 : 10} color="#FF6B6B"/>
|
|
306
333
|
<Text style={{
|
|
307
334
|
fontFamily: AppFonts.interMedium,
|
|
308
|
-
fontSize: 9.5,
|
|
335
|
+
fontSize: isNarrow ? 8.5 : 9.5,
|
|
309
336
|
color: `${AppColors.white}EB`,
|
|
310
337
|
letterSpacing: 0.1,
|
|
311
338
|
}} numberOfLines={1}>
|
|
@@ -313,7 +340,7 @@ const InspectorHeader = React.memo(() => {
|
|
|
313
340
|
</Text>
|
|
314
341
|
{updateAvailable && (<Text style={{
|
|
315
342
|
fontFamily: AppFonts.interBold,
|
|
316
|
-
fontSize:
|
|
343
|
+
fontSize: 8.5,
|
|
317
344
|
color: '#F59E0B',
|
|
318
345
|
}}>
|
|
319
346
|
●
|
|
@@ -324,7 +351,7 @@ const InspectorHeader = React.memo(() => {
|
|
|
324
351
|
</View>) : null}
|
|
325
352
|
</View>
|
|
326
353
|
|
|
327
|
-
{isDetailView && (<View style={styles.headerCenter}>
|
|
354
|
+
{isDetailView && (<View style={[styles.headerCenter, { paddingHorizontal: isNarrow ? 2 : 6 }]}>
|
|
328
355
|
{activeTab === 'apis' && selected != null ? (<View style={styles.headerDetailCenter}>
|
|
329
356
|
<View style={styles.headerDetailRow}>
|
|
330
357
|
<View style={[
|
|
@@ -332,23 +359,31 @@ const InspectorHeader = React.memo(() => {
|
|
|
332
359
|
{
|
|
333
360
|
backgroundColor: METHOD_COLORS[selected.method] ??
|
|
334
361
|
AppColors.grayText,
|
|
362
|
+
paddingHorizontal: isNarrow ? 5 : 6,
|
|
363
|
+
paddingVertical: isNarrow ? 2 : 3,
|
|
335
364
|
},
|
|
336
365
|
]}>
|
|
337
|
-
<Text style={styles.headerMethodText}>
|
|
366
|
+
<Text style={[styles.headerMethodText, { fontSize: isNarrow ? 9 : 10 }]}>
|
|
338
367
|
{selected.method}
|
|
339
368
|
</Text>
|
|
340
369
|
</View>
|
|
341
|
-
<Text style={styles.headerDetailTitle} numberOfLines={1} ellipsizeMode="middle">
|
|
370
|
+
<Text style={[styles.headerDetailTitle, { fontSize: isNarrow ? 13.5 : 15 }]} numberOfLines={1} ellipsizeMode="middle">
|
|
342
371
|
{detailTitle}
|
|
343
372
|
</Text>
|
|
344
373
|
</View>
|
|
345
|
-
<
|
|
374
|
+
<ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerStyle={{
|
|
375
|
+
flexDirection: 'row',
|
|
376
|
+
alignItems: 'center',
|
|
377
|
+
gap: isNarrow ? 4 : 6,
|
|
378
|
+
marginTop: 3,
|
|
379
|
+
paddingVertical: 1,
|
|
380
|
+
}}>
|
|
346
381
|
<View style={{
|
|
347
382
|
flexDirection: 'row',
|
|
348
383
|
alignItems: 'center',
|
|
349
|
-
gap:
|
|
350
|
-
paddingHorizontal: 8,
|
|
351
|
-
paddingVertical:
|
|
384
|
+
gap: 4,
|
|
385
|
+
paddingHorizontal: isNarrow ? 6 : 8,
|
|
386
|
+
paddingVertical: 2.5,
|
|
352
387
|
borderRadius: 20,
|
|
353
388
|
backgroundColor: `${getStatusColor(selected.status)}26`,
|
|
354
389
|
borderWidth: 1,
|
|
@@ -358,11 +393,13 @@ const InspectorHeader = React.memo(() => {
|
|
|
358
393
|
styles.headerStatusDot,
|
|
359
394
|
{
|
|
360
395
|
backgroundColor: getStatusColor(selected.status),
|
|
396
|
+
width: isNarrow ? 6 : 7,
|
|
397
|
+
height: isNarrow ? 6 : 7,
|
|
361
398
|
},
|
|
362
399
|
]}/>
|
|
363
400
|
<Text style={[
|
|
364
401
|
styles.headerSubTitle,
|
|
365
|
-
{ fontFamily: AppFonts.interBold },
|
|
402
|
+
{ fontFamily: AppFonts.interBold, fontSize: isNarrow ? 10 : 11 },
|
|
366
403
|
]}>
|
|
367
404
|
{selected.status === 0
|
|
368
405
|
? 'Failed'
|
|
@@ -373,13 +410,13 @@ const InspectorHeader = React.memo(() => {
|
|
|
373
410
|
flexDirection: 'row',
|
|
374
411
|
alignItems: 'center',
|
|
375
412
|
gap: 4,
|
|
376
|
-
paddingHorizontal: 8,
|
|
377
|
-
paddingVertical:
|
|
413
|
+
paddingHorizontal: isNarrow ? 6 : 8,
|
|
414
|
+
paddingVertical: 2.5,
|
|
378
415
|
borderRadius: 20,
|
|
379
416
|
backgroundColor: `${AppColors.white}29`,
|
|
380
417
|
}}>
|
|
381
|
-
<ClockIcon color={AppColors.white} size={11}/>
|
|
382
|
-
<Text style={styles.headerSubTitle}>
|
|
418
|
+
<ClockIcon color={AppColors.white} size={isNarrow ? 10 : 11}/>
|
|
419
|
+
<Text style={[styles.headerSubTitle, { fontSize: isNarrow ? 10 : 11 }]}>
|
|
383
420
|
{selected.duration != null
|
|
384
421
|
? `${selected.duration}ms`
|
|
385
422
|
: '—'}
|
|
@@ -389,17 +426,17 @@ const InspectorHeader = React.memo(() => {
|
|
|
389
426
|
flexDirection: 'row',
|
|
390
427
|
alignItems: 'center',
|
|
391
428
|
gap: 4,
|
|
392
|
-
paddingHorizontal: 8,
|
|
393
|
-
paddingVertical:
|
|
429
|
+
paddingHorizontal: isNarrow ? 6 : 8,
|
|
430
|
+
paddingVertical: 2.5,
|
|
394
431
|
borderRadius: 20,
|
|
395
432
|
backgroundColor: `${AppColors.white}29`,
|
|
396
433
|
}}>
|
|
397
|
-
<SizeIcon color={AppColors.white} size={11}/>
|
|
398
|
-
<Text style={styles.headerSubTitle}>
|
|
434
|
+
<SizeIcon color={AppColors.white} size={isNarrow ? 10 : 11}/>
|
|
435
|
+
<Text style={[styles.headerSubTitle, { fontSize: isNarrow ? 10 : 11 }]}>
|
|
399
436
|
{getSize(selected.response)}
|
|
400
437
|
</Text>
|
|
401
438
|
</View>)}
|
|
402
|
-
</
|
|
439
|
+
</ScrollView>
|
|
403
440
|
</View>) : activeTab === 'analytics' && selectedEvent != null ? (<View style={styles.headerDetailCenter}>
|
|
404
441
|
<View style={styles.headerDetailRow}>
|
|
405
442
|
<View style={[
|
|
@@ -408,26 +445,36 @@ const InspectorHeader = React.memo(() => {
|
|
|
408
445
|
backgroundColor: selectedEvent.source === 'firebase'
|
|
409
446
|
? `${AppColors.firebaseOrange}4D`
|
|
410
447
|
: `${AppColors.purple}4D`,
|
|
448
|
+
paddingHorizontal: isNarrow ? 5 : 6,
|
|
449
|
+
paddingVertical: isNarrow ? 2 : 3,
|
|
411
450
|
},
|
|
412
451
|
]}>
|
|
413
|
-
<Text style={styles.headerMethodText}>
|
|
452
|
+
<Text style={[styles.headerMethodText, { fontSize: isNarrow ? 9 : 10 }]}>
|
|
414
453
|
{selectedEvent.source === 'firebase' ? 'FB' : 'MAN'}
|
|
415
454
|
</Text>
|
|
416
455
|
</View>
|
|
417
|
-
<Text style={styles.headerDetailTitle} numberOfLines={1} ellipsizeMode="middle">
|
|
456
|
+
<Text style={[styles.headerDetailTitle, { fontSize: isNarrow ? 13.5 : 15 }]} numberOfLines={1} ellipsizeMode="middle">
|
|
418
457
|
{selectedEvent.name}
|
|
419
458
|
</Text>
|
|
420
459
|
</View>
|
|
421
|
-
<
|
|
460
|
+
<ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerStyle={{
|
|
461
|
+
flexDirection: 'row',
|
|
462
|
+
alignItems: 'center',
|
|
463
|
+
gap: isNarrow ? 4 : 6,
|
|
464
|
+
marginTop: 3,
|
|
465
|
+
paddingVertical: 1,
|
|
466
|
+
}}>
|
|
422
467
|
<View style={[
|
|
423
468
|
styles.headerStatusDot,
|
|
424
469
|
{
|
|
425
470
|
backgroundColor: selectedEvent.source === 'firebase'
|
|
426
471
|
? AppColors.firebaseOrange
|
|
427
472
|
: AppColors.purple,
|
|
473
|
+
width: isNarrow ? 6 : 7,
|
|
474
|
+
height: isNarrow ? 6 : 7,
|
|
428
475
|
},
|
|
429
476
|
]}/>
|
|
430
|
-
<Text style={styles.headerSubTitle}>
|
|
477
|
+
<Text style={[styles.headerSubTitle, { fontSize: isNarrow ? 10 : 11 }]}>
|
|
431
478
|
{Object.keys(selectedEvent.params).length} param
|
|
432
479
|
{Object.keys(selectedEvent.params).length !== 1
|
|
433
480
|
? 's'
|
|
@@ -435,7 +482,7 @@ const InspectorHeader = React.memo(() => {
|
|
|
435
482
|
{' · '}
|
|
436
483
|
{selectedEvent.source}
|
|
437
484
|
</Text>
|
|
438
|
-
</
|
|
485
|
+
</ScrollView>
|
|
439
486
|
</View>) : activeTab === 'logs' && selectedLog != null ? (<View style={styles.headerDetailCenter}>
|
|
440
487
|
<View style={styles.headerDetailRow}>
|
|
441
488
|
<View style={[
|
|
@@ -446,33 +493,41 @@ const InspectorHeader = React.memo(() => {
|
|
|
446
493
|
: selectedLog.type === 'warn'
|
|
447
494
|
? `${AppColors.lightOrange}4D`
|
|
448
495
|
: `${AppColors.purple}4D`,
|
|
496
|
+
paddingHorizontal: isNarrow ? 5 : 6,
|
|
497
|
+
paddingVertical: isNarrow ? 2 : 3,
|
|
449
498
|
},
|
|
450
499
|
]}>
|
|
451
|
-
<Text style={styles.headerMethodText}>
|
|
500
|
+
<Text style={[styles.headerMethodText, { fontSize: isNarrow ? 9 : 10 }]}>
|
|
452
501
|
{selectedLog.type.toUpperCase()}
|
|
453
502
|
</Text>
|
|
454
503
|
</View>
|
|
455
|
-
<Text style={styles.headerDetailTitle} numberOfLines={1} ellipsizeMode="middle">
|
|
504
|
+
<Text style={[styles.headerDetailTitle, { fontSize: isNarrow ? 13.5 : 15 }]} numberOfLines={1} ellipsizeMode="middle">
|
|
456
505
|
console.
|
|
457
506
|
{selectedLog.sourceMethod || selectedLog.type || 'log'}
|
|
458
507
|
</Text>
|
|
459
508
|
</View>
|
|
460
|
-
<
|
|
509
|
+
<ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerStyle={{
|
|
510
|
+
flexDirection: 'row',
|
|
511
|
+
alignItems: 'center',
|
|
512
|
+
gap: isNarrow ? 4 : 6,
|
|
513
|
+
marginTop: 3,
|
|
514
|
+
paddingVertical: 1,
|
|
515
|
+
}}>
|
|
461
516
|
<View style={{
|
|
462
517
|
flexDirection: 'row',
|
|
463
518
|
alignItems: 'center',
|
|
464
519
|
gap: 4,
|
|
465
|
-
paddingHorizontal: 8,
|
|
466
|
-
paddingVertical:
|
|
520
|
+
paddingHorizontal: isNarrow ? 6 : 8,
|
|
521
|
+
paddingVertical: 2.5,
|
|
467
522
|
borderRadius: 20,
|
|
468
523
|
backgroundColor: `${AppColors.white}29`,
|
|
469
524
|
}}>
|
|
470
|
-
<ClockIcon color={AppColors.white} size={11}/>
|
|
471
|
-
<Text style={styles.headerSubTitle}>
|
|
525
|
+
<ClockIcon color={AppColors.white} size={isNarrow ? 10 : 11}/>
|
|
526
|
+
<Text style={[styles.headerSubTitle, { fontSize: isNarrow ? 10 : 11 }]}>
|
|
472
527
|
{formatTime(selectedLog.timestamp)}
|
|
473
528
|
</Text>
|
|
474
529
|
</View>
|
|
475
|
-
</
|
|
530
|
+
</ScrollView>
|
|
476
531
|
</View>) : activeTab === 'redux' && selectedReduxSlice != null ? ((() => {
|
|
477
532
|
const sliceData = reduxState?.[selectedReduxSlice];
|
|
478
533
|
const keyCount = sliceData && typeof sliceData === 'object'
|
|
@@ -488,32 +543,44 @@ const InspectorHeader = React.memo(() => {
|
|
|
488
543
|
styles.headerMethodBadge,
|
|
489
544
|
{
|
|
490
545
|
backgroundColor: `${AppColors.purple}4D`,
|
|
546
|
+
paddingHorizontal: isNarrow ? 5 : 6,
|
|
547
|
+
paddingVertical: isNarrow ? 2 : 3,
|
|
491
548
|
},
|
|
492
549
|
]}>
|
|
493
|
-
<Text style={styles.headerMethodText}>SLICE</Text>
|
|
550
|
+
<Text style={[styles.headerMethodText, { fontSize: isNarrow ? 9 : 10 }]}>SLICE</Text>
|
|
494
551
|
</View>
|
|
495
|
-
<Text style={styles.headerDetailTitle} numberOfLines={1} ellipsizeMode="middle">
|
|
552
|
+
<Text style={[styles.headerDetailTitle, { fontSize: isNarrow ? 13.5 : 15 }]} numberOfLines={1} ellipsizeMode="middle">
|
|
496
553
|
{selectedReduxSlice}
|
|
497
554
|
</Text>
|
|
498
555
|
</View>
|
|
499
|
-
<
|
|
556
|
+
<ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerStyle={{
|
|
557
|
+
flexDirection: 'row',
|
|
558
|
+
alignItems: 'center',
|
|
559
|
+
gap: isNarrow ? 4 : 6,
|
|
560
|
+
marginTop: 3,
|
|
561
|
+
paddingVertical: 1,
|
|
562
|
+
}}>
|
|
500
563
|
<View style={[
|
|
501
564
|
styles.headerStatusDot,
|
|
502
|
-
{
|
|
565
|
+
{
|
|
566
|
+
backgroundColor: AppColors.liveGreen,
|
|
567
|
+
width: isNarrow ? 6 : 7,
|
|
568
|
+
height: isNarrow ? 6 : 7,
|
|
569
|
+
},
|
|
503
570
|
]}/>
|
|
504
|
-
<Text style={styles.headerSubTitle}>Live</Text>
|
|
505
|
-
<Text style={[styles.headerSubTitle, { opacity: 0.6 }]}>
|
|
571
|
+
<Text style={[styles.headerSubTitle, { fontSize: isNarrow ? 10 : 11 }]}>Live</Text>
|
|
572
|
+
<Text style={[styles.headerSubTitle, { opacity: 0.6, fontSize: isNarrow ? 10 : 11 }]}>
|
|
506
573
|
•
|
|
507
574
|
</Text>
|
|
508
|
-
<Text style={styles.headerSubTitle}>
|
|
575
|
+
<Text style={[styles.headerSubTitle, { fontSize: isNarrow ? 10 : 11 }]}>
|
|
509
576
|
{keyCount} keys
|
|
510
577
|
</Text>
|
|
511
|
-
<Text style={[styles.headerSubTitle, { opacity: 0.6 }]}>
|
|
578
|
+
<Text style={[styles.headerSubTitle, { opacity: 0.6, fontSize: isNarrow ? 10 : 11 }]}>
|
|
512
579
|
•
|
|
513
580
|
</Text>
|
|
514
|
-
<Text style={styles.headerSubTitle}>{sliceSize}</Text>
|
|
581
|
+
<Text style={[styles.headerSubTitle, { fontSize: isNarrow ? 10 : 11 }]}>{sliceSize}</Text>
|
|
515
582
|
{lastAction?.timestamp && (<>
|
|
516
|
-
<Text style={[styles.headerSubTitle, { opacity: 0.6 }]}>
|
|
583
|
+
<Text style={[styles.headerSubTitle, { opacity: 0.6, fontSize: isNarrow ? 10 : 11 }]}>
|
|
517
584
|
•
|
|
518
585
|
</Text>
|
|
519
586
|
<View style={{
|
|
@@ -521,13 +588,13 @@ const InspectorHeader = React.memo(() => {
|
|
|
521
588
|
alignItems: 'center',
|
|
522
589
|
gap: 3,
|
|
523
590
|
}}>
|
|
524
|
-
<ClockIcon color={AppColors.white} size={10}/>
|
|
525
|
-
<Text style={styles.headerSubTitle}>
|
|
591
|
+
<ClockIcon color={AppColors.white} size={isNarrow ? 9 : 10}/>
|
|
592
|
+
<Text style={[styles.headerSubTitle, { fontSize: isNarrow ? 10 : 11 }]}>
|
|
526
593
|
{lastAction.timestamp}
|
|
527
594
|
</Text>
|
|
528
595
|
</View>
|
|
529
596
|
</>)}
|
|
530
|
-
</
|
|
597
|
+
</ScrollView>
|
|
531
598
|
</View>);
|
|
532
599
|
})()) : activeTab === 'redux' && selectedReduxAction != null ? (<View style={styles.headerDetailCenter}>
|
|
533
600
|
<View style={styles.headerDetailRow}>
|
|
@@ -535,23 +602,35 @@ const InspectorHeader = React.memo(() => {
|
|
|
535
602
|
styles.headerMethodBadge,
|
|
536
603
|
{
|
|
537
604
|
backgroundColor: `${AppColors.brandPurple}4D`,
|
|
605
|
+
paddingHorizontal: isNarrow ? 5 : 6,
|
|
606
|
+
paddingVertical: isNarrow ? 2 : 3,
|
|
538
607
|
},
|
|
539
608
|
]}>
|
|
540
|
-
<Text style={styles.headerMethodText}>ACTION</Text>
|
|
609
|
+
<Text style={[styles.headerMethodText, { fontSize: isNarrow ? 9 : 10 }]}>ACTION</Text>
|
|
541
610
|
</View>
|
|
542
|
-
<Text style={styles.headerDetailTitle} numberOfLines={1} ellipsizeMode="middle">
|
|
611
|
+
<Text style={[styles.headerDetailTitle, { fontSize: isNarrow ? 13.5 : 15 }]} numberOfLines={1} ellipsizeMode="middle">
|
|
543
612
|
{selectedReduxAction.type}
|
|
544
613
|
</Text>
|
|
545
614
|
</View>
|
|
546
|
-
<
|
|
615
|
+
<ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerStyle={{
|
|
616
|
+
flexDirection: 'row',
|
|
617
|
+
alignItems: 'center',
|
|
618
|
+
gap: isNarrow ? 4 : 6,
|
|
619
|
+
marginTop: 3,
|
|
620
|
+
paddingVertical: 1,
|
|
621
|
+
}}>
|
|
547
622
|
<View style={[
|
|
548
623
|
styles.headerStatusDot,
|
|
549
|
-
{
|
|
624
|
+
{
|
|
625
|
+
backgroundColor: AppColors.purple,
|
|
626
|
+
width: isNarrow ? 6 : 7,
|
|
627
|
+
height: isNarrow ? 6 : 7,
|
|
628
|
+
},
|
|
550
629
|
]}/>
|
|
551
|
-
<Text style={styles.headerSubTitle}>
|
|
630
|
+
<Text style={[styles.headerSubTitle, { fontSize: isNarrow ? 10 : 11 }]}>
|
|
552
631
|
{selectedReduxAction.timestamp || 'Dispatched'}
|
|
553
632
|
</Text>
|
|
554
|
-
</
|
|
633
|
+
</ScrollView>
|
|
555
634
|
</View>) : activeTab === 'crash' && selectedCrash != null ? (<View style={styles.headerDetailCenter}>
|
|
556
635
|
<View style={styles.headerDetailRow}>
|
|
557
636
|
<View style={[
|
|
@@ -560,40 +639,50 @@ const InspectorHeader = React.memo(() => {
|
|
|
560
639
|
backgroundColor: selectedCrash.isFatal
|
|
561
640
|
? AppColors.red600
|
|
562
641
|
: AppColors.amber600,
|
|
642
|
+
paddingHorizontal: isNarrow ? 5 : 6,
|
|
643
|
+
paddingVertical: isNarrow ? 2 : 3,
|
|
563
644
|
},
|
|
564
645
|
]}>
|
|
565
|
-
<Text style={styles.headerMethodText}>
|
|
646
|
+
<Text style={[styles.headerMethodText, { fontSize: isNarrow ? 9 : 10 }]}>
|
|
566
647
|
{selectedCrash.isFatal
|
|
567
648
|
? 'FATAL'
|
|
568
649
|
: selectedCrash.type.toUpperCase()}
|
|
569
650
|
</Text>
|
|
570
651
|
</View>
|
|
571
|
-
<Text style={styles.headerDetailTitle} numberOfLines={1} ellipsizeMode="middle">
|
|
652
|
+
<Text style={[styles.headerDetailTitle, { fontSize: isNarrow ? 13.5 : 15 }]} numberOfLines={1} ellipsizeMode="middle">
|
|
572
653
|
{selectedCrash.name || selectedCrash.message}
|
|
573
654
|
</Text>
|
|
574
655
|
</View>
|
|
575
|
-
<
|
|
656
|
+
<ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerStyle={{
|
|
657
|
+
flexDirection: 'row',
|
|
658
|
+
alignItems: 'center',
|
|
659
|
+
gap: isNarrow ? 4 : 6,
|
|
660
|
+
marginTop: 3,
|
|
661
|
+
paddingVertical: 1,
|
|
662
|
+
}}>
|
|
576
663
|
<View style={[
|
|
577
664
|
styles.headerStatusDot,
|
|
578
665
|
{
|
|
579
666
|
backgroundColor: selectedCrash.isFatal
|
|
580
667
|
? AppColors.red600
|
|
581
668
|
: AppColors.amber500,
|
|
669
|
+
width: isNarrow ? 6 : 7,
|
|
670
|
+
height: isNarrow ? 6 : 7,
|
|
582
671
|
},
|
|
583
672
|
]}/>
|
|
584
|
-
<Text style={styles.headerSubTitle}>
|
|
673
|
+
<Text style={[styles.headerSubTitle, { fontSize: isNarrow ? 10 : 11 }]}>
|
|
585
674
|
{selectedCrash.timeStr ||
|
|
586
675
|
new Date(selectedCrash.timestamp).toLocaleTimeString()}
|
|
587
676
|
</Text>
|
|
588
677
|
{selectedCrash.deviceInfo?.platform && (<>
|
|
589
|
-
<Text style={[styles.headerSubTitle, { opacity: 0.6 }]}>
|
|
678
|
+
<Text style={[styles.headerSubTitle, { opacity: 0.6, fontSize: isNarrow ? 10 : 11 }]}>
|
|
590
679
|
•
|
|
591
680
|
</Text>
|
|
592
|
-
<Text style={styles.headerSubTitle}>
|
|
681
|
+
<Text style={[styles.headerSubTitle, { fontSize: isNarrow ? 10 : 11 }]}>
|
|
593
682
|
{selectedCrash.deviceInfo.platform.toUpperCase()}
|
|
594
683
|
</Text>
|
|
595
684
|
</>)}
|
|
596
|
-
</
|
|
685
|
+
</ScrollView>
|
|
597
686
|
</View>) : null}
|
|
598
687
|
</View>)}
|
|
599
688
|
|
|
@@ -604,7 +693,7 @@ const InspectorHeader = React.memo(() => {
|
|
|
604
693
|
alignItems: 'center',
|
|
605
694
|
justifyContent: 'flex-end',
|
|
606
695
|
flexShrink: 0,
|
|
607
|
-
gap:
|
|
696
|
+
gap: isNarrow ? 5 : 7,
|
|
608
697
|
},
|
|
609
698
|
]}>
|
|
610
699
|
{isSettingsView && (<TouchableScale onPress={() => {
|
|
@@ -616,8 +705,15 @@ const InspectorHeader = React.memo(() => {
|
|
|
616
705
|
onPress: resetToDefaults,
|
|
617
706
|
},
|
|
618
707
|
]);
|
|
619
|
-
}} hitSlop={15} style={
|
|
620
|
-
|
|
708
|
+
}} hitSlop={15} style={[
|
|
709
|
+
styles.closeButtonSquare,
|
|
710
|
+
{
|
|
711
|
+
width: buttonSize,
|
|
712
|
+
height: buttonSize,
|
|
713
|
+
borderRadius: isNarrow ? 6 : 7,
|
|
714
|
+
},
|
|
715
|
+
]}>
|
|
716
|
+
<ResetIcon color={AppColors.white} size={isNarrow ? 12 : 14}/>
|
|
621
717
|
</TouchableScale>)}
|
|
622
718
|
|
|
623
719
|
{!isAnySelected && (<TouchableScale onPress={() => {
|
|
@@ -629,7 +725,14 @@ const InspectorHeader = React.memo(() => {
|
|
|
629
725
|
style: 'destructive',
|
|
630
726
|
},
|
|
631
727
|
]);
|
|
632
|
-
}} hitSlop={15} style={
|
|
728
|
+
}} hitSlop={15} style={[
|
|
729
|
+
styles.closeButtonSquare,
|
|
730
|
+
{
|
|
731
|
+
width: buttonSize,
|
|
732
|
+
height: buttonSize,
|
|
733
|
+
borderRadius: isNarrow ? 6 : 7,
|
|
734
|
+
},
|
|
735
|
+
]}>
|
|
633
736
|
<Animated.View style={{
|
|
634
737
|
transform: [
|
|
635
738
|
{
|
|
@@ -646,16 +749,30 @@ const InspectorHeader = React.memo(() => {
|
|
|
646
749
|
},
|
|
647
750
|
],
|
|
648
751
|
}}>
|
|
649
|
-
<TrashIcon color={AppColors.white} size={14}/>
|
|
752
|
+
<TrashIcon color={AppColors.white} size={isNarrow ? 12 : 14}/>
|
|
650
753
|
</Animated.View>
|
|
651
754
|
</TouchableScale>)}
|
|
652
755
|
|
|
653
|
-
{!isAnySelected && (<TouchableScale onPress={() => setSettingsPage('main')} hitSlop={15} style={
|
|
654
|
-
|
|
756
|
+
{!isAnySelected && (<TouchableScale onPress={() => setSettingsPage('main')} hitSlop={15} style={[
|
|
757
|
+
styles.closeButtonSquare,
|
|
758
|
+
{
|
|
759
|
+
width: buttonSize,
|
|
760
|
+
height: buttonSize,
|
|
761
|
+
borderRadius: isNarrow ? 6 : 7,
|
|
762
|
+
},
|
|
763
|
+
]}>
|
|
764
|
+
<SettingsIcon color={AppColors.white} size={isNarrow ? 12 : 14}/>
|
|
655
765
|
</TouchableScale>)}
|
|
656
766
|
|
|
657
|
-
<TouchableScale onPress={closeModal} hitSlop={15} style={
|
|
658
|
-
|
|
767
|
+
<TouchableScale onPress={closeModal} hitSlop={15} style={[
|
|
768
|
+
styles.closeButtonSquare,
|
|
769
|
+
{
|
|
770
|
+
width: buttonSize,
|
|
771
|
+
height: buttonSize,
|
|
772
|
+
borderRadius: isNarrow ? 6 : 7,
|
|
773
|
+
},
|
|
774
|
+
]}>
|
|
775
|
+
<CloseWhite size={isNarrow ? 12 : 14}/>
|
|
659
776
|
</TouchableScale>
|
|
660
777
|
</View>
|
|
661
778
|
</View>
|