react-native-debug-toolkit 0.1.3 → 0.1.4
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/lib/views/HttpLogDetails.js +26 -21
- package/package.json +1 -1
|
@@ -38,11 +38,15 @@ const CollapsibleSection = ({ title, children, initiallyExpanded = false }) => {
|
|
|
38
38
|
|
|
39
39
|
const LongTextContent = ({ text }) => {
|
|
40
40
|
return (
|
|
41
|
-
<
|
|
41
|
+
<ScrollView
|
|
42
|
+
style={styles.longTextContainer}
|
|
43
|
+
contentContainerStyle={{ flexGrow: 1 }}
|
|
44
|
+
showsVerticalScrollIndicator={true}
|
|
45
|
+
nestedScrollEnabled={true}>
|
|
42
46
|
<Text style={styles.jsonString} selectable={true}>
|
|
43
47
|
{text}
|
|
44
48
|
</Text>
|
|
45
|
-
</
|
|
49
|
+
</ScrollView>
|
|
46
50
|
)
|
|
47
51
|
}
|
|
48
52
|
|
|
@@ -316,16 +320,16 @@ const HttpLogDetails = ({ log }) => {
|
|
|
316
320
|
}
|
|
317
321
|
/>
|
|
318
322
|
</View>
|
|
319
|
-
<
|
|
323
|
+
<ScrollView style={styles.dataContent} contentContainerStyle={{ flexGrow: 1 }} nestedScrollEnabled={true}>
|
|
320
324
|
<JSONValue value={requestData} maxExpandLevel={1} />
|
|
321
|
-
</
|
|
325
|
+
</ScrollView>
|
|
322
326
|
</View>
|
|
323
327
|
)}
|
|
324
328
|
|
|
325
329
|
<CollapsibleSection title='Headers'>
|
|
326
|
-
<
|
|
330
|
+
<ScrollView style={styles.dataContent} contentContainerStyle={{ flexGrow: 1 }} nestedScrollEnabled={true}>
|
|
327
331
|
<JSONValue value={request.headers || {}} maxExpandLevel={0} />
|
|
328
|
-
</
|
|
332
|
+
</ScrollView>
|
|
329
333
|
</CollapsibleSection>
|
|
330
334
|
</View>
|
|
331
335
|
</CollapsibleSection>
|
|
@@ -335,20 +339,12 @@ const HttpLogDetails = ({ log }) => {
|
|
|
335
339
|
initiallyExpanded={true}>
|
|
336
340
|
<View style={styles.content}>
|
|
337
341
|
<View style={styles.row}>
|
|
338
|
-
<Text style={styles.label}>Status
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
{status && response.statusText ? ` (${response.statusText})` : ''}
|
|
342
|
+
<Text style={styles.label}>Status:{status || (success === false ? 'Error' : 'Unknown')}
|
|
343
|
+
{status && response.statusText ? ` (${response.statusText})` : ''}
|
|
344
|
+
{duration && ` Duration: (${duration}ms)`}
|
|
342
345
|
</Text>
|
|
343
346
|
</View>
|
|
344
347
|
|
|
345
|
-
{duration && (
|
|
346
|
-
<View style={styles.row}>
|
|
347
|
-
<Text style={styles.label}>Duration:</Text>
|
|
348
|
-
<Text style={styles.value}>{duration}ms</Text>
|
|
349
|
-
</View>
|
|
350
|
-
)}
|
|
351
|
-
|
|
352
348
|
{error && (
|
|
353
349
|
<View style={styles.errorSection}>
|
|
354
350
|
<Text style={styles.errorLabel}>Error:</Text>
|
|
@@ -370,16 +366,24 @@ const HttpLogDetails = ({ log }) => {
|
|
|
370
366
|
}
|
|
371
367
|
/>
|
|
372
368
|
</View>
|
|
373
|
-
<
|
|
369
|
+
<ScrollView
|
|
370
|
+
style={styles.dataContent}
|
|
371
|
+
contentContainerStyle={{ flexGrow: 1 }}
|
|
372
|
+
nestedScrollEnabled={true}
|
|
373
|
+
showsVerticalScrollIndicator={true}>
|
|
374
374
|
<JSONValue value={responseData} maxExpandLevel={1} />
|
|
375
|
-
</
|
|
375
|
+
</ScrollView>
|
|
376
376
|
</View>
|
|
377
377
|
)}
|
|
378
378
|
|
|
379
379
|
<CollapsibleSection title='Headers'>
|
|
380
|
-
<
|
|
380
|
+
<ScrollView
|
|
381
|
+
style={styles.dataContent}
|
|
382
|
+
contentContainerStyle={{ flexGrow: 1 }}
|
|
383
|
+
nestedScrollEnabled={true}
|
|
384
|
+
showsVerticalScrollIndicator={true}>
|
|
381
385
|
<JSONValue value={response.headers || {}} maxExpandLevel={0} />
|
|
382
|
-
</
|
|
386
|
+
</ScrollView>
|
|
383
387
|
</CollapsibleSection>
|
|
384
388
|
</View>
|
|
385
389
|
</CollapsibleSection>
|
|
@@ -556,6 +560,7 @@ const styles = StyleSheet.create({
|
|
|
556
560
|
color: '#666',
|
|
557
561
|
},
|
|
558
562
|
dataContent: {
|
|
563
|
+
flex: 1,
|
|
559
564
|
backgroundColor: '#f8f9fa',
|
|
560
565
|
padding: 10,
|
|
561
566
|
borderRadius: 4,
|
package/package.json
CHANGED