diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/components/layout/AppLayout.js | 2 | ||||
-rw-r--r-- | src/config.js | 2 | ||||
-rw-r--r-- | src/features/publishDebugInfo/Component.js | 181 | ||||
-rw-r--r-- | src/features/publishDebugInfo/index.js | 24 | ||||
-rw-r--r-- | src/i18n/messages/src/components/layout/AppLayout.json | 16 | ||||
-rw-r--r-- | src/i18n/messages/src/features/publishDebugInfo/Component.json | 80 | ||||
-rw-r--r-- | src/i18n/messages/src/lib/Menu.json | 145 | ||||
-rw-r--r-- | src/lib/Menu.js | 15 | ||||
-rw-r--r-- | src/stores/FeaturesStore.js | 2 |
9 files changed, 390 insertions, 77 deletions
diff --git a/src/components/layout/AppLayout.js b/src/components/layout/AppLayout.js index 80e6daf19..fe43c42d2 100644 --- a/src/components/layout/AppLayout.js +++ b/src/components/layout/AppLayout.js | |||
@@ -9,6 +9,7 @@ import InfoBar from '../ui/InfoBar'; | |||
9 | import { Component as BasicAuth } from '../../features/basicAuth'; | 9 | import { Component as BasicAuth } from '../../features/basicAuth'; |
10 | import { Component as ShareFranz } from '../../features/shareFranz'; | 10 | import { Component as ShareFranz } from '../../features/shareFranz'; |
11 | import { Component as QuickSwitch } from '../../features/quickSwitch'; | 11 | import { Component as QuickSwitch } from '../../features/quickSwitch'; |
12 | import { Component as PublishDebugInfo } from '../../features/publishDebugInfo'; | ||
12 | import ErrorBoundary from '../util/ErrorBoundary'; | 13 | import ErrorBoundary from '../util/ErrorBoundary'; |
13 | 14 | ||
14 | // import globalMessages from '../../i18n/globalMessages'; | 15 | // import globalMessages from '../../i18n/globalMessages'; |
@@ -189,6 +190,7 @@ class AppLayout extends Component { | |||
189 | <BasicAuth /> | 190 | <BasicAuth /> |
190 | <ShareFranz /> | 191 | <ShareFranz /> |
191 | <QuickSwitch /> | 192 | <QuickSwitch /> |
193 | <PublishDebugInfo /> | ||
192 | {services} | 194 | {services} |
193 | {children} | 195 | {children} |
194 | <TrialStatusBar /> | 196 | <TrialStatusBar /> |
diff --git a/src/config.js b/src/config.js index 1db881d35..834f89d01 100644 --- a/src/config.js +++ b/src/config.js | |||
@@ -14,6 +14,8 @@ export const LOCAL_API = 'http://localhost:3000'; | |||
14 | export const DEV_API = 'https://dev.franzinfra.com'; | 14 | export const DEV_API = 'https://dev.franzinfra.com'; |
15 | export const LIVE_API = 'https://api.getferdi.com'; | 15 | export const LIVE_API = 'https://api.getferdi.com'; |
16 | 16 | ||
17 | export const DEBUG_API = 'http://localhost:3333'; | ||
18 | |||
17 | export const LOCAL_WS_API = 'ws://localhost:3000'; | 19 | export const LOCAL_WS_API = 'ws://localhost:3000'; |
18 | export const DEV_WS_API = 'wss://dev.franzinfra.com'; | 20 | export const DEV_WS_API = 'wss://dev.franzinfra.com'; |
19 | export const LIVE_WS_API = 'wss://api.franzinfra.com'; | 21 | export const LIVE_WS_API = 'wss://api.franzinfra.com'; |
diff --git a/src/features/publishDebugInfo/Component.js b/src/features/publishDebugInfo/Component.js new file mode 100644 index 000000000..9e59fa205 --- /dev/null +++ b/src/features/publishDebugInfo/Component.js | |||
@@ -0,0 +1,181 @@ | |||
1 | import React, { Component } from 'react'; | ||
2 | import PropTypes from 'prop-types'; | ||
3 | import { observer, inject } from 'mobx-react'; | ||
4 | import { defineMessages, intlShape } from 'react-intl'; | ||
5 | import { H1 } from '@meetfranz/ui'; | ||
6 | import injectSheet from 'react-jss'; | ||
7 | |||
8 | import Input from '../../components/ui/Input'; | ||
9 | import Button from '../../components/ui/Button'; | ||
10 | import Modal from '../../components/ui/Modal'; | ||
11 | import { state as ModalState } from '.'; | ||
12 | import AppStore from '../../stores/AppStore'; | ||
13 | import { DEBUG_API } from '../../config'; | ||
14 | import { sendAuthRequest } from '../../api/utils/auth'; | ||
15 | |||
16 | const messages = defineMessages({ | ||
17 | title: { | ||
18 | id: 'feature.publishDebugInfo.title', | ||
19 | defaultMessage: '!!!Publish debug information', | ||
20 | }, | ||
21 | info: { | ||
22 | id: 'feature.publishDebugInfo.info', | ||
23 | 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', | ||
24 | }, | ||
25 | privacy: { | ||
26 | id: 'feature.publishDebugInfo.privacy', | ||
27 | defaultMessage: '!!!Privacy policy', | ||
28 | }, | ||
29 | terms: { | ||
30 | id: 'feature.publishDebugInfo.terms', | ||
31 | defaultMessage: '!!!Terms of service', | ||
32 | }, | ||
33 | publish: { | ||
34 | id: 'feature.publishDebugInfo.publish', | ||
35 | defaultMessage: '!!!Accept and publish', | ||
36 | }, | ||
37 | published: { | ||
38 | id: 'feature.publishDebugInfo.published', | ||
39 | defaultMessage: '!!!Your debug log was published and is now availible at', | ||
40 | }, | ||
41 | }); | ||
42 | |||
43 | const styles = theme => ({ | ||
44 | info: { | ||
45 | paddingTop: 20, | ||
46 | paddingBottom: 20, | ||
47 | }, | ||
48 | link: { | ||
49 | color: theme.styleTypes.primary.accent + ' !important', | ||
50 | padding: 10, | ||
51 | cursor: 'pointer', | ||
52 | }, | ||
53 | button: { | ||
54 | width: '100%', | ||
55 | marginTop: 10, | ||
56 | cursor: 'pointer', | ||
57 | }, | ||
58 | url: { | ||
59 | marginTop: 20, | ||
60 | |||
61 | '& > div': { | ||
62 | fontFamily: 'SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace', | ||
63 | }, | ||
64 | }, | ||
65 | }); | ||
66 | |||
67 | export default @injectSheet(styles) @inject('stores') @observer class PublishDebugLogModal extends Component { | ||
68 | static propTypes = { | ||
69 | classes: PropTypes.object.isRequired, | ||
70 | }; | ||
71 | |||
72 | static contextTypes = { | ||
73 | intl: intlShape, | ||
74 | }; | ||
75 | |||
76 | state = { | ||
77 | log: null, | ||
78 | isSendingLog: false, | ||
79 | } | ||
80 | |||
81 | // Close this modal | ||
82 | close() { | ||
83 | ModalState.isModalVisible = false; | ||
84 | } | ||
85 | |||
86 | async publishDebugInfo() { | ||
87 | this.setState({ | ||
88 | isSendingLog: true, | ||
89 | }) | ||
90 | |||
91 | const debugInfo = JSON.stringify(this.props.stores.app.debugInfo); | ||
92 | |||
93 | const request = await sendAuthRequest(`${DEBUG_API}/create`, { | ||
94 | method: 'POST', | ||
95 | body: JSON.stringify({ | ||
96 | log: debugInfo | ||
97 | }), | ||
98 | }, false); | ||
99 | const response = await request.json(); | ||
100 | console.log(response); | ||
101 | if (response.id) { | ||
102 | this.setState({ | ||
103 | log: response.id, | ||
104 | }) | ||
105 | } else { | ||
106 | // TODO: Show error message | ||
107 | this.close(); | ||
108 | } | ||
109 | } | ||
110 | |||
111 | render() { | ||
112 | const { isModalVisible } = ModalState; | ||
113 | |||
114 | const { | ||
115 | classes, | ||
116 | } = this.props; | ||
117 | |||
118 | const { | ||
119 | log | ||
120 | } = this.state; | ||
121 | |||
122 | const { intl } = this.context; | ||
123 | |||
124 | return ( | ||
125 | <Modal | ||
126 | isOpen={isModalVisible} | ||
127 | shouldCloseOnOverlayClick | ||
128 | close={this.close.bind(this)} | ||
129 | > | ||
130 | <H1> | ||
131 | {intl.formatMessage(messages.title)} | ||
132 | </H1> | ||
133 | { log ? ( | ||
134 | <> | ||
135 | <p className={classes.info}>{intl.formatMessage(messages.published)}</p> | ||
136 | <Input | ||
137 | className={classes.url} | ||
138 | showLabel={false} | ||
139 | field={{ | ||
140 | type: 'url', | ||
141 | value: DEBUG_API + '/' + log, | ||
142 | disabled: true, | ||
143 | }} | ||
144 | readonly | ||
145 | /> | ||
146 | </> | ||
147 | ) : ( | ||
148 | <> | ||
149 | <p className={classes.info}>{intl.formatMessage(messages.info)}</p> | ||
150 | |||
151 | <a href={ DEBUG_API + '/privacy.html' } target="_blank" className={classes.link}> | ||
152 | {intl.formatMessage(messages.privacy)} | ||
153 | </a> | ||
154 | <a href={ DEBUG_API + '/terms.html' } target="_blank" className={classes.link}> | ||
155 | {intl.formatMessage(messages.terms)} | ||
156 | </a> | ||
157 | |||
158 | <Button | ||
159 | type="button" | ||
160 | label={intl.formatMessage(messages.publish)} | ||
161 | className={classes.button} | ||
162 | onClick={this.publishDebugInfo.bind(this)} | ||
163 | disabled={this.state.isSendingLog} | ||
164 | /> | ||
165 | </> | ||
166 | ) } | ||
167 | </Modal> | ||
168 | ); | ||
169 | } | ||
170 | } | ||
171 | |||
172 | PublishDebugLogModal.wrappedComponent.propTypes = { | ||
173 | stores: PropTypes.shape({ | ||
174 | app: PropTypes.instanceOf(AppStore).isRequired, | ||
175 | }).isRequired, | ||
176 | actions: PropTypes.shape({ | ||
177 | service: PropTypes.shape({ | ||
178 | setActive: PropTypes.func.isRequired, | ||
179 | }).isRequired, | ||
180 | }).isRequired, | ||
181 | }; | ||
diff --git a/src/features/publishDebugInfo/index.js b/src/features/publishDebugInfo/index.js new file mode 100644 index 000000000..7d0d310c2 --- /dev/null +++ b/src/features/publishDebugInfo/index.js | |||
@@ -0,0 +1,24 @@ | |||
1 | import { observable } from 'mobx'; | ||
2 | |||
3 | export { default as Component } from './Component'; | ||
4 | |||
5 | const debug = require('debug')('Ferdi:feature:publishDebugInfo'); | ||
6 | |||
7 | const defaultState = { | ||
8 | isModalVisible: false, | ||
9 | }; | ||
10 | |||
11 | export const state = observable(defaultState); | ||
12 | |||
13 | export default function initialize() { | ||
14 | debug('Initialize publishDebugInfo feature'); | ||
15 | |||
16 | function showModal() { | ||
17 | state.isModalVisible = true; | ||
18 | } | ||
19 | |||
20 | window.ferdi.features.publishDebugInfo = { | ||
21 | state, | ||
22 | showModal, | ||
23 | }; | ||
24 | } | ||
diff --git a/src/i18n/messages/src/components/layout/AppLayout.json b/src/i18n/messages/src/components/layout/AppLayout.json index bca181d0f..5a8e082f2 100644 --- a/src/i18n/messages/src/components/layout/AppLayout.json +++ b/src/i18n/messages/src/components/layout/AppLayout.json | |||
@@ -4,11 +4,11 @@ | |||
4 | "defaultMessage": "!!!Your services have been updated.", | 4 | "defaultMessage": "!!!Your services have been updated.", |
5 | "file": "src/components/layout/AppLayout.js", | 5 | "file": "src/components/layout/AppLayout.js", |
6 | "start": { | 6 | "start": { |
7 | "line": 30, | 7 | "line": 31, |
8 | "column": 19 | 8 | "column": 19 |
9 | }, | 9 | }, |
10 | "end": { | 10 | "end": { |
11 | "line": 33, | 11 | "line": 34, |
12 | "column": 3 | 12 | "column": 3 |
13 | } | 13 | } |
14 | }, | 14 | }, |
@@ -17,11 +17,11 @@ | |||
17 | "defaultMessage": "!!!Reload services", | 17 | "defaultMessage": "!!!Reload services", |
18 | "file": "src/components/layout/AppLayout.js", | 18 | "file": "src/components/layout/AppLayout.js", |
19 | "start": { | 19 | "start": { |
20 | "line": 34, | 20 | "line": 35, |
21 | "column": 24 | 21 | "column": 24 |
22 | }, | 22 | }, |
23 | "end": { | 23 | "end": { |
24 | "line": 37, | 24 | "line": 38, |
25 | "column": 3 | 25 | "column": 3 |
26 | } | 26 | } |
27 | }, | 27 | }, |
@@ -30,11 +30,11 @@ | |||
30 | "defaultMessage": "!!!Could not load services and user information", | 30 | "defaultMessage": "!!!Could not load services and user information", |
31 | "file": "src/components/layout/AppLayout.js", | 31 | "file": "src/components/layout/AppLayout.js", |
32 | "start": { | 32 | "start": { |
33 | "line": 38, | 33 | "line": 39, |
34 | "column": 26 | 34 | "column": 26 |
35 | }, | 35 | }, |
36 | "end": { | 36 | "end": { |
37 | "line": 41, | 37 | "line": 42, |
38 | "column": 3 | 38 | "column": 3 |
39 | } | 39 | } |
40 | }, | 40 | }, |
@@ -43,11 +43,11 @@ | |||
43 | "defaultMessage": "!!!There were errors while trying to perform an authenticated request. Please try logging out and back in if this error persists.", | 43 | "defaultMessage": "!!!There were errors while trying to perform an authenticated request. Please try logging out and back in if this error persists.", |
44 | "file": "src/components/layout/AppLayout.js", | 44 | "file": "src/components/layout/AppLayout.js", |
45 | "start": { | 45 | "start": { |
46 | "line": 42, | 46 | "line": 43, |
47 | "column": 21 | 47 | "column": 21 |
48 | }, | 48 | }, |
49 | "end": { | 49 | "end": { |
50 | "line": 45, | 50 | "line": 46, |
51 | "column": 3 | 51 | "column": 3 |
52 | } | 52 | } |
53 | } | 53 | } |
diff --git a/src/i18n/messages/src/features/publishDebugInfo/Component.json b/src/i18n/messages/src/features/publishDebugInfo/Component.json new file mode 100644 index 000000000..500f2c01b --- /dev/null +++ b/src/i18n/messages/src/features/publishDebugInfo/Component.json | |||
@@ -0,0 +1,80 @@ | |||
1 | [ | ||
2 | { | ||
3 | "id": "feature.publishDebugInfo.title", | ||
4 | "defaultMessage": "!!!Publish debug information", | ||
5 | "file": "src/features/publishDebugInfo/Component.js", | ||
6 | "start": { | ||
7 | "line": 17, | ||
8 | "column": 9 | ||
9 | }, | ||
10 | "end": { | ||
11 | "line": 20, | ||
12 | "column": 3 | ||
13 | } | ||
14 | }, | ||
15 | { | ||
16 | "id": "feature.publishDebugInfo.info", | ||
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", | ||
19 | "start": { | ||
20 | "line": 21, | ||
21 | "column": 8 | ||
22 | }, | ||
23 | "end": { | ||
24 | "line": 24, | ||
25 | "column": 3 | ||
26 | } | ||
27 | }, | ||
28 | { | ||
29 | "id": "feature.publishDebugInfo.privacy", | ||
30 | "defaultMessage": "!!!Privacy policy", | ||
31 | "file": "src/features/publishDebugInfo/Component.js", | ||
32 | "start": { | ||
33 | "line": 25, | ||
34 | "column": 11 | ||
35 | }, | ||
36 | "end": { | ||
37 | "line": 28, | ||
38 | "column": 3 | ||
39 | } | ||
40 | }, | ||
41 | { | ||
42 | "id": "feature.publishDebugInfo.terms", | ||
43 | "defaultMessage": "!!!Terms of service", | ||
44 | "file": "src/features/publishDebugInfo/Component.js", | ||
45 | "start": { | ||
46 | "line": 29, | ||
47 | "column": 9 | ||
48 | }, | ||
49 | "end": { | ||
50 | "line": 32, | ||
51 | "column": 3 | ||
52 | } | ||
53 | }, | ||
54 | { | ||
55 | "id": "feature.publishDebugInfo.publish", | ||
56 | "defaultMessage": "!!!Accept and publish", | ||
57 | "file": "src/features/publishDebugInfo/Component.js", | ||
58 | "start": { | ||
59 | "line": 33, | ||
60 | "column": 11 | ||
61 | }, | ||
62 | "end": { | ||
63 | "line": 36, | ||
64 | "column": 3 | ||
65 | } | ||
66 | }, | ||
67 | { | ||
68 | "id": "feature.publishDebugInfo.published", | ||
69 | "defaultMessage": "!!!Your debug log was published and is now availible at", | ||
70 | "file": "src/features/publishDebugInfo/Component.js", | ||
71 | "start": { | ||
72 | "line": 37, | ||
73 | "column": 13 | ||
74 | }, | ||
75 | "end": { | ||
76 | "line": 40, | ||
77 | "column": 3 | ||
78 | } | ||
79 | } | ||
80 | ] \ No newline at end of file | ||
diff --git a/src/i18n/messages/src/lib/Menu.json b/src/i18n/messages/src/lib/Menu.json index f69d951fd..e323d6174 100644 --- a/src/i18n/messages/src/lib/Menu.json +++ b/src/i18n/messages/src/lib/Menu.json | |||
@@ -455,15 +455,28 @@ | |||
455 | } | 455 | } |
456 | }, | 456 | }, |
457 | { | 457 | { |
458 | "id": "menu.help.publishDebugInfo", | ||
459 | "defaultMessage": "!!!Publish Debug Information", | ||
460 | "file": "src/lib/Menu.js", | ||
461 | "start": { | ||
462 | "line": 157, | ||
463 | "column": 20 | ||
464 | }, | ||
465 | "end": { | ||
466 | "line": 160, | ||
467 | "column": 3 | ||
468 | } | ||
469 | }, | ||
470 | { | ||
458 | "id": "menu.help.debugInfoCopiedHeadline", | 471 | "id": "menu.help.debugInfoCopiedHeadline", |
459 | "defaultMessage": "!!!Ferdi Debug Information", | 472 | "defaultMessage": "!!!Ferdi Debug Information", |
460 | "file": "src/lib/Menu.js", | 473 | "file": "src/lib/Menu.js", |
461 | "start": { | 474 | "start": { |
462 | "line": 157, | 475 | "line": 161, |
463 | "column": 27 | 476 | "column": 27 |
464 | }, | 477 | }, |
465 | "end": { | 478 | "end": { |
466 | "line": 160, | 479 | "line": 164, |
467 | "column": 3 | 480 | "column": 3 |
468 | } | 481 | } |
469 | }, | 482 | }, |
@@ -472,11 +485,11 @@ | |||
472 | "defaultMessage": "!!!Your Debug Information has been copied to your clipboard.", | 485 | "defaultMessage": "!!!Your Debug Information has been copied to your clipboard.", |
473 | "file": "src/lib/Menu.js", | 486 | "file": "src/lib/Menu.js", |
474 | "start": { | 487 | "start": { |
475 | "line": 161, | 488 | "line": 165, |
476 | "column": 23 | 489 | "column": 23 |
477 | }, | 490 | }, |
478 | "end": { | 491 | "end": { |
479 | "line": 164, | 492 | "line": 168, |
480 | "column": 3 | 493 | "column": 3 |
481 | } | 494 | } |
482 | }, | 495 | }, |
@@ -485,11 +498,11 @@ | |||
485 | "defaultMessage": "!!!Terms of Service", | 498 | "defaultMessage": "!!!Terms of Service", |
486 | "file": "src/lib/Menu.js", | 499 | "file": "src/lib/Menu.js", |
487 | "start": { | 500 | "start": { |
488 | "line": 165, | 501 | "line": 169, |
489 | "column": 7 | 502 | "column": 7 |
490 | }, | 503 | }, |
491 | "end": { | 504 | "end": { |
492 | "line": 168, | 505 | "line": 172, |
493 | "column": 3 | 506 | "column": 3 |
494 | } | 507 | } |
495 | }, | 508 | }, |
@@ -498,11 +511,11 @@ | |||
498 | "defaultMessage": "!!!Privacy Statement", | 511 | "defaultMessage": "!!!Privacy Statement", |
499 | "file": "src/lib/Menu.js", | 512 | "file": "src/lib/Menu.js", |
500 | "start": { | 513 | "start": { |
501 | "line": 169, | 514 | "line": 173, |
502 | "column": 11 | 515 | "column": 11 |
503 | }, | 516 | }, |
504 | "end": { | 517 | "end": { |
505 | "line": 172, | 518 | "line": 176, |
506 | "column": 3 | 519 | "column": 3 |
507 | } | 520 | } |
508 | }, | 521 | }, |
@@ -511,11 +524,11 @@ | |||
511 | "defaultMessage": "!!!File", | 524 | "defaultMessage": "!!!File", |
512 | "file": "src/lib/Menu.js", | 525 | "file": "src/lib/Menu.js", |
513 | "start": { | 526 | "start": { |
514 | "line": 173, | 527 | "line": 177, |
515 | "column": 8 | 528 | "column": 8 |
516 | }, | 529 | }, |
517 | "end": { | 530 | "end": { |
518 | "line": 176, | 531 | "line": 180, |
519 | "column": 3 | 532 | "column": 3 |
520 | } | 533 | } |
521 | }, | 534 | }, |
@@ -524,11 +537,11 @@ | |||
524 | "defaultMessage": "!!!View", | 537 | "defaultMessage": "!!!View", |
525 | "file": "src/lib/Menu.js", | 538 | "file": "src/lib/Menu.js", |
526 | "start": { | 539 | "start": { |
527 | "line": 177, | 540 | "line": 181, |
528 | "column": 8 | 541 | "column": 8 |
529 | }, | 542 | }, |
530 | "end": { | 543 | "end": { |
531 | "line": 180, | 544 | "line": 184, |
532 | "column": 3 | 545 | "column": 3 |
533 | } | 546 | } |
534 | }, | 547 | }, |
@@ -537,11 +550,11 @@ | |||
537 | "defaultMessage": "!!!Services", | 550 | "defaultMessage": "!!!Services", |
538 | "file": "src/lib/Menu.js", | 551 | "file": "src/lib/Menu.js", |
539 | "start": { | 552 | "start": { |
540 | "line": 181, | 553 | "line": 185, |
541 | "column": 12 | 554 | "column": 12 |
542 | }, | 555 | }, |
543 | "end": { | 556 | "end": { |
544 | "line": 184, | 557 | "line": 188, |
545 | "column": 3 | 558 | "column": 3 |
546 | } | 559 | } |
547 | }, | 560 | }, |
@@ -550,11 +563,11 @@ | |||
550 | "defaultMessage": "!!!Window", | 563 | "defaultMessage": "!!!Window", |
551 | "file": "src/lib/Menu.js", | 564 | "file": "src/lib/Menu.js", |
552 | "start": { | 565 | "start": { |
553 | "line": 185, | 566 | "line": 189, |
554 | "column": 10 | 567 | "column": 10 |
555 | }, | 568 | }, |
556 | "end": { | 569 | "end": { |
557 | "line": 188, | 570 | "line": 192, |
558 | "column": 3 | 571 | "column": 3 |
559 | } | 572 | } |
560 | }, | 573 | }, |
@@ -563,11 +576,11 @@ | |||
563 | "defaultMessage": "!!!Help", | 576 | "defaultMessage": "!!!Help", |
564 | "file": "src/lib/Menu.js", | 577 | "file": "src/lib/Menu.js", |
565 | "start": { | 578 | "start": { |
566 | "line": 189, | 579 | "line": 193, |
567 | "column": 8 | 580 | "column": 8 |
568 | }, | 581 | }, |
569 | "end": { | 582 | "end": { |
570 | "line": 192, | 583 | "line": 196, |
571 | "column": 3 | 584 | "column": 3 |
572 | } | 585 | } |
573 | }, | 586 | }, |
@@ -576,11 +589,11 @@ | |||
576 | "defaultMessage": "!!!About Ferdi", | 589 | "defaultMessage": "!!!About Ferdi", |
577 | "file": "src/lib/Menu.js", | 590 | "file": "src/lib/Menu.js", |
578 | "start": { | 591 | "start": { |
579 | "line": 193, | 592 | "line": 197, |
580 | "column": 9 | 593 | "column": 9 |
581 | }, | 594 | }, |
582 | "end": { | 595 | "end": { |
583 | "line": 196, | 596 | "line": 200, |
584 | "column": 3 | 597 | "column": 3 |
585 | } | 598 | } |
586 | }, | 599 | }, |
@@ -589,11 +602,11 @@ | |||
589 | "defaultMessage": "!!!What's new?", | 602 | "defaultMessage": "!!!What's new?", |
590 | "file": "src/lib/Menu.js", | 603 | "file": "src/lib/Menu.js", |
591 | "start": { | 604 | "start": { |
592 | "line": 197, | 605 | "line": 201, |
593 | "column": 16 | 606 | "column": 16 |
594 | }, | 607 | }, |
595 | "end": { | 608 | "end": { |
596 | "line": 200, | 609 | "line": 204, |
597 | "column": 3 | 610 | "column": 3 |
598 | } | 611 | } |
599 | }, | 612 | }, |
@@ -602,11 +615,11 @@ | |||
602 | "defaultMessage": "!!!Settings", | 615 | "defaultMessage": "!!!Settings", |
603 | "file": "src/lib/Menu.js", | 616 | "file": "src/lib/Menu.js", |
604 | "start": { | 617 | "start": { |
605 | "line": 201, | 618 | "line": 205, |
606 | "column": 12 | 619 | "column": 12 |
607 | }, | 620 | }, |
608 | "end": { | 621 | "end": { |
609 | "line": 204, | 622 | "line": 208, |
610 | "column": 3 | 623 | "column": 3 |
611 | } | 624 | } |
612 | }, | 625 | }, |
@@ -615,11 +628,11 @@ | |||
615 | "defaultMessage": "!!!Check for updates", | 628 | "defaultMessage": "!!!Check for updates", |
616 | "file": "src/lib/Menu.js", | 629 | "file": "src/lib/Menu.js", |
617 | "start": { | 630 | "start": { |
618 | "line": 205, | 631 | "line": 209, |
619 | "column": 19 | 632 | "column": 19 |
620 | }, | 633 | }, |
621 | "end": { | 634 | "end": { |
622 | "line": 208, | 635 | "line": 212, |
623 | "column": 3 | 636 | "column": 3 |
624 | } | 637 | } |
625 | }, | 638 | }, |
@@ -628,11 +641,11 @@ | |||
628 | "defaultMessage": "!!!Hide", | 641 | "defaultMessage": "!!!Hide", |
629 | "file": "src/lib/Menu.js", | 642 | "file": "src/lib/Menu.js", |
630 | "start": { | 643 | "start": { |
631 | "line": 209, | 644 | "line": 213, |
632 | "column": 8 | 645 | "column": 8 |
633 | }, | 646 | }, |
634 | "end": { | 647 | "end": { |
635 | "line": 212, | 648 | "line": 216, |
636 | "column": 3 | 649 | "column": 3 |
637 | } | 650 | } |
638 | }, | 651 | }, |
@@ -641,11 +654,11 @@ | |||
641 | "defaultMessage": "!!!Hide Others", | 654 | "defaultMessage": "!!!Hide Others", |
642 | "file": "src/lib/Menu.js", | 655 | "file": "src/lib/Menu.js", |
643 | "start": { | 656 | "start": { |
644 | "line": 213, | 657 | "line": 217, |
645 | "column": 14 | 658 | "column": 14 |
646 | }, | 659 | }, |
647 | "end": { | 660 | "end": { |
648 | "line": 216, | 661 | "line": 220, |
649 | "column": 3 | 662 | "column": 3 |
650 | } | 663 | } |
651 | }, | 664 | }, |
@@ -654,11 +667,11 @@ | |||
654 | "defaultMessage": "!!!Unhide", | 667 | "defaultMessage": "!!!Unhide", |
655 | "file": "src/lib/Menu.js", | 668 | "file": "src/lib/Menu.js", |
656 | "start": { | 669 | "start": { |
657 | "line": 217, | 670 | "line": 221, |
658 | "column": 10 | 671 | "column": 10 |
659 | }, | 672 | }, |
660 | "end": { | 673 | "end": { |
661 | "line": 220, | 674 | "line": 224, |
662 | "column": 3 | 675 | "column": 3 |
663 | } | 676 | } |
664 | }, | 677 | }, |
@@ -667,11 +680,11 @@ | |||
667 | "defaultMessage": "!!!Auto-hide menu bar", | 680 | "defaultMessage": "!!!Auto-hide menu bar", |
668 | "file": "src/lib/Menu.js", | 681 | "file": "src/lib/Menu.js", |
669 | "start": { | 682 | "start": { |
670 | "line": 221, | 683 | "line": 225, |
671 | "column": 19 | 684 | "column": 19 |
672 | }, | 685 | }, |
673 | "end": { | 686 | "end": { |
674 | "line": 224, | 687 | "line": 228, |
675 | "column": 3 | 688 | "column": 3 |
676 | } | 689 | } |
677 | }, | 690 | }, |
@@ -680,11 +693,11 @@ | |||
680 | "defaultMessage": "!!!Quit", | 693 | "defaultMessage": "!!!Quit", |
681 | "file": "src/lib/Menu.js", | 694 | "file": "src/lib/Menu.js", |
682 | "start": { | 695 | "start": { |
683 | "line": 225, | 696 | "line": 229, |
684 | "column": 8 | 697 | "column": 8 |
685 | }, | 698 | }, |
686 | "end": { | 699 | "end": { |
687 | "line": 228, | 700 | "line": 232, |
688 | "column": 3 | 701 | "column": 3 |
689 | } | 702 | } |
690 | }, | 703 | }, |
@@ -693,11 +706,11 @@ | |||
693 | "defaultMessage": "!!!Add New Service...", | 706 | "defaultMessage": "!!!Add New Service...", |
694 | "file": "src/lib/Menu.js", | 707 | "file": "src/lib/Menu.js", |
695 | "start": { | 708 | "start": { |
696 | "line": 229, | 709 | "line": 233, |
697 | "column": 17 | 710 | "column": 17 |
698 | }, | 711 | }, |
699 | "end": { | 712 | "end": { |
700 | "line": 232, | 713 | "line": 236, |
701 | "column": 3 | 714 | "column": 3 |
702 | } | 715 | } |
703 | }, | 716 | }, |
@@ -706,11 +719,11 @@ | |||
706 | "defaultMessage": "!!!Add New Workspace...", | 719 | "defaultMessage": "!!!Add New Workspace...", |
707 | "file": "src/lib/Menu.js", | 720 | "file": "src/lib/Menu.js", |
708 | "start": { | 721 | "start": { |
709 | "line": 233, | 722 | "line": 237, |
710 | "column": 19 | 723 | "column": 19 |
711 | }, | 724 | }, |
712 | "end": { | 725 | "end": { |
713 | "line": 236, | 726 | "line": 240, |
714 | "column": 3 | 727 | "column": 3 |
715 | } | 728 | } |
716 | }, | 729 | }, |
@@ -719,11 +732,11 @@ | |||
719 | "defaultMessage": "!!!Open workspace drawer", | 732 | "defaultMessage": "!!!Open workspace drawer", |
720 | "file": "src/lib/Menu.js", | 733 | "file": "src/lib/Menu.js", |
721 | "start": { | 734 | "start": { |
722 | "line": 237, | 735 | "line": 241, |
723 | "column": 23 | 736 | "column": 23 |
724 | }, | 737 | }, |
725 | "end": { | 738 | "end": { |
726 | "line": 240, | 739 | "line": 244, |
727 | "column": 3 | 740 | "column": 3 |
728 | } | 741 | } |
729 | }, | 742 | }, |
@@ -732,11 +745,11 @@ | |||
732 | "defaultMessage": "!!!Close workspace drawer", | 745 | "defaultMessage": "!!!Close workspace drawer", |
733 | "file": "src/lib/Menu.js", | 746 | "file": "src/lib/Menu.js", |
734 | "start": { | 747 | "start": { |
735 | "line": 241, | 748 | "line": 245, |
736 | "column": 24 | 749 | "column": 24 |
737 | }, | 750 | }, |
738 | "end": { | 751 | "end": { |
739 | "line": 244, | 752 | "line": 248, |
740 | "column": 3 | 753 | "column": 3 |
741 | } | 754 | } |
742 | }, | 755 | }, |
@@ -745,11 +758,11 @@ | |||
745 | "defaultMessage": "!!!Activate next service...", | 758 | "defaultMessage": "!!!Activate next service...", |
746 | "file": "src/lib/Menu.js", | 759 | "file": "src/lib/Menu.js", |
747 | "start": { | 760 | "start": { |
748 | "line": 245, | 761 | "line": 249, |
749 | "column": 23 | 762 | "column": 23 |
750 | }, | 763 | }, |
751 | "end": { | 764 | "end": { |
752 | "line": 248, | 765 | "line": 252, |
753 | "column": 3 | 766 | "column": 3 |
754 | } | 767 | } |
755 | }, | 768 | }, |
@@ -758,11 +771,11 @@ | |||
758 | "defaultMessage": "!!!Activate previous service...", | 771 | "defaultMessage": "!!!Activate previous service...", |
759 | "file": "src/lib/Menu.js", | 772 | "file": "src/lib/Menu.js", |
760 | "start": { | 773 | "start": { |
761 | "line": 249, | 774 | "line": 253, |
762 | "column": 27 | 775 | "column": 27 |
763 | }, | 776 | }, |
764 | "end": { | 777 | "end": { |
765 | "line": 252, | 778 | "line": 256, |
766 | "column": 3 | 779 | "column": 3 |
767 | } | 780 | } |
768 | }, | 781 | }, |
@@ -771,11 +784,11 @@ | |||
771 | "defaultMessage": "!!!Disable notifications & audio", | 784 | "defaultMessage": "!!!Disable notifications & audio", |
772 | "file": "src/lib/Menu.js", | 785 | "file": "src/lib/Menu.js", |
773 | "start": { | 786 | "start": { |
774 | "line": 253, | 787 | "line": 257, |
775 | "column": 11 | 788 | "column": 11 |
776 | }, | 789 | }, |
777 | "end": { | 790 | "end": { |
778 | "line": 256, | 791 | "line": 260, |
779 | "column": 3 | 792 | "column": 3 |
780 | } | 793 | } |
781 | }, | 794 | }, |
@@ -784,11 +797,11 @@ | |||
784 | "defaultMessage": "!!!Enable notifications & audio", | 797 | "defaultMessage": "!!!Enable notifications & audio", |
785 | "file": "src/lib/Menu.js", | 798 | "file": "src/lib/Menu.js", |
786 | "start": { | 799 | "start": { |
787 | "line": 257, | 800 | "line": 261, |
788 | "column": 13 | 801 | "column": 13 |
789 | }, | 802 | }, |
790 | "end": { | 803 | "end": { |
791 | "line": 260, | 804 | "line": 264, |
792 | "column": 3 | 805 | "column": 3 |
793 | } | 806 | } |
794 | }, | 807 | }, |
@@ -797,11 +810,11 @@ | |||
797 | "defaultMessage": "!!!Workspaces", | 810 | "defaultMessage": "!!!Workspaces", |
798 | "file": "src/lib/Menu.js", | 811 | "file": "src/lib/Menu.js", |
799 | "start": { | 812 | "start": { |
800 | "line": 261, | 813 | "line": 265, |
801 | "column": 14 | 814 | "column": 14 |
802 | }, | 815 | }, |
803 | "end": { | 816 | "end": { |
804 | "line": 264, | 817 | "line": 268, |
805 | "column": 3 | 818 | "column": 3 |
806 | } | 819 | } |
807 | }, | 820 | }, |
@@ -810,11 +823,11 @@ | |||
810 | "defaultMessage": "!!!Default", | 823 | "defaultMessage": "!!!Default", |
811 | "file": "src/lib/Menu.js", | 824 | "file": "src/lib/Menu.js", |
812 | "start": { | 825 | "start": { |
813 | "line": 265, | 826 | "line": 269, |
814 | "column": 20 | 827 | "column": 20 |
815 | }, | 828 | }, |
816 | "end": { | 829 | "end": { |
817 | "line": 268, | 830 | "line": 272, |
818 | "column": 3 | 831 | "column": 3 |
819 | } | 832 | } |
820 | }, | 833 | }, |
@@ -823,11 +836,11 @@ | |||
823 | "defaultMessage": "!!!Todos", | 836 | "defaultMessage": "!!!Todos", |
824 | "file": "src/lib/Menu.js", | 837 | "file": "src/lib/Menu.js", |
825 | "start": { | 838 | "start": { |
826 | "line": 269, | 839 | "line": 273, |
827 | "column": 9 | 840 | "column": 9 |
828 | }, | 841 | }, |
829 | "end": { | 842 | "end": { |
830 | "line": 272, | 843 | "line": 276, |
831 | "column": 3 | 844 | "column": 3 |
832 | } | 845 | } |
833 | }, | 846 | }, |
@@ -836,11 +849,11 @@ | |||
836 | "defaultMessage": "!!!Open Todos drawer", | 849 | "defaultMessage": "!!!Open Todos drawer", |
837 | "file": "src/lib/Menu.js", | 850 | "file": "src/lib/Menu.js", |
838 | "start": { | 851 | "start": { |
839 | "line": 273, | 852 | "line": 277, |
840 | "column": 19 | 853 | "column": 19 |
841 | }, | 854 | }, |
842 | "end": { | 855 | "end": { |
843 | "line": 276, | 856 | "line": 280, |
844 | "column": 3 | 857 | "column": 3 |
845 | } | 858 | } |
846 | }, | 859 | }, |
@@ -849,11 +862,11 @@ | |||
849 | "defaultMessage": "!!!Close Todos drawer", | 862 | "defaultMessage": "!!!Close Todos drawer", |
850 | "file": "src/lib/Menu.js", | 863 | "file": "src/lib/Menu.js", |
851 | "start": { | 864 | "start": { |
852 | "line": 277, | 865 | "line": 281, |
853 | "column": 20 | 866 | "column": 20 |
854 | }, | 867 | }, |
855 | "end": { | 868 | "end": { |
856 | "line": 280, | 869 | "line": 284, |
857 | "column": 3 | 870 | "column": 3 |
858 | } | 871 | } |
859 | }, | 872 | }, |
@@ -862,11 +875,11 @@ | |||
862 | "defaultMessage": "!!!Enable Todos", | 875 | "defaultMessage": "!!!Enable Todos", |
863 | "file": "src/lib/Menu.js", | 876 | "file": "src/lib/Menu.js", |
864 | "start": { | 877 | "start": { |
865 | "line": 281, | 878 | "line": 285, |
866 | "column": 15 | 879 | "column": 15 |
867 | }, | 880 | }, |
868 | "end": { | 881 | "end": { |
869 | "line": 284, | 882 | "line": 288, |
870 | "column": 3 | 883 | "column": 3 |
871 | } | 884 | } |
872 | }, | 885 | }, |
@@ -875,11 +888,11 @@ | |||
875 | "defaultMessage": "!!!Home", | 888 | "defaultMessage": "!!!Home", |
876 | "file": "src/lib/Menu.js", | 889 | "file": "src/lib/Menu.js", |
877 | "start": { | 890 | "start": { |
878 | "line": 285, | 891 | "line": 289, |
879 | "column": 17 | 892 | "column": 17 |
880 | }, | 893 | }, |
881 | "end": { | 894 | "end": { |
882 | "line": 288, | 895 | "line": 292, |
883 | "column": 3 | 896 | "column": 3 |
884 | } | 897 | } |
885 | } | 898 | } |
diff --git a/src/lib/Menu.js b/src/lib/Menu.js index 826fe843f..a858ec993 100644 --- a/src/lib/Menu.js +++ b/src/lib/Menu.js | |||
@@ -154,6 +154,10 @@ const menuItems = defineMessages({ | |||
154 | id: 'menu.help.debugInfo', | 154 | id: 'menu.help.debugInfo', |
155 | defaultMessage: '!!!Copy Debug Information', | 155 | defaultMessage: '!!!Copy Debug Information', |
156 | }, | 156 | }, |
157 | publishDebugInfo: { | ||
158 | id: 'menu.help.publishDebugInfo', | ||
159 | defaultMessage: '!!!Publish Debug Information', | ||
160 | }, | ||
157 | debugInfoCopiedHeadline: { | 161 | debugInfoCopiedHeadline: { |
158 | id: 'menu.help.debugInfoCopiedHeadline', | 162 | id: 'menu.help.debugInfoCopiedHeadline', |
159 | defaultMessage: '!!!Ferdi Debug Information', | 163 | defaultMessage: '!!!Ferdi Debug Information', |
@@ -959,7 +963,7 @@ export default class FranzMenu { | |||
959 | 963 | ||
960 | tpl[tpl.length - 1].submenu.push({ | 964 | tpl[tpl.length - 1].submenu.push({ |
961 | type: 'separator', | 965 | type: 'separator', |
962 | }, this.debugMenu()); | 966 | }, ...this.debugMenu()); |
963 | 967 | ||
964 | this.currentTemplate = tpl; | 968 | this.currentTemplate = tpl; |
965 | const menu = Menu.buildFromTemplate(tpl); | 969 | const menu = Menu.buildFromTemplate(tpl); |
@@ -1116,7 +1120,7 @@ export default class FranzMenu { | |||
1116 | debugMenu() { | 1120 | debugMenu() { |
1117 | const { intl } = window.ferdi; | 1121 | const { intl } = window.ferdi; |
1118 | 1122 | ||
1119 | return { | 1123 | return [{ |
1120 | label: intl.formatMessage(menuItems.debugInfo), | 1124 | label: intl.formatMessage(menuItems.debugInfo), |
1121 | click: () => { | 1125 | click: () => { |
1122 | const { debugInfo } = this.stores.app; | 1126 | const { debugInfo } = this.stores.app; |
@@ -1132,7 +1136,12 @@ export default class FranzMenu { | |||
1132 | }, | 1136 | }, |
1133 | }); | 1137 | }); |
1134 | }, | 1138 | }, |
1135 | }; | 1139 | }, { |
1140 | label: intl.formatMessage(menuItems.publishDebugInfo), | ||
1141 | click: () => { | ||
1142 | window.ferdi.features.publishDebugInfo.state.isModalVisible = true; | ||
1143 | }, | ||
1144 | }]; | ||
1136 | } | 1145 | } |
1137 | 1146 | ||
1138 | _getServiceName(service) { | 1147 | _getServiceName(service) { |
diff --git a/src/stores/FeaturesStore.js b/src/stores/FeaturesStore.js index 780cde3a7..aa9fa4062 100644 --- a/src/stores/FeaturesStore.js +++ b/src/stores/FeaturesStore.js | |||
@@ -14,6 +14,7 @@ import serviceProxy from '../features/serviceProxy'; | |||
14 | import basicAuth from '../features/basicAuth'; | 14 | import basicAuth from '../features/basicAuth'; |
15 | import workspaces from '../features/workspaces'; | 15 | import workspaces from '../features/workspaces'; |
16 | import quickSwitch from '../features/quickSwitch'; | 16 | import quickSwitch from '../features/quickSwitch'; |
17 | import publishDebugInfo from '../features/publishDebugInfo'; | ||
17 | import shareFranz from '../features/shareFranz'; | 18 | import shareFranz from '../features/shareFranz'; |
18 | import announcements from '../features/announcements'; | 19 | import announcements from '../features/announcements'; |
19 | import settingsWS from '../features/settingsWS'; | 20 | import settingsWS from '../features/settingsWS'; |
@@ -84,6 +85,7 @@ export default class FeaturesStore extends Store { | |||
84 | basicAuth(this.stores, this.actions); | 85 | basicAuth(this.stores, this.actions); |
85 | workspaces(this.stores, this.actions); | 86 | workspaces(this.stores, this.actions); |
86 | quickSwitch(this.stores, this.actions); | 87 | quickSwitch(this.stores, this.actions); |
88 | publishDebugInfo(this.stores, this.actions); | ||
87 | shareFranz(this.stores, this.actions); | 89 | shareFranz(this.stores, this.actions); |
88 | announcements(this.stores, this.actions); | 90 | announcements(this.stores, this.actions); |
89 | settingsWS(this.stores, this.actions); | 91 | settingsWS(this.stores, this.actions); |