diff options
Diffstat (limited to 'src/components')
40 files changed, 184 insertions, 190 deletions
diff --git a/src/components/auth/AuthLayout.js b/src/components/auth/AuthLayout.js index 2741b8a15..4fb0e6a59 100644 --- a/src/components/auth/AuthLayout.js +++ b/src/components/auth/AuthLayout.js | |||
@@ -3,6 +3,7 @@ import PropTypes from 'prop-types'; | |||
3 | import { observer } from 'mobx-react'; | 3 | import { observer } from 'mobx-react'; |
4 | import { RouteTransition } from 'react-router-transition'; | 4 | import { RouteTransition } from 'react-router-transition'; |
5 | import { intlShape } from 'react-intl'; | 5 | import { intlShape } from 'react-intl'; |
6 | import { TitleBar } from 'electron-react-titlebar'; | ||
6 | 7 | ||
7 | import Link from '../ui/Link'; | 8 | import Link from '../ui/Link'; |
8 | import InfoBar from '../ui/InfoBar'; | 9 | import InfoBar from '../ui/InfoBar'; |
@@ -10,8 +11,9 @@ import InfoBar from '../ui/InfoBar'; | |||
10 | import { oneOrManyChildElements, globalError as globalErrorPropType } from '../../prop-types'; | 11 | import { oneOrManyChildElements, globalError as globalErrorPropType } from '../../prop-types'; |
11 | import globalMessages from '../../i18n/globalMessages'; | 12 | import globalMessages from '../../i18n/globalMessages'; |
12 | 13 | ||
13 | @observer | 14 | import { isWindows } from '../../environment'; |
14 | export default class AuthLayout extends Component { | 15 | |
16 | export default @observer class AuthLayout extends Component { | ||
15 | static propTypes = { | 17 | static propTypes = { |
16 | children: oneOrManyChildElements.isRequired, | 18 | children: oneOrManyChildElements.isRequired, |
17 | pathname: PropTypes.string.isRequired, | 19 | pathname: PropTypes.string.isRequired, |
@@ -20,6 +22,8 @@ export default class AuthLayout extends Component { | |||
20 | isAPIHealthy: PropTypes.bool.isRequired, | 22 | isAPIHealthy: PropTypes.bool.isRequired, |
21 | retryHealthCheck: PropTypes.func.isRequired, | 23 | retryHealthCheck: PropTypes.func.isRequired, |
22 | isHealthCheckLoading: PropTypes.bool.isRequired, | 24 | isHealthCheckLoading: PropTypes.bool.isRequired, |
25 | isFullScreen: PropTypes.bool.isRequired, | ||
26 | darkMode: PropTypes.bool.isRequired, | ||
23 | }; | 27 | }; |
24 | 28 | ||
25 | static contextTypes = { | 29 | static contextTypes = { |
@@ -35,53 +39,58 @@ export default class AuthLayout extends Component { | |||
35 | isAPIHealthy, | 39 | isAPIHealthy, |
36 | retryHealthCheck, | 40 | retryHealthCheck, |
37 | isHealthCheckLoading, | 41 | isHealthCheckLoading, |
42 | isFullScreen, | ||
43 | darkMode, | ||
38 | } = this.props; | 44 | } = this.props; |
39 | const { intl } = this.context; | 45 | const { intl } = this.context; |
40 | 46 | ||
41 | return ( | 47 | return ( |
42 | <div className="auth"> | 48 | <div className={darkMode ? 'theme__dark' : ''}> |
43 | {!isOnline && ( | 49 | {isWindows && !isFullScreen && <TitleBar menu={window.franz.menu.template} icon={'assets/images/logo.svg'} />} |
44 | <InfoBar | 50 | <div className={'auth'}> |
45 | type="warning" | 51 | {!isOnline && ( |
46 | > | 52 | <InfoBar |
47 | <span className="mdi mdi-flash" /> | 53 | type="warning" |
48 | {intl.formatMessage(globalMessages.notConnectedToTheInternet)} | 54 | > |
49 | </InfoBar> | 55 | <span className="mdi mdi-flash" /> |
50 | )} | 56 | {intl.formatMessage(globalMessages.notConnectedToTheInternet)} |
51 | {isOnline && !isAPIHealthy && ( | 57 | </InfoBar> |
52 | <InfoBar | 58 | )} |
53 | type="danger" | 59 | {isOnline && !isAPIHealthy && ( |
54 | ctaLabel="Try again" | 60 | <InfoBar |
55 | ctaLoading={isHealthCheckLoading} | 61 | type="danger" |
56 | sticky | 62 | ctaLabel="Try again" |
57 | onClick={retryHealthCheck} | 63 | ctaLoading={isHealthCheckLoading} |
58 | > | 64 | sticky |
59 | <span className="mdi mdi-flash" /> | 65 | onClick={retryHealthCheck} |
60 | {intl.formatMessage(globalMessages.APIUnhealthy)} | 66 | > |
61 | </InfoBar> | 67 | <span className="mdi mdi-flash" /> |
62 | )} | 68 | {intl.formatMessage(globalMessages.APIUnhealthy)} |
63 | <div className="auth__layout"> | 69 | </InfoBar> |
64 | <RouteTransition | 70 | )} |
65 | pathname={pathname} | 71 | <div className="auth__layout"> |
66 | atEnter={{ opacity: 0 }} | 72 | <RouteTransition |
67 | atLeave={{ opacity: 0 }} | 73 | pathname={pathname} |
68 | atActive={{ opacity: 1 }} | 74 | atEnter={{ opacity: 0 }} |
69 | mapStyles={styles => ({ | 75 | atLeave={{ opacity: 0 }} |
70 | transform: `translateX(${styles.translateX}%)`, | 76 | atActive={{ opacity: 1 }} |
71 | opacity: styles.opacity, | 77 | mapStyles={styles => ({ |
72 | })} | 78 | transform: `translateX(${styles.translateX}%)`, |
73 | component="span" | 79 | opacity: styles.opacity, |
74 | > | 80 | })} |
75 | {/* Inject globalError into children */} | 81 | component="span" |
76 | {React.cloneElement(children, { | 82 | > |
77 | error, | 83 | {/* Inject globalError into children */} |
78 | })} | 84 | {React.cloneElement(children, { |
79 | </RouteTransition> | 85 | error, |
86 | })} | ||
87 | </RouteTransition> | ||
88 | </div> | ||
89 | {/* </div> */} | ||
90 | <Link to="https://adlk.io" className="auth__adlk" target="_blank"> | ||
91 | <img src="./assets/images/adlk.svg" alt="" /> | ||
92 | </Link> | ||
80 | </div> | 93 | </div> |
81 | {/* </div> */} | ||
82 | <Link to="https://adlk.io" className="auth__adlk" target="_blank"> | ||
83 | <img src="./assets/images/adlk.svg" alt="" /> | ||
84 | </Link> | ||
85 | </div> | 94 | </div> |
86 | ); | 95 | ); |
87 | } | 96 | } |
diff --git a/src/components/auth/Import.js b/src/components/auth/Import.js index 9ba14e768..0d5feb274 100644 --- a/src/components/auth/Import.js +++ b/src/components/auth/Import.js | |||
@@ -28,8 +28,7 @@ const messages = defineMessages({ | |||
28 | }, | 28 | }, |
29 | }); | 29 | }); |
30 | 30 | ||
31 | @observer | 31 | export default @observer class Import extends Component { |
32 | export default class Import extends Component { | ||
33 | static propTypes = { | 32 | static propTypes = { |
34 | services: MobxPropTypes.arrayOrObservableArray.isRequired, | 33 | services: MobxPropTypes.arrayOrObservableArray.isRequired, |
35 | onSubmit: PropTypes.func.isRequired, | 34 | onSubmit: PropTypes.func.isRequired, |
diff --git a/src/components/auth/Invite.js b/src/components/auth/Invite.js index f1c16986b..96821a61a 100644 --- a/src/components/auth/Invite.js +++ b/src/components/auth/Invite.js | |||
@@ -43,8 +43,7 @@ const messages = defineMessages({ | |||
43 | }, | 43 | }, |
44 | }); | 44 | }); |
45 | 45 | ||
46 | @observer | 46 | export default @observer class Invite extends Component { |
47 | export default class Invite extends Component { | ||
48 | static propTypes = { | 47 | static propTypes = { |
49 | onSubmit: PropTypes.func.isRequired, | 48 | onSubmit: PropTypes.func.isRequired, |
50 | embed: PropTypes.bool, | 49 | embed: PropTypes.bool, |
diff --git a/src/components/auth/Login.js b/src/components/auth/Login.js index 4a3cd6776..f465b35a5 100644 --- a/src/components/auth/Login.js +++ b/src/components/auth/Login.js | |||
@@ -55,8 +55,7 @@ const messages = defineMessages({ | |||
55 | }, | 55 | }, |
56 | }); | 56 | }); |
57 | 57 | ||
58 | @observer | 58 | export default @observer class Login extends Component { |
59 | export default class Login extends Component { | ||
60 | static propTypes = { | 59 | static propTypes = { |
61 | onSubmit: PropTypes.func.isRequired, | 60 | onSubmit: PropTypes.func.isRequired, |
62 | isSubmitting: PropTypes.bool.isRequired, | 61 | isSubmitting: PropTypes.bool.isRequired, |
diff --git a/src/components/auth/Password.js b/src/components/auth/Password.js index 5bcc80b6e..ad34e39af 100644 --- a/src/components/auth/Password.js +++ b/src/components/auth/Password.js | |||
@@ -41,8 +41,7 @@ const messages = defineMessages({ | |||
41 | }, | 41 | }, |
42 | }); | 42 | }); |
43 | 43 | ||
44 | @observer | 44 | export default @observer class Password extends Component { |
45 | export default class Password extends Component { | ||
46 | static propTypes = { | 45 | static propTypes = { |
47 | onSubmit: PropTypes.func.isRequired, | 46 | onSubmit: PropTypes.func.isRequired, |
48 | isSubmitting: PropTypes.bool.isRequired, | 47 | isSubmitting: PropTypes.bool.isRequired, |
diff --git a/src/components/auth/Pricing.js b/src/components/auth/Pricing.js index 3cc8d5f6b..f08129568 100644 --- a/src/components/auth/Pricing.js +++ b/src/components/auth/Pricing.js | |||
@@ -28,8 +28,7 @@ const messages = defineMessages({ | |||
28 | }, | 28 | }, |
29 | }); | 29 | }); |
30 | 30 | ||
31 | @observer | 31 | export default @observer class Signup extends Component { |
32 | export default class Signup extends Component { | ||
33 | static propTypes = { | 32 | static propTypes = { |
34 | donor: MobxPropTypes.objectOrObservableObject.isRequired, | 33 | donor: MobxPropTypes.objectOrObservableObject.isRequired, |
35 | isLoading: PropTypes.bool.isRequired, | 34 | isLoading: PropTypes.bool.isRequired, |
diff --git a/src/components/auth/Signup.js b/src/components/auth/Signup.js index 219948274..bbcad8b67 100644 --- a/src/components/auth/Signup.js +++ b/src/components/auth/Signup.js | |||
@@ -65,8 +65,7 @@ const messages = defineMessages({ | |||
65 | }, | 65 | }, |
66 | }); | 66 | }); |
67 | 67 | ||
68 | @observer | 68 | export default @observer class Signup extends Component { |
69 | export default class Signup extends Component { | ||
70 | static propTypes = { | 69 | static propTypes = { |
71 | onSubmit: PropTypes.func.isRequired, | 70 | onSubmit: PropTypes.func.isRequired, |
72 | isSubmitting: PropTypes.bool.isRequired, | 71 | isSubmitting: PropTypes.bool.isRequired, |
@@ -187,7 +186,7 @@ export default class Signup extends Component { | |||
187 | {intl.formatMessage(messages.legalInfo)} | 186 | {intl.formatMessage(messages.legalInfo)} |
188 | <br /> | 187 | <br /> |
189 | <Link | 188 | <Link |
190 | to="http://meetfranz.com/terms" | 189 | to="https://meetfranz.com/terms" |
191 | target="_blank" | 190 | target="_blank" |
192 | className="link" | 191 | className="link" |
193 | > | 192 | > |
@@ -195,7 +194,7 @@ export default class Signup extends Component { | |||
195 | </Link> | 194 | </Link> |
196 | & | 195 | & |
197 | <Link | 196 | <Link |
198 | to="http://meetfranz.com/privacy" | 197 | to="https://meetfranz.com/privacy" |
199 | target="_blank" | 198 | target="_blank" |
200 | className="link" | 199 | className="link" |
201 | > | 200 | > |
diff --git a/src/components/auth/Welcome.js b/src/components/auth/Welcome.js index 9e1c762a5..f6d77f70f 100644 --- a/src/components/auth/Welcome.js +++ b/src/components/auth/Welcome.js | |||
@@ -16,8 +16,7 @@ const messages = defineMessages({ | |||
16 | }, | 16 | }, |
17 | }); | 17 | }); |
18 | 18 | ||
19 | @observer | 19 | export default @observer class Login extends Component { |
20 | export default class Login extends Component { | ||
21 | static propTypes = { | 20 | static propTypes = { |
22 | loginRoute: PropTypes.string.isRequired, | 21 | loginRoute: PropTypes.string.isRequired, |
23 | signupRoute: PropTypes.string.isRequired, | 22 | signupRoute: PropTypes.string.isRequired, |
diff --git a/src/components/layout/AppLayout.js b/src/components/layout/AppLayout.js index 20dc2f764..a4003ef8e 100644 --- a/src/components/layout/AppLayout.js +++ b/src/components/layout/AppLayout.js | |||
@@ -2,10 +2,13 @@ import React, { Component } from 'react'; | |||
2 | import PropTypes from 'prop-types'; | 2 | import PropTypes from 'prop-types'; |
3 | import { observer, PropTypes as MobxPropTypes } from 'mobx-react'; | 3 | import { observer, PropTypes as MobxPropTypes } from 'mobx-react'; |
4 | import { defineMessages, intlShape } from 'react-intl'; | 4 | import { defineMessages, intlShape } from 'react-intl'; |
5 | import { TitleBar } from 'electron-react-titlebar'; | ||
5 | 6 | ||
6 | import InfoBar from '../ui/InfoBar'; | 7 | import InfoBar from '../ui/InfoBar'; |
7 | import globalMessages from '../../i18n/globalMessages'; | 8 | import globalMessages from '../../i18n/globalMessages'; |
8 | 9 | ||
10 | import { isWindows } from '../../environment'; | ||
11 | |||
9 | function createMarkup(HTMLString) { | 12 | function createMarkup(HTMLString) { |
10 | return { __html: HTMLString }; | 13 | return { __html: HTMLString }; |
11 | } | 14 | } |
@@ -37,9 +40,9 @@ const messages = defineMessages({ | |||
37 | }, | 40 | }, |
38 | }); | 41 | }); |
39 | 42 | ||
40 | @observer | 43 | export default @observer class AppLayout extends Component { |
41 | export default class AppLayout extends Component { | ||
42 | static propTypes = { | 44 | static propTypes = { |
45 | isFullScreen: PropTypes.bool.isRequired, | ||
43 | sidebar: PropTypes.element.isRequired, | 46 | sidebar: PropTypes.element.isRequired, |
44 | services: PropTypes.element.isRequired, | 47 | services: PropTypes.element.isRequired, |
45 | children: PropTypes.element, | 48 | children: PropTypes.element, |
@@ -54,6 +57,7 @@ export default class AppLayout extends Component { | |||
54 | areRequiredRequestsSuccessful: PropTypes.bool.isRequired, | 57 | areRequiredRequestsSuccessful: PropTypes.bool.isRequired, |
55 | retryRequiredRequests: PropTypes.func.isRequired, | 58 | retryRequiredRequests: PropTypes.func.isRequired, |
56 | areRequiredRequestsLoading: PropTypes.bool.isRequired, | 59 | areRequiredRequestsLoading: PropTypes.bool.isRequired, |
60 | darkMode: PropTypes.bool.isRequired, | ||
57 | }; | 61 | }; |
58 | 62 | ||
59 | static defaultProps = { | 63 | static defaultProps = { |
@@ -66,6 +70,7 @@ export default class AppLayout extends Component { | |||
66 | 70 | ||
67 | render() { | 71 | render() { |
68 | const { | 72 | const { |
73 | isFullScreen, | ||
69 | sidebar, | 74 | sidebar, |
70 | services, | 75 | services, |
71 | children, | 76 | children, |
@@ -80,71 +85,75 @@ export default class AppLayout extends Component { | |||
80 | areRequiredRequestsSuccessful, | 85 | areRequiredRequestsSuccessful, |
81 | retryRequiredRequests, | 86 | retryRequiredRequests, |
82 | areRequiredRequestsLoading, | 87 | areRequiredRequestsLoading, |
88 | darkMode, | ||
83 | } = this.props; | 89 | } = this.props; |
84 | 90 | ||
85 | const { intl } = this.context; | 91 | const { intl } = this.context; |
86 | 92 | ||
87 | return ( | 93 | return ( |
88 | <div> | 94 | <div className={(darkMode ? 'theme__dark' : '')}> |
89 | <div className="app"> | 95 | <div className="app"> |
90 | {sidebar} | 96 | {isWindows && !isFullScreen && <TitleBar menu={window.franz.menu.template} icon={'assets/images/logo.svg'} />} |
91 | <div className="app__service"> | 97 | <div className="app__content"> |
92 | {news.length > 0 && news.map(item => ( | 98 | {sidebar} |
93 | <InfoBar | 99 | <div className="app__service"> |
94 | key={item.id} | 100 | {news.length > 0 && news.map(item => ( |
95 | position="top" | 101 | <InfoBar |
96 | type={item.type} | 102 | key={item.id} |
97 | sticky={item.sticky} | 103 | position="top" |
98 | onHide={() => removeNewsItem({ newsId: item.id })} | 104 | type={item.type} |
99 | > | 105 | sticky={item.sticky} |
100 | <span dangerouslySetInnerHTML={createMarkup(item.message)} /> | 106 | onHide={() => removeNewsItem({ newsId: item.id })} |
101 | </InfoBar> | 107 | > |
102 | ))} | 108 | <span dangerouslySetInnerHTML={createMarkup(item.message)} /> |
103 | {!isOnline && ( | 109 | </InfoBar> |
104 | <InfoBar | 110 | ))} |
105 | type="danger" | 111 | {!isOnline && ( |
106 | > | 112 | <InfoBar |
107 | <span className="mdi mdi-flash" /> | 113 | type="danger" |
108 | {intl.formatMessage(globalMessages.notConnectedToTheInternet)} | 114 | > |
109 | </InfoBar> | 115 | <span className="mdi mdi-flash" /> |
110 | )} | 116 | {intl.formatMessage(globalMessages.notConnectedToTheInternet)} |
111 | {!areRequiredRequestsSuccessful && showRequiredRequestsError && ( | 117 | </InfoBar> |
112 | <InfoBar | 118 | )} |
113 | type="danger" | 119 | {!areRequiredRequestsSuccessful && showRequiredRequestsError && ( |
114 | ctaLabel="Try again" | 120 | <InfoBar |
115 | ctaLoading={areRequiredRequestsLoading} | 121 | type="danger" |
116 | sticky | 122 | ctaLabel="Try again" |
117 | onClick={retryRequiredRequests} | 123 | ctaLoading={areRequiredRequestsLoading} |
118 | > | 124 | sticky |
119 | <span className="mdi mdi-flash" /> | 125 | onClick={retryRequiredRequests} |
120 | {intl.formatMessage(messages.requiredRequestsFailed)} | 126 | > |
121 | </InfoBar> | 127 | <span className="mdi mdi-flash" /> |
122 | )} | 128 | {intl.formatMessage(messages.requiredRequestsFailed)} |
123 | {showServicesUpdatedInfoBar && ( | 129 | </InfoBar> |
124 | <InfoBar | 130 | )} |
125 | type="primary" | 131 | {showServicesUpdatedInfoBar && ( |
126 | ctaLabel={intl.formatMessage(messages.buttonReloadServices)} | 132 | <InfoBar |
127 | onClick={reloadServicesAfterUpdate} | 133 | type="primary" |
128 | sticky | 134 | ctaLabel={intl.formatMessage(messages.buttonReloadServices)} |
129 | > | 135 | onClick={reloadServicesAfterUpdate} |
130 | <span className="mdi mdi-power-plug" /> | 136 | sticky |
131 | {intl.formatMessage(messages.servicesUpdated)} | 137 | > |
132 | </InfoBar> | 138 | <span className="mdi mdi-power-plug" /> |
133 | )} | 139 | {intl.formatMessage(messages.servicesUpdated)} |
134 | {appUpdateIsDownloaded && ( | 140 | </InfoBar> |
135 | <InfoBar | 141 | )} |
136 | type="primary" | 142 | {appUpdateIsDownloaded && ( |
137 | ctaLabel={intl.formatMessage(messages.buttonInstallUpdate)} | 143 | <InfoBar |
138 | onClick={installAppUpdate} | 144 | type="primary" |
139 | sticky | 145 | ctaLabel={intl.formatMessage(messages.buttonInstallUpdate)} |
140 | > | 146 | onClick={installAppUpdate} |
141 | <span className="mdi mdi-information" /> | 147 | sticky |
142 | {intl.formatMessage(messages.updateAvailable)} <a href="https://meetfranz.com/changelog" target="_blank"> | 148 | > |
143 | <u>{intl.formatMessage(messages.changelog)}</u> | 149 | <span className="mdi mdi-information" /> |
144 | </a> | 150 | {intl.formatMessage(messages.updateAvailable)} <a href="https://meetfranz.com/changelog" target="_blank"> |
145 | </InfoBar> | 151 | <u>{intl.formatMessage(messages.changelog)}</u> |
146 | )} | 152 | </a> |
147 | {services} | 153 | </InfoBar> |
154 | )} | ||
155 | {services} | ||
156 | </div> | ||
148 | </div> | 157 | </div> |
149 | </div> | 158 | </div> |
150 | {children} | 159 | {children} |
diff --git a/src/components/layout/Sidebar.js b/src/components/layout/Sidebar.js index fa269f216..6ea95bf88 100644 --- a/src/components/layout/Sidebar.js +++ b/src/components/layout/Sidebar.js | |||
@@ -26,8 +26,7 @@ const messages = defineMessages({ | |||
26 | }, | 26 | }, |
27 | }); | 27 | }); |
28 | 28 | ||
29 | @observer | 29 | export default @observer class Sidebar extends Component { |
30 | export default class Sidebar extends Component { | ||
31 | static propTypes = { | 30 | static propTypes = { |
32 | openSettings: PropTypes.func.isRequired, | 31 | openSettings: PropTypes.func.isRequired, |
33 | toggleMuteApp: PropTypes.func.isRequired, | 32 | toggleMuteApp: PropTypes.func.isRequired, |
diff --git a/src/components/services/content/ServiceDisabled.js b/src/components/services/content/ServiceDisabled.js index b5af3743d..58fb38d8c 100644 --- a/src/components/services/content/ServiceDisabled.js +++ b/src/components/services/content/ServiceDisabled.js | |||
@@ -16,8 +16,7 @@ const messages = defineMessages({ | |||
16 | }, | 16 | }, |
17 | }); | 17 | }); |
18 | 18 | ||
19 | @observer | 19 | export default @observer class ServiceDisabled extends Component { |
20 | export default class ServiceDisabled extends Component { | ||
21 | static propTypes = { | 20 | static propTypes = { |
22 | name: PropTypes.string.isRequired, | 21 | name: PropTypes.string.isRequired, |
23 | enable: PropTypes.func.isRequired, | 22 | enable: PropTypes.func.isRequired, |
diff --git a/src/components/services/content/ServiceWebview.js b/src/components/services/content/ServiceWebview.js index c146abf4e..7163209ee 100644 --- a/src/components/services/content/ServiceWebview.js +++ b/src/components/services/content/ServiceWebview.js | |||
@@ -10,8 +10,7 @@ import StatusBarTargetUrl from '../../ui/StatusBarTargetUrl'; | |||
10 | import WebviewCrashHandler from './WebviewCrashHandler'; | 10 | import WebviewCrashHandler from './WebviewCrashHandler'; |
11 | import ServiceDisabled from './ServiceDisabled'; | 11 | import ServiceDisabled from './ServiceDisabled'; |
12 | 12 | ||
13 | @observer | 13 | export default @observer class ServiceWebview extends Component { |
14 | export default class ServiceWebview extends Component { | ||
15 | static propTypes = { | 14 | static propTypes = { |
16 | service: PropTypes.instanceOf(ServiceModel).isRequired, | 15 | service: PropTypes.instanceOf(ServiceModel).isRequired, |
17 | setWebviewReference: PropTypes.func.isRequired, | 16 | setWebviewReference: PropTypes.func.isRequired, |
diff --git a/src/components/services/content/Services.js b/src/components/services/content/Services.js index b1322afc2..4cbd51043 100644 --- a/src/components/services/content/Services.js +++ b/src/components/services/content/Services.js | |||
@@ -18,8 +18,7 @@ const messages = defineMessages({ | |||
18 | }, | 18 | }, |
19 | }); | 19 | }); |
20 | 20 | ||
21 | @observer | 21 | export default @observer class Services extends Component { |
22 | export default class Services extends Component { | ||
23 | static propTypes = { | 22 | static propTypes = { |
24 | services: MobxPropTypes.arrayOrObservableArray.isRequired, | 23 | services: MobxPropTypes.arrayOrObservableArray.isRequired, |
25 | setWebviewReference: PropTypes.func.isRequired, | 24 | setWebviewReference: PropTypes.func.isRequired, |
diff --git a/src/components/services/content/WebviewCrashHandler.js b/src/components/services/content/WebviewCrashHandler.js index d3e6951f3..3be1fccf4 100644 --- a/src/components/services/content/WebviewCrashHandler.js +++ b/src/components/services/content/WebviewCrashHandler.js | |||
@@ -24,8 +24,7 @@ const messages = defineMessages({ | |||
24 | }, | 24 | }, |
25 | }); | 25 | }); |
26 | 26 | ||
27 | @observer | 27 | export default @observer class WebviewCrashHandler extends Component { |
28 | export default class WebviewCrashHandler extends Component { | ||
29 | static propTypes = { | 28 | static propTypes = { |
30 | name: PropTypes.string.isRequired, | 29 | name: PropTypes.string.isRequired, |
31 | reload: PropTypes.func.isRequired, | 30 | reload: PropTypes.func.isRequired, |
diff --git a/src/components/services/tabs/TabItem.js b/src/components/services/tabs/TabItem.js index 7aed8fda7..8de7dc438 100644 --- a/src/components/services/tabs/TabItem.js +++ b/src/components/services/tabs/TabItem.js | |||
@@ -7,7 +7,7 @@ import classnames from 'classnames'; | |||
7 | import { SortableElement } from 'react-sortable-hoc'; | 7 | import { SortableElement } from 'react-sortable-hoc'; |
8 | 8 | ||
9 | import ServiceModel from '../../../models/Service'; | 9 | import ServiceModel from '../../../models/Service'; |
10 | import { ctrlKey } from '../../../environment'; | 10 | import { isDevMode, ctrlKey } from '../../../environment'; |
11 | 11 | ||
12 | const { Menu } = remote; | 12 | const { Menu } = remote; |
13 | 13 | ||
@@ -119,10 +119,14 @@ class TabItem extends Component { | |||
119 | click: () => (service.isEnabled ? disableService() : enableService()), | 119 | click: () => (service.isEnabled ? disableService() : enableService()), |
120 | }, { | 120 | }, { |
121 | type: 'separator', | 121 | type: 'separator', |
122 | }, { | ||
123 | label: intl.formatMessage(messages.deleteService), | ||
124 | click: () => deleteService(), | ||
125 | }]; | 122 | }]; |
123 | |||
124 | if (isDevMode) { | ||
125 | menuTemplate.push({ | ||
126 | label: intl.formatMessage(messages.deleteService), | ||
127 | click: () => deleteService(), | ||
128 | }); | ||
129 | } | ||
126 | const menu = Menu.buildFromTemplate(menuTemplate); | 130 | const menu = Menu.buildFromTemplate(menuTemplate); |
127 | 131 | ||
128 | let notificationBadge = null; | 132 | let notificationBadge = null; |
@@ -137,10 +141,10 @@ class TabItem extends Component { | |||
137 | {service.unreadIndirectMessageCount > 0 | 141 | {service.unreadIndirectMessageCount > 0 |
138 | && service.unreadDirectMessageCount === 0 | 142 | && service.unreadDirectMessageCount === 0 |
139 | && service.isIndirectMessageBadgeEnabled && ( | 143 | && service.isIndirectMessageBadgeEnabled && ( |
140 | <span className="tab-item__message-count is-indirect"> | 144 | <span className="tab-item__message-count is-indirect"> |
141 | • | 145 | • |
142 | </span> | 146 | </span> |
143 | )} | 147 | )} |
144 | </span> | 148 | </span> |
145 | ); | 149 | ); |
146 | } | 150 | } |
diff --git a/src/components/services/tabs/Tabbar.js b/src/components/services/tabs/Tabbar.js index ceb88c51c..dd5c2140f 100644 --- a/src/components/services/tabs/Tabbar.js +++ b/src/components/services/tabs/Tabbar.js | |||
@@ -4,8 +4,7 @@ import { observer, PropTypes as MobxPropTypes } from 'mobx-react'; | |||
4 | 4 | ||
5 | import TabBarSortableList from './TabBarSortableList'; | 5 | import TabBarSortableList from './TabBarSortableList'; |
6 | 6 | ||
7 | @observer | 7 | export default @observer class TabBar extends Component { |
8 | export default class TabBar extends Component { | ||
9 | static propTypes = { | 8 | static propTypes = { |
10 | services: MobxPropTypes.arrayOrObservableArray.isRequired, | 9 | services: MobxPropTypes.arrayOrObservableArray.isRequired, |
11 | setActive: PropTypes.func.isRequired, | 10 | setActive: PropTypes.func.isRequired, |
diff --git a/src/components/settings/SettingsLayout.js b/src/components/settings/SettingsLayout.js index d5392ddba..3cb08feb1 100644 --- a/src/components/settings/SettingsLayout.js +++ b/src/components/settings/SettingsLayout.js | |||
@@ -5,8 +5,7 @@ import { observer } from 'mobx-react'; | |||
5 | import { oneOrManyChildElements } from '../../prop-types'; | 5 | import { oneOrManyChildElements } from '../../prop-types'; |
6 | import Appear from '../ui/effects/Appear'; | 6 | import Appear from '../ui/effects/Appear'; |
7 | 7 | ||
8 | @observer | 8 | export default @observer class SettingsLayout extends Component { |
9 | export default class SettingsLayout extends Component { | ||
10 | static propTypes = { | 9 | static propTypes = { |
11 | navigation: PropTypes.element.isRequired, | 10 | navigation: PropTypes.element.isRequired, |
12 | children: oneOrManyChildElements.isRequired, | 11 | children: oneOrManyChildElements.isRequired, |
diff --git a/src/components/settings/account/AccountDashboard.js b/src/components/settings/account/AccountDashboard.js index e6ccdaac7..ede519fd6 100644 --- a/src/components/settings/account/AccountDashboard.js +++ b/src/components/settings/account/AccountDashboard.js | |||
@@ -78,8 +78,7 @@ const messages = defineMessages({ | |||
78 | }, | 78 | }, |
79 | }); | 79 | }); |
80 | 80 | ||
81 | @observer | 81 | export default @observer class AccountDashboard extends Component { |
82 | export default class AccountDashboard extends Component { | ||
83 | static propTypes = { | 82 | static propTypes = { |
84 | user: MobxPropTypes.observableObject.isRequired, | 83 | user: MobxPropTypes.observableObject.isRequired, |
85 | orders: MobxPropTypes.arrayOrObservableArray.isRequired, | 84 | orders: MobxPropTypes.arrayOrObservableArray.isRequired, |
diff --git a/src/components/settings/recipes/RecipeItem.js b/src/components/settings/recipes/RecipeItem.js index 7b2f64d26..dae8891b3 100644 --- a/src/components/settings/recipes/RecipeItem.js +++ b/src/components/settings/recipes/RecipeItem.js | |||
@@ -4,8 +4,7 @@ import { observer } from 'mobx-react'; | |||
4 | 4 | ||
5 | import RecipePreviewModel from '../../../models/RecipePreview'; | 5 | import RecipePreviewModel from '../../../models/RecipePreview'; |
6 | 6 | ||
7 | @observer | 7 | export default @observer class RecipeItem extends Component { |
8 | export default class RecipeItem extends Component { | ||
9 | static propTypes = { | 8 | static propTypes = { |
10 | recipe: PropTypes.instanceOf(RecipePreviewModel).isRequired, | 9 | recipe: PropTypes.instanceOf(RecipePreviewModel).isRequired, |
11 | onClick: PropTypes.func.isRequired, | 10 | onClick: PropTypes.func.isRequired, |
diff --git a/src/components/settings/recipes/RecipesDashboard.js b/src/components/settings/recipes/RecipesDashboard.js index 4610c69a5..cd783200f 100644 --- a/src/components/settings/recipes/RecipesDashboard.js +++ b/src/components/settings/recipes/RecipesDashboard.js | |||
@@ -46,8 +46,7 @@ const messages = defineMessages({ | |||
46 | }, | 46 | }, |
47 | }); | 47 | }); |
48 | 48 | ||
49 | @observer | 49 | export default @observer class RecipesDashboard extends Component { |
50 | export default class RecipesDashboard extends Component { | ||
51 | static propTypes = { | 50 | static propTypes = { |
52 | recipes: MobxPropTypes.arrayOrObservableArray.isRequired, | 51 | recipes: MobxPropTypes.arrayOrObservableArray.isRequired, |
53 | isLoading: PropTypes.bool.isRequired, | 52 | isLoading: PropTypes.bool.isRequired, |
diff --git a/src/components/settings/services/EditServiceForm.js b/src/components/settings/services/EditServiceForm.js index 3ffca99a7..777a95fcf 100644 --- a/src/components/settings/services/EditServiceForm.js +++ b/src/components/settings/services/EditServiceForm.js | |||
@@ -94,8 +94,7 @@ const messages = defineMessages({ | |||
94 | }, | 94 | }, |
95 | }); | 95 | }); |
96 | 96 | ||
97 | @observer | 97 | export default @observer class EditServiceForm extends Component { |
98 | export default class EditServiceForm extends Component { | ||
99 | static propTypes = { | 98 | static propTypes = { |
100 | recipe: PropTypes.instanceOf(Recipe).isRequired, | 99 | recipe: PropTypes.instanceOf(Recipe).isRequired, |
101 | service(props, propName) { | 100 | service(props, propName) { |
@@ -204,6 +203,8 @@ export default class EditServiceForm extends Component { | |||
204 | activeTabIndex = 2; | 203 | activeTabIndex = 2; |
205 | } | 204 | } |
206 | 205 | ||
206 | const requiresUserInput = !recipe.hasHostedOption && (recipe.hasTeamId || recipe.hasCustomUrl); | ||
207 | |||
207 | return ( | 208 | return ( |
208 | <div className="settings__main"> | 209 | <div className="settings__main"> |
209 | <div className="settings__header"> | 210 | <div className="settings__header"> |
@@ -305,6 +306,7 @@ export default class EditServiceForm extends Component { | |||
305 | 306 | ||
306 | <div className="settings__settings-group"> | 307 | <div className="settings__settings-group"> |
307 | <h3>{intl.formatMessage(messages.headlineGeneral)}</h3> | 308 | <h3>{intl.formatMessage(messages.headlineGeneral)}</h3> |
309 | <Toggle field={form.$('isDarkModeEnabled')} /> | ||
308 | <Toggle field={form.$('isEnabled')} /> | 310 | <Toggle field={form.$('isEnabled')} /> |
309 | </div> | 311 | </div> |
310 | </div> | 312 | </div> |
@@ -342,6 +344,7 @@ export default class EditServiceForm extends Component { | |||
342 | type="submit" | 344 | type="submit" |
343 | label={intl.formatMessage(messages.saveService)} | 345 | label={intl.formatMessage(messages.saveService)} |
344 | htmlForm="form" | 346 | htmlForm="form" |
347 | disabled={action !== 'edit' && form.isPristine && requiresUserInput} | ||
345 | /> | 348 | /> |
346 | )} | 349 | )} |
347 | </div> | 350 | </div> |
diff --git a/src/components/settings/services/ServiceError.js b/src/components/settings/services/ServiceError.js index 1f1512927..3cfc080d6 100644 --- a/src/components/settings/services/ServiceError.js +++ b/src/components/settings/services/ServiceError.js | |||
@@ -25,8 +25,7 @@ const messages = defineMessages({ | |||
25 | }, | 25 | }, |
26 | }); | 26 | }); |
27 | 27 | ||
28 | @observer | 28 | export default @observer class ServiceError extends Component { |
29 | export default class ServiceError extends Component { | ||
30 | static contextTypes = { | 29 | static contextTypes = { |
31 | intl: intlShape, | 30 | intl: intlShape, |
32 | }; | 31 | }; |
diff --git a/src/components/settings/services/ServiceItem.js b/src/components/settings/services/ServiceItem.js index 9743315b0..84080519b 100644 --- a/src/components/settings/services/ServiceItem.js +++ b/src/components/settings/services/ServiceItem.js | |||
@@ -22,8 +22,7 @@ const messages = defineMessages({ | |||
22 | }, | 22 | }, |
23 | }); | 23 | }); |
24 | 24 | ||
25 | @observer | 25 | export default @observer class ServiceItem extends Component { |
26 | export default class ServiceItem extends Component { | ||
27 | static propTypes = { | 26 | static propTypes = { |
28 | service: PropTypes.instanceOf(ServiceModel).isRequired, | 27 | service: PropTypes.instanceOf(ServiceModel).isRequired, |
29 | goToServiceForm: PropTypes.func.isRequired, | 28 | goToServiceForm: PropTypes.func.isRequired, |
diff --git a/src/components/settings/services/ServicesDashboard.js b/src/components/settings/services/ServicesDashboard.js index 20e451f01..e7dfaf106 100644 --- a/src/components/settings/services/ServicesDashboard.js +++ b/src/components/settings/services/ServicesDashboard.js | |||
@@ -49,8 +49,7 @@ const messages = defineMessages({ | |||
49 | }, | 49 | }, |
50 | }); | 50 | }); |
51 | 51 | ||
52 | @observer | 52 | export default @observer class ServicesDashboard extends Component { |
53 | export default class ServicesDashboard extends Component { | ||
54 | static propTypes = { | 53 | static propTypes = { |
55 | services: MobxPropTypes.arrayOrObservableArray.isRequired, | 54 | services: MobxPropTypes.arrayOrObservableArray.isRequired, |
56 | isLoading: PropTypes.bool.isRequired, | 55 | isLoading: PropTypes.bool.isRequired, |
diff --git a/src/components/settings/settings/EditSettingsForm.js b/src/components/settings/settings/EditSettingsForm.js index 72aa5a8af..b5c048ebd 100644 --- a/src/components/settings/settings/EditSettingsForm.js +++ b/src/components/settings/settings/EditSettingsForm.js | |||
@@ -76,10 +76,13 @@ const messages = defineMessages({ | |||
76 | id: 'settings.app.currentVersion', | 76 | id: 'settings.app.currentVersion', |
77 | defaultMessage: '!!!Current version:', | 77 | defaultMessage: '!!!Current version:', |
78 | }, | 78 | }, |
79 | enableGPUAccelerationInfo: { | ||
80 | id: 'settings.app.restartRequired', | ||
81 | defaultMessage: '!!!Changes require restart', | ||
82 | }, | ||
79 | }); | 83 | }); |
80 | 84 | ||
81 | @observer | 85 | export default @observer class EditSettingsForm extends Component { |
82 | export default class EditSettingsForm extends Component { | ||
83 | static propTypes = { | 86 | static propTypes = { |
84 | checkForUpdates: PropTypes.func.isRequired, | 87 | checkForUpdates: PropTypes.func.isRequired, |
85 | installUpdate: PropTypes.func.isRequired, | 88 | installUpdate: PropTypes.func.isRequired, |
@@ -157,6 +160,7 @@ export default class EditSettingsForm extends Component { | |||
157 | <h2 id="apperance">{intl.formatMessage(messages.headlineAppearance)}</h2> | 160 | <h2 id="apperance">{intl.formatMessage(messages.headlineAppearance)}</h2> |
158 | <Toggle field={form.$('showDisabledServices')} /> | 161 | <Toggle field={form.$('showDisabledServices')} /> |
159 | <Toggle field={form.$('showMessageBadgeWhenMuted')} /> | 162 | <Toggle field={form.$('showMessageBadgeWhenMuted')} /> |
163 | <Toggle field={form.$('darkMode')} /> | ||
160 | 164 | ||
161 | {/* Language */} | 165 | {/* Language */} |
162 | <h2 id="language">{intl.formatMessage(messages.headlineLanguage)}</h2> | 166 | <h2 id="language">{intl.formatMessage(messages.headlineLanguage)}</h2> |
@@ -172,6 +176,8 @@ export default class EditSettingsForm extends Component { | |||
172 | {/* Advanced */} | 176 | {/* Advanced */} |
173 | <h2 id="advanced">{intl.formatMessage(messages.headlineAdvanced)}</h2> | 177 | <h2 id="advanced">{intl.formatMessage(messages.headlineAdvanced)}</h2> |
174 | <Toggle field={form.$('enableSpellchecking')} /> | 178 | <Toggle field={form.$('enableSpellchecking')} /> |
179 | <Toggle field={form.$('enableGPUAcceleration')} /> | ||
180 | <p className="settings__help">{intl.formatMessage(messages.enableGPUAccelerationInfo)}</p> | ||
175 | {/* <Select field={form.$('spellcheckingLanguage')} /> */} | 181 | {/* <Select field={form.$('spellcheckingLanguage')} /> */} |
176 | <div className="settings__settings-group"> | 182 | <div className="settings__settings-group"> |
177 | <h3> | 183 | <h3> |
diff --git a/src/components/settings/user/EditUserForm.js b/src/components/settings/user/EditUserForm.js index 1ac8be80f..b825f844a 100644 --- a/src/components/settings/user/EditUserForm.js +++ b/src/components/settings/user/EditUserForm.js | |||
@@ -39,8 +39,7 @@ const messages = defineMessages({ | |||
39 | }, | 39 | }, |
40 | }); | 40 | }); |
41 | 41 | ||
42 | @observer | 42 | export default @observer class EditServiceForm extends Component { |
43 | export default class EditServiceForm extends Component { | ||
44 | static propTypes = { | 43 | static propTypes = { |
45 | status: MobxPropTypes.observableArray.isRequired, | 44 | status: MobxPropTypes.observableArray.isRequired, |
46 | form: PropTypes.instanceOf(Form).isRequired, | 45 | form: PropTypes.instanceOf(Form).isRequired, |
diff --git a/src/components/subscription/SubscriptionForm.js b/src/components/subscription/SubscriptionForm.js index dd350479d..5992e4204 100644 --- a/src/components/subscription/SubscriptionForm.js +++ b/src/components/subscription/SubscriptionForm.js | |||
@@ -71,8 +71,7 @@ const messages = defineMessages({ | |||
71 | }, | 71 | }, |
72 | }); | 72 | }); |
73 | 73 | ||
74 | @observer | 74 | export default @observer class SubscriptionForm extends Component { |
75 | export default class SubscriptionForm extends Component { | ||
76 | static propTypes = { | 75 | static propTypes = { |
77 | plan: MobxPropTypes.objectOrObservableObject.isRequired, | 76 | plan: MobxPropTypes.objectOrObservableObject.isRequired, |
78 | isLoading: PropTypes.bool.isRequired, | 77 | isLoading: PropTypes.bool.isRequired, |
diff --git a/src/components/subscription/SubscriptionPopup.js b/src/components/subscription/SubscriptionPopup.js index 528d02907..f3c63e7ee 100644 --- a/src/components/subscription/SubscriptionPopup.js +++ b/src/components/subscription/SubscriptionPopup.js | |||
@@ -17,8 +17,7 @@ const messages = defineMessages({ | |||
17 | }, | 17 | }, |
18 | }); | 18 | }); |
19 | 19 | ||
20 | @observer | 20 | export default @observer class SubscriptionPopup extends Component { |
21 | export default class SubscriptionPopup extends Component { | ||
22 | static propTypes = { | 21 | static propTypes = { |
23 | url: PropTypes.string.isRequired, | 22 | url: PropTypes.string.isRequired, |
24 | closeWindow: PropTypes.func.isRequired, | 23 | closeWindow: PropTypes.func.isRequired, |
diff --git a/src/components/ui/Button.js b/src/components/ui/Button.js index 554206cb7..309e05bb4 100644 --- a/src/components/ui/Button.js +++ b/src/components/ui/Button.js | |||
@@ -4,8 +4,7 @@ import { observer } from 'mobx-react'; | |||
4 | import Loader from 'react-loader'; | 4 | import Loader from 'react-loader'; |
5 | import classnames from 'classnames'; | 5 | import classnames from 'classnames'; |
6 | 6 | ||
7 | @observer | 7 | export default @observer class Button extends Component { |
8 | export default class Button extends Component { | ||
9 | static propTypes = { | 8 | static propTypes = { |
10 | className: PropTypes.string, | 9 | className: PropTypes.string, |
11 | label: PropTypes.string.isRequired, | 10 | label: PropTypes.string.isRequired, |
diff --git a/src/components/ui/ImageUpload.js b/src/components/ui/ImageUpload.js index 81c3b8da6..76f77d631 100644 --- a/src/components/ui/ImageUpload.js +++ b/src/components/ui/ImageUpload.js | |||
@@ -2,12 +2,10 @@ import React, { Component } from 'react'; | |||
2 | import PropTypes from 'prop-types'; | 2 | import PropTypes from 'prop-types'; |
3 | import { observer } from 'mobx-react'; | 3 | import { observer } from 'mobx-react'; |
4 | import { Field } from 'mobx-react-form'; | 4 | import { Field } from 'mobx-react-form'; |
5 | // import Loader from 'react-loader'; | ||
6 | import classnames from 'classnames'; | 5 | import classnames from 'classnames'; |
7 | import Dropzone from 'react-dropzone'; | 6 | import Dropzone from 'react-dropzone'; |
8 | 7 | ||
9 | @observer | 8 | export default @observer class ImageUpload extends Component { |
10 | export default class ImageUpload extends Component { | ||
11 | static propTypes = { | 9 | static propTypes = { |
12 | field: PropTypes.instanceOf(Field).isRequired, | 10 | field: PropTypes.instanceOf(Field).isRequired, |
13 | className: PropTypes.string, | 11 | className: PropTypes.string, |
diff --git a/src/components/ui/InfoBar.js b/src/components/ui/InfoBar.js index 84a5f1446..94a1ddf76 100644 --- a/src/components/ui/InfoBar.js +++ b/src/components/ui/InfoBar.js | |||
@@ -7,8 +7,7 @@ import Loader from 'react-loader'; | |||
7 | // import { oneOrManyChildElements } from '../../prop-types'; | 7 | // import { oneOrManyChildElements } from '../../prop-types'; |
8 | import Appear from '../ui/effects/Appear'; | 8 | import Appear from '../ui/effects/Appear'; |
9 | 9 | ||
10 | @observer | 10 | export default @observer class InfoBar extends Component { |
11 | export default class InfoBar extends Component { | ||
12 | static propTypes = { | 11 | static propTypes = { |
13 | // eslint-disable-next-line | 12 | // eslint-disable-next-line |
14 | children: PropTypes.any.isRequired, | 13 | children: PropTypes.any.isRequired, |
diff --git a/src/components/ui/Infobox.js b/src/components/ui/Infobox.js index 2d063c7ef..77051f567 100644 --- a/src/components/ui/Infobox.js +++ b/src/components/ui/Infobox.js | |||
@@ -4,8 +4,7 @@ import { observer } from 'mobx-react'; | |||
4 | import classnames from 'classnames'; | 4 | import classnames from 'classnames'; |
5 | import Loader from 'react-loader'; | 5 | import Loader from 'react-loader'; |
6 | 6 | ||
7 | @observer | 7 | export default @observer class Infobox extends Component { |
8 | export default class Infobox extends Component { | ||
9 | static propTypes = { | 8 | static propTypes = { |
10 | children: PropTypes.any.isRequired, // eslint-disable-line | 9 | children: PropTypes.any.isRequired, // eslint-disable-line |
11 | icon: PropTypes.string, | 10 | icon: PropTypes.string, |
diff --git a/src/components/ui/Input.js b/src/components/ui/Input.js index 69c95702b..7bf6e1b00 100644 --- a/src/components/ui/Input.js +++ b/src/components/ui/Input.js | |||
@@ -6,8 +6,7 @@ import classnames from 'classnames'; | |||
6 | 6 | ||
7 | import { scorePassword as scorePasswordFunc } from '../../helpers/password-helpers'; | 7 | import { scorePassword as scorePasswordFunc } from '../../helpers/password-helpers'; |
8 | 8 | ||
9 | @observer | 9 | export default @observer class Input extends Component { |
10 | export default class Input extends Component { | ||
11 | static propTypes = { | 10 | static propTypes = { |
12 | field: PropTypes.instanceOf(Field).isRequired, | 11 | field: PropTypes.instanceOf(Field).isRequired, |
13 | className: PropTypes.string, | 12 | className: PropTypes.string, |
diff --git a/src/components/ui/Link.js b/src/components/ui/Link.js index f5da921fa..0602290f1 100644 --- a/src/components/ui/Link.js +++ b/src/components/ui/Link.js | |||
@@ -9,9 +9,7 @@ import { oneOrManyChildElements } from '../../prop-types'; | |||
9 | import { matchRoute } from '../../helpers/routing-helpers'; | 9 | import { matchRoute } from '../../helpers/routing-helpers'; |
10 | 10 | ||
11 | // TODO: create container component for this component | 11 | // TODO: create container component for this component |
12 | 12 | export default @inject('stores') @observer class Link extends Component { | |
13 | @inject('stores') @observer | ||
14 | export default class Link extends Component { | ||
15 | onClick(e) { | 13 | onClick(e) { |
16 | if (this.props.target === '_blank') { | 14 | if (this.props.target === '_blank') { |
17 | e.preventDefault(); | 15 | e.preventDefault(); |
diff --git a/src/components/ui/Radio.js b/src/components/ui/Radio.js index b54cfc820..63ca6f9b8 100644 --- a/src/components/ui/Radio.js +++ b/src/components/ui/Radio.js | |||
@@ -4,8 +4,7 @@ import { observer } from 'mobx-react'; | |||
4 | import { Field } from 'mobx-react-form'; | 4 | import { Field } from 'mobx-react-form'; |
5 | import classnames from 'classnames'; | 5 | import classnames from 'classnames'; |
6 | 6 | ||
7 | @observer | 7 | export default @observer class Radio extends Component { |
8 | export default class Radio extends Component { | ||
9 | static propTypes = { | 8 | static propTypes = { |
10 | field: PropTypes.instanceOf(Field).isRequired, | 9 | field: PropTypes.instanceOf(Field).isRequired, |
11 | className: PropTypes.string, | 10 | className: PropTypes.string, |
diff --git a/src/components/ui/SearchInput.js b/src/components/ui/SearchInput.js index a94cde201..5a9571d27 100644 --- a/src/components/ui/SearchInput.js +++ b/src/components/ui/SearchInput.js | |||
@@ -5,8 +5,7 @@ import classnames from 'classnames'; | |||
5 | import uuidv1 from 'uuid/v1'; | 5 | import uuidv1 from 'uuid/v1'; |
6 | import { debounce } from 'lodash'; | 6 | import { debounce } from 'lodash'; |
7 | 7 | ||
8 | @observer | 8 | export default @observer class SearchInput extends Component { |
9 | export default class SearchInput extends Component { | ||
10 | static propTypes = { | 9 | static propTypes = { |
11 | value: PropTypes.string, | 10 | value: PropTypes.string, |
12 | placeholder: PropTypes.string, | 11 | placeholder: PropTypes.string, |
diff --git a/src/components/ui/Select.js b/src/components/ui/Select.js index 2a877af3e..abcad417e 100644 --- a/src/components/ui/Select.js +++ b/src/components/ui/Select.js | |||
@@ -4,8 +4,7 @@ import { observer } from 'mobx-react'; | |||
4 | import { Field } from 'mobx-react-form'; | 4 | import { Field } from 'mobx-react-form'; |
5 | import classnames from 'classnames'; | 5 | import classnames from 'classnames'; |
6 | 6 | ||
7 | @observer | 7 | export default @observer class Select extends Component { |
8 | export default class Select extends Component { | ||
9 | static propTypes = { | 8 | static propTypes = { |
10 | field: PropTypes.instanceOf(Field).isRequired, | 9 | field: PropTypes.instanceOf(Field).isRequired, |
11 | className: PropTypes.string, | 10 | className: PropTypes.string, |
diff --git a/src/components/ui/StatusBarTargetUrl.js b/src/components/ui/StatusBarTargetUrl.js index b7b198f42..4285a343c 100644 --- a/src/components/ui/StatusBarTargetUrl.js +++ b/src/components/ui/StatusBarTargetUrl.js | |||
@@ -5,8 +5,7 @@ import classnames from 'classnames'; | |||
5 | 5 | ||
6 | import Appear from '../ui/effects/Appear'; | 6 | import Appear from '../ui/effects/Appear'; |
7 | 7 | ||
8 | @observer | 8 | export default @observer class StatusBarTargetUrl extends Component { |
9 | export default class StatusBarTargetUrl extends Component { | ||
10 | static propTypes = { | 9 | static propTypes = { |
11 | className: PropTypes.string, | 10 | className: PropTypes.string, |
12 | text: PropTypes.string, | 11 | text: PropTypes.string, |
diff --git a/src/components/ui/Tabs/Tabs.js b/src/components/ui/Tabs/Tabs.js index 50397f9bb..12f650ffd 100644 --- a/src/components/ui/Tabs/Tabs.js +++ b/src/components/ui/Tabs/Tabs.js | |||
@@ -5,8 +5,7 @@ import classnames from 'classnames'; | |||
5 | 5 | ||
6 | import { oneOrManyChildElements } from '../../../prop-types'; | 6 | import { oneOrManyChildElements } from '../../../prop-types'; |
7 | 7 | ||
8 | @observer | 8 | export default @observer class Tab extends Component { |
9 | export default class Tab extends Component { | ||
10 | static propTypes = { | 9 | static propTypes = { |
11 | children: oneOrManyChildElements.isRequired, | 10 | children: oneOrManyChildElements.isRequired, |
12 | active: PropTypes.number, | 11 | active: PropTypes.number, |
diff --git a/src/components/ui/Toggle.js b/src/components/ui/Toggle.js index 62d46393e..f7c2ec955 100644 --- a/src/components/ui/Toggle.js +++ b/src/components/ui/Toggle.js | |||
@@ -4,8 +4,7 @@ import { observer } from 'mobx-react'; | |||
4 | import classnames from 'classnames'; | 4 | import classnames from 'classnames'; |
5 | import { Field } from 'mobx-react-form'; | 5 | import { Field } from 'mobx-react-form'; |
6 | 6 | ||
7 | @observer | 7 | export default @observer class Toggle extends Component { |
8 | export default class Toggle extends Component { | ||
9 | static propTypes = { | 8 | static propTypes = { |
10 | field: PropTypes.instanceOf(Field).isRequired, | 9 | field: PropTypes.instanceOf(Field).isRequired, |
11 | className: PropTypes.string, | 10 | className: PropTypes.string, |