aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/features/publishDebugInfo/Component.js22
-rw-r--r--src/i18n/messages/src/features/publishDebugInfo/Component.json28
2 files changed, 31 insertions, 19 deletions
diff --git a/src/features/publishDebugInfo/Component.js b/src/features/publishDebugInfo/Component.js
index e7949a0be..f97a7c750 100644
--- a/src/features/publishDebugInfo/Component.js
+++ b/src/features/publishDebugInfo/Component.js
@@ -13,6 +13,8 @@ import { DEBUG_API } from '../../config';
13import AppStore from '../../stores/AppStore'; 13import AppStore from '../../stores/AppStore';
14import ServicesStore from '../../stores/ServicesStore'; 14import ServicesStore from '../../stores/ServicesStore';
15 15
16const debug = require('debug')('Ferdi:feature:publishDebugInfo');
17
16const messages = defineMessages({ 18const messages = defineMessages({
17 title: { 19 title: {
18 id: 'feature.publishDebugInfo.title', 20 id: 'feature.publishDebugInfo.title',
@@ -100,6 +102,7 @@ export default @injectSheet(styles) @inject('stores', 'actions') @observer class
100 } 102 }
101 103
102 async publishDebugInfo() { 104 async publishDebugInfo() {
105 debug('debugInfo: starting publish');
103 this.setState({ 106 this.setState({
104 isSendingLog: true, 107 isSendingLog: true,
105 }); 108 });
@@ -112,17 +115,26 @@ export default @injectSheet(styles) @inject('stores', 'actions') @observer class
112 log: debugInfo, 115 log: debugInfo,
113 }), 116 }),
114 }, false); 117 }, false);
115 const response = await request.json();
116 118
117 if (response.id) { 119 debug(`debugInfo: publishing status: ${request.status}`);
118 this.setState({ 120 if (request.status === 200) {
119 log: response.id, 121 const response = await request.json();
120 }); 122 if (response.id) {
123 this.setState({
124 log: response.id,
125 });
126 } else {
127 this.setState({
128 error: true,
129 });
130 }
121 } else { 131 } else {
122 this.setState({ 132 this.setState({
123 error: true, 133 error: true,
124 }); 134 });
125 } 135 }
136
137 debug('debugInfo: finished publishing');
126 } 138 }
127 139
128 render() { 140 render() {
diff --git a/src/i18n/messages/src/features/publishDebugInfo/Component.json b/src/i18n/messages/src/features/publishDebugInfo/Component.json
index 25048ace6..4d07a4794 100644
--- a/src/i18n/messages/src/features/publishDebugInfo/Component.json
+++ b/src/i18n/messages/src/features/publishDebugInfo/Component.json
@@ -4,11 +4,11 @@
4 "defaultMessage": "!!!Publish debug information", 4 "defaultMessage": "!!!Publish debug information",
5 "file": "src/features/publishDebugInfo/Component.js", 5 "file": "src/features/publishDebugInfo/Component.js",
6 "start": { 6 "start": {
7 "line": 17, 7 "line": 19,
8 "column": 9 8 "column": 9
9 }, 9 },
10 "end": { 10 "end": {
11 "line": 20, 11 "line": 22,
12 "column": 3 12 "column": 3
13 } 13 }
14 }, 14 },
@@ -17,11 +17,11 @@
17 "defaultMessage": "!!!Publishing your debug information helps us find issues and errors in Ferdi. By publishing your debug information you accept Ferdi Debugger's privacy policy and terms of service", 17 "defaultMessage": "!!!Publishing your debug information helps us find issues and errors in Ferdi. By publishing your debug information you accept Ferdi Debugger's privacy policy and terms of service",
18 "file": "src/features/publishDebugInfo/Component.js", 18 "file": "src/features/publishDebugInfo/Component.js",
19 "start": { 19 "start": {
20 "line": 21, 20 "line": 23,
21 "column": 8 21 "column": 8
22 }, 22 },
23 "end": { 23 "end": {
24 "line": 24, 24 "line": 26,
25 "column": 3 25 "column": 3
26 } 26 }
27 }, 27 },
@@ -30,11 +30,11 @@
30 "defaultMessage": "!!!There was an error while trying to publish the debug information. Please try again later or view the console for more information.", 30 "defaultMessage": "!!!There was an error while trying to publish the debug information. Please try again later or view the console for more information.",
31 "file": "src/features/publishDebugInfo/Component.js", 31 "file": "src/features/publishDebugInfo/Component.js",
32 "start": { 32 "start": {
33 "line": 25, 33 "line": 27,
34 "column": 9 34 "column": 9
35 }, 35 },
36 "end": { 36 "end": {
37 "line": 28, 37 "line": 30,
38 "column": 3 38 "column": 3
39 } 39 }
40 }, 40 },
@@ -43,11 +43,11 @@
43 "defaultMessage": "!!!Privacy policy", 43 "defaultMessage": "!!!Privacy policy",
44 "file": "src/features/publishDebugInfo/Component.js", 44 "file": "src/features/publishDebugInfo/Component.js",
45 "start": { 45 "start": {
46 "line": 29, 46 "line": 31,
47 "column": 11 47 "column": 11
48 }, 48 },
49 "end": { 49 "end": {
50 "line": 32, 50 "line": 34,
51 "column": 3 51 "column": 3
52 } 52 }
53 }, 53 },
@@ -56,11 +56,11 @@
56 "defaultMessage": "!!!Terms of service", 56 "defaultMessage": "!!!Terms of service",
57 "file": "src/features/publishDebugInfo/Component.js", 57 "file": "src/features/publishDebugInfo/Component.js",
58 "start": { 58 "start": {
59 "line": 33, 59 "line": 35,
60 "column": 9 60 "column": 9
61 }, 61 },
62 "end": { 62 "end": {
63 "line": 36, 63 "line": 38,
64 "column": 3 64 "column": 3
65 } 65 }
66 }, 66 },
@@ -69,11 +69,11 @@
69 "defaultMessage": "!!!Accept and publish", 69 "defaultMessage": "!!!Accept and publish",
70 "file": "src/features/publishDebugInfo/Component.js", 70 "file": "src/features/publishDebugInfo/Component.js",
71 "start": { 71 "start": {
72 "line": 37, 72 "line": 39,
73 "column": 11 73 "column": 11
74 }, 74 },
75 "end": { 75 "end": {
76 "line": 40, 76 "line": 42,
77 "column": 3 77 "column": 3
78 } 78 }
79 }, 79 },
@@ -82,11 +82,11 @@
82 "defaultMessage": "!!!Your debug log was published and is now availible at", 82 "defaultMessage": "!!!Your debug log was published and is now availible at",
83 "file": "src/features/publishDebugInfo/Component.js", 83 "file": "src/features/publishDebugInfo/Component.js",
84 "start": { 84 "start": {
85 "line": 41, 85 "line": 43,
86 "column": 13 86 "column": 13
87 }, 87 },
88 "end": { 88 "end": {
89 "line": 44, 89 "line": 46,
90 "column": 3 90 "column": 3
91 } 91 }
92 } 92 }