react-native-in-app-debugger 1.0.29 → 1.0.31
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/Api.jsx +3 -3
- package/Text.jsx +4 -0
- package/Variables.jsx +2 -1
- package/index.jsx +15 -5
- package/package.json +1 -1
package/Api.jsx
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React, { useState } from "react";
|
|
2
2
|
import {
|
|
3
|
-
Text,
|
|
4
3
|
SectionList,
|
|
5
4
|
TextInput,
|
|
6
5
|
View,
|
|
@@ -8,7 +7,7 @@ import {
|
|
|
8
7
|
StyleSheet,
|
|
9
8
|
TouchableOpacity,
|
|
10
9
|
} from "react-native";
|
|
11
|
-
|
|
10
|
+
import Text from "./Text";
|
|
12
11
|
let Clipboard;
|
|
13
12
|
try {
|
|
14
13
|
Clipboard = require("@react-native-clipboard/clipboard")?.default;
|
|
@@ -130,7 +129,8 @@ export default (props) => {
|
|
|
130
129
|
textDecorationLine: errorOnly ? "line-through" : undefined,
|
|
131
130
|
}}
|
|
132
131
|
>
|
|
133
|
-
{apis.filter(isError).length} error
|
|
132
|
+
{apis.filter(isError).length} error
|
|
133
|
+
{apis.filter(isError).length > 1 ? "s" : ""}
|
|
134
134
|
</Text>
|
|
135
135
|
</TouchableOpacity>
|
|
136
136
|
)}
|
package/Text.jsx
ADDED
package/Variables.jsx
CHANGED
package/index.jsx
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import React, { useState } from "react";
|
|
2
2
|
import {
|
|
3
3
|
Animated,
|
|
4
|
-
Text,
|
|
5
4
|
StyleSheet,
|
|
6
5
|
TouchableOpacity,
|
|
7
6
|
View,
|
|
8
7
|
SafeAreaView,
|
|
9
8
|
Dimensions,
|
|
10
9
|
} from "react-native";
|
|
11
|
-
|
|
10
|
+
import Text from "./Text";
|
|
12
11
|
let DeviceInfo;
|
|
13
12
|
try {
|
|
14
13
|
DeviceInfo = require("react-native-device-info");
|
|
@@ -23,13 +22,15 @@ import useApiInterceptor from "./useApiInterceptor";
|
|
|
23
22
|
|
|
24
23
|
const dimension = Dimensions.get("window");
|
|
25
24
|
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
let v = "";
|
|
28
26
|
let modelOs;
|
|
29
27
|
if (DeviceInfo) {
|
|
30
28
|
let model = DeviceInfo.getDeviceId();
|
|
31
29
|
if (model === "unknown") model = DeviceInfo.getModel();
|
|
32
30
|
modelOs = model + " - " + DeviceInfo.getSystemVersion();
|
|
31
|
+
const pcs = DeviceInfo.getReadableVersion().split(".");
|
|
32
|
+
const lastPc = pcs.pop();
|
|
33
|
+
v = pcs.join(".") + "-" + lastPc;
|
|
33
34
|
}
|
|
34
35
|
|
|
35
36
|
const Label = (props) => (
|
|
@@ -87,7 +88,11 @@ export default ({
|
|
|
87
88
|
{...(isOpen ? {} : panResponder.panHandlers)}
|
|
88
89
|
>
|
|
89
90
|
{!isOpen ? (
|
|
90
|
-
<TouchableOpacity
|
|
91
|
+
<TouchableOpacity
|
|
92
|
+
onPress={() => setIsOpen(true)}
|
|
93
|
+
style={styles.box}
|
|
94
|
+
activeOpacity={0.8}
|
|
95
|
+
>
|
|
91
96
|
<View style={styles.badgeContainer}>
|
|
92
97
|
{!!numPendingApiCalls && (
|
|
93
98
|
<View style={[styles.badge, { backgroundColor: "orange" }]}>
|
|
@@ -117,6 +122,11 @@ export default ({
|
|
|
117
122
|
</TouchableOpacity>
|
|
118
123
|
) : (
|
|
119
124
|
<SafeAreaView style={{ flex: 1 }}>
|
|
125
|
+
{!!version && (
|
|
126
|
+
<View style={{ backgroundColor: "black" }}>
|
|
127
|
+
<Label>{version}</Label>
|
|
128
|
+
</View>
|
|
129
|
+
)}
|
|
120
130
|
<View style={{ flexDirection: "row", padding: 5 }}>
|
|
121
131
|
<View style={{ flex: 1, flexDirection: "row" }}>
|
|
122
132
|
{!!variables &&
|