shakebug-react-native 2.3.5 → 2.3.7

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/README.md CHANGED
@@ -26,7 +26,7 @@ Or if you prefer to use Yarn instead of npm:
26
26
  Make sure to install Required Libraries also
27
27
 
28
28
  ```bash
29
- npm i react-native-view-shot react-native-video react-native-video-trim@3.0.9
29
+ npm i react-native-video react-native-video-trim@3.0.9
30
30
  ```
31
31
  Or if you prefer to use Yarn instead of npm:
32
32
 
@@ -84,7 +84,7 @@ you Need to import ShakebugView in root file of application (App.js)
84
84
 
85
85
  ```javascript
86
86
 
87
- Import ShakebugView from 'shakebug-react-native';
87
+ import ShakebugView from 'shakebug-react-native';
88
88
 
89
89
  export default App = () => {
90
90
  return(
File without changes
@@ -0,0 +1,2 @@
1
+ #Wed Apr 29 17:06:34 IST 2026
2
+ gradle.version=8.9
File without changes
package/android/.project CHANGED
@@ -5,11 +5,6 @@
5
5
  <projects>
6
6
  </projects>
7
7
  <buildSpec>
8
- <buildCommand>
9
- <name>org.eclipse.jdt.core.javabuilder</name>
10
- <arguments>
11
- </arguments>
12
- </buildCommand>
13
8
  <buildCommand>
14
9
  <name>org.eclipse.buildship.core.gradleprojectbuilder</name>
15
10
  <arguments>
@@ -17,7 +12,6 @@
17
12
  </buildCommand>
18
13
  </buildSpec>
19
14
  <natures>
20
- <nature>org.eclipse.jdt.core.javanature</nature>
21
15
  <nature>org.eclipse.buildship.core.gradleprojectnature</nature>
22
16
  </natures>
23
17
  <filteredResources>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "shakebug-react-native",
3
3
  "title": "shakebug-react-native",
4
- "version": "2.3.5",
4
+ "version": "2.3.7",
5
5
  "description": "Shakebug allows users to report the bug from your mobile phone for your application. Here users just need to shake their mobile and all the data regarding bugs & crashes can be seen by developers through their log in panel easily",
6
6
  "main": "src/index.tsx",
7
7
  "scripts": {
@@ -1,8 +1,21 @@
1
- import React from 'react';
2
- import { View, Text, Button, StyleSheet, Modal, TouchableOpacity } from 'react-native';
1
+ import React, { useState } from 'react';
2
+ import { View, Text, Button, StyleSheet, Modal, TouchableOpacity, ScrollView, Clipboard, Platform } from 'react-native';
3
3
 
4
- const CustomeAlert = ({color, isVisible, OnPrees, text}) => {
4
+ const CustomeAlert = ({color, isVisible, OnPrees, text, showCopyOption}) => {
5
5
 
6
+ const [copied, setCopied] = useState(false);
7
+
8
+ const handleCopy = () => {
9
+ Clipboard.setString(text);
10
+ setCopied(true);
11
+ setTimeout(() => setCopied(false), 2000);
12
+ };
13
+
14
+ const handleClose = () => {
15
+ setCopied(false);
16
+ OnPrees();
17
+ };
18
+
6
19
  return (
7
20
  <Modal
8
21
  transparent={true}
@@ -17,30 +30,58 @@ const CustomeAlert = ({color, isVisible, OnPrees, text}) => {
17
30
  height: text.length > 120 ? 300 : text.length < 50 ? 170 : 200
18
31
  }]}
19
32
  >
20
- <Text style={styles.text}>
21
- {text}
22
- </Text>
23
-
24
- <TouchableOpacity
25
- style={{
26
- width: '100%',
27
- backgroundColor: color,
28
- height: 40,
29
- alignItems: 'center',
30
- justifyContent: 'center',
31
- borderRadius: 8
32
- }}
33
- onPress={OnPrees}
34
- >
35
- <Text
33
+ {showCopyOption ? (
34
+ <ScrollView
35
+ style={styles.scrollContainer}
36
+ contentContainerStyle={styles.scrollContent}
37
+ showsVerticalScrollIndicator={true}
38
+ >
39
+ <Text style={styles.errorText} selectable={true}>
40
+ {text}
41
+ </Text>
42
+ </ScrollView>
43
+ ) : (
44
+ <Text style={styles.text}>
45
+ {text}
46
+ </Text>
47
+ )}
48
+
49
+ {showCopyOption ? (
50
+ <View style={styles.buttonRow}>
51
+ <TouchableOpacity
52
+ style={[styles.button, { backgroundColor: '#6c757d', marginRight: 10 }]}
53
+ onPress={handleCopy}
54
+ >
55
+ <Text style={styles.buttonText}>
56
+ {copied ? '✓ Copied' : '📋 Copy'}
57
+ </Text>
58
+ </TouchableOpacity>
59
+ <TouchableOpacity
60
+ style={[styles.button, { backgroundColor: color }]}
61
+ onPress={handleClose}
62
+ >
63
+ <Text style={styles.buttonText}>
64
+ Okay
65
+ </Text>
66
+ </TouchableOpacity>
67
+ </View>
68
+ ) : (
69
+ <TouchableOpacity
36
70
  style={{
37
- fontSize: 16,
38
- color: "#fff"
71
+ width: '100%',
72
+ backgroundColor: color,
73
+ height: 40,
74
+ alignItems: 'center',
75
+ justifyContent: 'center',
76
+ borderRadius: 8
39
77
  }}
78
+ onPress={handleClose}
40
79
  >
41
- Okay
42
- </Text>
43
- </TouchableOpacity>
80
+ <Text style={styles.buttonText}>
81
+ Okay
82
+ </Text>
83
+ </TouchableOpacity>
84
+ )}
44
85
  </View>
45
86
  </View>
46
87
  </Modal>
@@ -75,6 +116,40 @@ const styles = StyleSheet.create({
75
116
  textAlign: 'center',
76
117
  color: "#000"
77
118
  },
119
+ scrollContainer: {
120
+ maxHeight: 140,
121
+ width: '100%',
122
+ backgroundColor: '#f8f9fa',
123
+ borderRadius: 8,
124
+ borderWidth: 1,
125
+ borderColor: '#dee2e6',
126
+ },
127
+ scrollContent: {
128
+ padding: 12,
129
+ },
130
+ errorText: {
131
+ fontSize: 13,
132
+ color: '#dc3545',
133
+ lineHeight: 18,
134
+ fontFamily: Platform.OS === 'ios' ? 'Menlo' : 'monospace',
135
+ },
136
+ buttonRow: {
137
+ flexDirection: 'row',
138
+ width: '100%',
139
+ justifyContent: 'center',
140
+ marginTop: 10,
141
+ },
142
+ button: {
143
+ flex: 1,
144
+ height: 40,
145
+ alignItems: 'center',
146
+ justifyContent: 'center',
147
+ borderRadius: 8,
148
+ },
149
+ buttonText: {
150
+ fontSize: 16,
151
+ color: '#fff',
152
+ },
78
153
  });
79
154
 
80
155
  export default CustomeAlert;
@@ -254,7 +254,7 @@ const AddDetailsScreen = ({ media, updateParent, mediaType, themeColor, SDKScree
254
254
  log.debug("------------------------------------------------------------------------------------------")
255
255
  } else {
256
256
  setIsLoading(false)
257
- setAPIMessage("Something went wrong! Please try again later!")
257
+ setAPIMessage(message || "Something went wrong! Please try again later!")
258
258
  setErrorInAPI(true)
259
259
  log.debug("------------------------------------------------------------------------------------------")
260
260
  log.warn('API response:', message);
@@ -262,7 +262,8 @@ const AddDetailsScreen = ({ media, updateParent, mediaType, themeColor, SDKScree
262
262
  }
263
263
  }
264
264
  catch (err) {
265
- setAPIMessage("Something went wrong! Please try again later!")
265
+ const errorMsg = err?.message || err?.toString() || "Something went wrong! Please try again later!"
266
+ setAPIMessage(errorMsg)
266
267
  setErrorInAPI(true)
267
268
  setIsLoading(false)
268
269
  log.error("err", err)
@@ -432,6 +433,7 @@ const AddDetailsScreen = ({ media, updateParent, mediaType, themeColor, SDKScree
432
433
  isVisible={isErrorInAPI || isBugReported}
433
434
  text={apiMessage}
434
435
  color={themeColor}
436
+ showCopyOption={isErrorInAPI}
435
437
  OnPrees={() => {
436
438
  if (isBugReported) {
437
439
  global.isScreenShotDetected = false;
@@ -53,7 +53,7 @@ global.isScreeenShotTaken = false;
53
53
  global.restrictedViews = [];
54
54
  global.currentScreen = ""
55
55
  global.isShakebugSDKOpen = false;
56
- global.sdk_version = "2.3.4";
56
+ global.sdk_version = "2.3.7";
57
57
  global.app_lunch_count = 0;
58
58
  global.POPUP_LAUNCH_THRESHOLD = 3;
59
59
  global.POPUP_COOLDOWN_DAYS = 2;