diff options
author | 2018-11-22 14:14:25 +0100 | |
---|---|---|
committer | 2018-11-22 14:14:25 +0100 | |
commit | 46b8c8c4b3a5b80e0187b284abc84566a7e784db (patch) | |
tree | 7fd378bcdd18e78c42dfeb61a15f89fd10106046 /src/containers | |
parent | ADD features loading spinner (diff) | |
parent | feat(App): Add option to enable dark mode for supported services (diff) | |
download | ferdium-app-46b8c8c4b3a5b80e0187b284abc84566a7e784db.tar.gz ferdium-app-46b8c8c4b3a5b80e0187b284abc84566a7e784db.tar.zst ferdium-app-46b8c8c4b3a5b80e0187b284abc84566a7e784db.zip |
Merge branch 'develop' into feature/features-api
Diffstat (limited to 'src/containers')
19 files changed, 76 insertions, 80 deletions
diff --git a/src/containers/auth/AuthLayoutContainer.js b/src/containers/auth/AuthLayoutContainer.js index f362b1800..b73598f3d 100644 --- a/src/containers/auth/AuthLayoutContainer.js +++ b/src/containers/auth/AuthLayoutContainer.js | |||
@@ -9,8 +9,7 @@ import AppLoader from '../../components/ui/AppLoader'; | |||
9 | 9 | ||
10 | import { oneOrManyChildElements } from '../../prop-types'; | 10 | import { oneOrManyChildElements } from '../../prop-types'; |
11 | 11 | ||
12 | @inject('stores', 'actions') @observer | 12 | export default @inject('stores', 'actions') @observer class AuthLayoutContainer extends Component { |
13 | export default class AuthLayoutContainer extends Component { | ||
14 | static propTypes = { | 13 | static propTypes = { |
15 | children: oneOrManyChildElements.isRequired, | 14 | children: oneOrManyChildElements.isRequired, |
16 | location: PropTypes.shape({ | 15 | location: PropTypes.shape({ |
@@ -20,10 +19,10 @@ export default class AuthLayoutContainer extends Component { | |||
20 | 19 | ||
21 | render() { | 20 | render() { |
22 | const { stores, actions, children, location } = this.props; | 21 | const { stores, actions, children, location } = this.props; |
23 | const { features } = stores; | 22 | const { app, features, globalError } = stores; |
24 | 23 | ||
25 | const isLoadingBaseFeatures = features.baseFeaturesRequest.isExecuting | 24 | const isLoadingBaseFeatures = features.defaultFeaturesRequest.isExecuting |
26 | && !features.baseFeaturesRequest.wasExecuted; | 25 | && !features.defaultFeaturesRequest.wasExecuted; |
27 | 26 | ||
28 | if (isLoadingBaseFeatures) { | 27 | if (isLoadingBaseFeatures) { |
29 | return ( | 28 | return ( |
@@ -33,12 +32,14 @@ export default class AuthLayoutContainer extends Component { | |||
33 | 32 | ||
34 | return ( | 33 | return ( |
35 | <AuthLayout | 34 | <AuthLayout |
36 | error={stores.globalError.response} | 35 | error={globalError.response} |
37 | pathname={location.pathname} | 36 | pathname={location.pathname} |
38 | isOnline={stores.app.isOnline} | 37 | isOnline={app.isOnline} |
39 | isAPIHealthy={!stores.app.healthCheckRequest.isError} | 38 | isAPIHealthy={!app.healthCheckRequest.isError} |
40 | retryHealthCheck={actions.app.healthCheck} | 39 | retryHealthCheck={actions.app.healthCheck} |
41 | isHealthCheckLoading={stores.app.healthCheckRequest.isExecuting} | 40 | isHealthCheckLoading={app.healthCheckRequest.isExecuting} |
41 | isFullScreen={app.isFullScreen} | ||
42 | darkMode={app.isSystemDarkModeEnabled} | ||
42 | > | 43 | > |
43 | {children} | 44 | {children} |
44 | </AuthLayout> | 45 | </AuthLayout> |
diff --git a/src/containers/auth/ImportScreen.js b/src/containers/auth/ImportScreen.js index ddd56ffb6..fc46f8b54 100644 --- a/src/containers/auth/ImportScreen.js +++ b/src/containers/auth/ImportScreen.js | |||
@@ -5,8 +5,7 @@ import Import from '../../components/auth/Import'; | |||
5 | import UserStore from '../../stores/UserStore'; | 5 | import UserStore from '../../stores/UserStore'; |
6 | import { gaPage } from '../../lib/analytics'; | 6 | import { gaPage } from '../../lib/analytics'; |
7 | 7 | ||
8 | @inject('stores', 'actions') @observer | 8 | export default @inject('stores', 'actions') @observer class ImportScreen extends Component { |
9 | export default class ImportScreen extends Component { | ||
10 | componentDidMount() { | 9 | componentDidMount() { |
11 | gaPage('Auth/Import'); | 10 | gaPage('Auth/Import'); |
12 | } | 11 | } |
diff --git a/src/containers/auth/InviteScreen.js b/src/containers/auth/InviteScreen.js index 059888c99..26bf97038 100644 --- a/src/containers/auth/InviteScreen.js +++ b/src/containers/auth/InviteScreen.js | |||
@@ -4,8 +4,7 @@ import { inject, observer } from 'mobx-react'; | |||
4 | import Invite from '../../components/auth/Invite'; | 4 | import Invite from '../../components/auth/Invite'; |
5 | import { gaPage } from '../../lib/analytics'; | 5 | import { gaPage } from '../../lib/analytics'; |
6 | 6 | ||
7 | @inject('stores', 'actions') @observer | 7 | export default @inject('stores', 'actions') @observer class InviteScreen extends Component { |
8 | export default class InviteScreen extends Component { | ||
9 | componentDidMount() { | 8 | componentDidMount() { |
10 | gaPage('Auth/Invite'); | 9 | gaPage('Auth/Invite'); |
11 | } | 10 | } |
diff --git a/src/containers/auth/LoginScreen.js b/src/containers/auth/LoginScreen.js index 9e22c5141..865bd38f8 100644 --- a/src/containers/auth/LoginScreen.js +++ b/src/containers/auth/LoginScreen.js | |||
@@ -7,8 +7,7 @@ import { gaPage } from '../../lib/analytics'; | |||
7 | 7 | ||
8 | import { globalError as globalErrorPropType } from '../../prop-types'; | 8 | import { globalError as globalErrorPropType } from '../../prop-types'; |
9 | 9 | ||
10 | @inject('stores', 'actions') @observer | 10 | export default @inject('stores', 'actions') @observer class LoginScreen extends Component { |
11 | export default class LoginScreen extends Component { | ||
12 | static propTypes = { | 11 | static propTypes = { |
13 | error: globalErrorPropType.isRequired, | 12 | error: globalErrorPropType.isRequired, |
14 | }; | 13 | }; |
diff --git a/src/containers/auth/PasswordScreen.js b/src/containers/auth/PasswordScreen.js index d88cb08e6..236fd2031 100644 --- a/src/containers/auth/PasswordScreen.js +++ b/src/containers/auth/PasswordScreen.js | |||
@@ -5,8 +5,7 @@ import Password from '../../components/auth/Password'; | |||
5 | import UserStore from '../../stores/UserStore'; | 5 | import UserStore from '../../stores/UserStore'; |
6 | import { gaPage } from '../../lib/analytics'; | 6 | import { gaPage } from '../../lib/analytics'; |
7 | 7 | ||
8 | @inject('stores', 'actions') @observer | 8 | export default @inject('stores', 'actions') @observer class PasswordScreen extends Component { |
9 | export default class PasswordScreen extends Component { | ||
10 | componentDidMount() { | 9 | componentDidMount() { |
11 | gaPage('Auth/Password Retrieve'); | 10 | gaPage('Auth/Password Retrieve'); |
12 | } | 11 | } |
diff --git a/src/containers/auth/PricingScreen.js b/src/containers/auth/PricingScreen.js index 7e1586535..34b512e15 100644 --- a/src/containers/auth/PricingScreen.js +++ b/src/containers/auth/PricingScreen.js | |||
@@ -10,8 +10,7 @@ import { gaPage } from '../../lib/analytics'; | |||
10 | 10 | ||
11 | import { globalError as globalErrorPropType } from '../../prop-types'; | 11 | import { globalError as globalErrorPropType } from '../../prop-types'; |
12 | 12 | ||
13 | @inject('stores', 'actions') @observer | 13 | export default @inject('stores', 'actions') @observer class PricingScreen extends Component { |
14 | export default class PricingScreen extends Component { | ||
15 | static propTypes = { | 14 | static propTypes = { |
16 | error: globalErrorPropType.isRequired, | 15 | error: globalErrorPropType.isRequired, |
17 | }; | 16 | }; |
diff --git a/src/containers/auth/SignupScreen.js b/src/containers/auth/SignupScreen.js index 3b86ab138..caf75de90 100644 --- a/src/containers/auth/SignupScreen.js +++ b/src/containers/auth/SignupScreen.js | |||
@@ -8,8 +8,7 @@ import { gaPage } from '../../lib/analytics'; | |||
8 | 8 | ||
9 | import { globalError as globalErrorPropType } from '../../prop-types'; | 9 | import { globalError as globalErrorPropType } from '../../prop-types'; |
10 | 10 | ||
11 | @inject('stores', 'actions') @observer | 11 | export default @inject('stores', 'actions') @observer class SignupScreen extends Component { |
12 | export default class SignupScreen extends Component { | ||
13 | static propTypes = { | 12 | static propTypes = { |
14 | error: globalErrorPropType.isRequired, | 13 | error: globalErrorPropType.isRequired, |
15 | }; | 14 | }; |
diff --git a/src/containers/auth/WelcomeScreen.js b/src/containers/auth/WelcomeScreen.js index e413264a6..2c120f81c 100644 --- a/src/containers/auth/WelcomeScreen.js +++ b/src/containers/auth/WelcomeScreen.js | |||
@@ -7,8 +7,7 @@ import UserStore from '../../stores/UserStore'; | |||
7 | import RecipePreviewsStore from '../../stores/RecipePreviewsStore'; | 7 | import RecipePreviewsStore from '../../stores/RecipePreviewsStore'; |
8 | import { gaPage } from '../../lib/analytics'; | 8 | import { gaPage } from '../../lib/analytics'; |
9 | 9 | ||
10 | @inject('stores', 'actions') @observer | 10 | export default @inject('stores', 'actions') @observer class LoginScreen extends Component { |
11 | export default class LoginScreen extends Component { | ||
12 | componentDidMount() { | 11 | componentDidMount() { |
13 | gaPage('Auth/Welcome'); | 12 | gaPage('Auth/Welcome'); |
14 | } | 13 | } |
diff --git a/src/containers/layout/AppLayoutContainer.js b/src/containers/layout/AppLayoutContainer.js index 7a398ed2d..affc1a0a2 100644 --- a/src/containers/layout/AppLayoutContainer.js +++ b/src/containers/layout/AppLayoutContainer.js | |||
@@ -18,8 +18,7 @@ import Sidebar from '../../components/layout/Sidebar'; | |||
18 | import Services from '../../components/services/content/Services'; | 18 | import Services from '../../components/services/content/Services'; |
19 | import AppLoader from '../../components/ui/AppLoader'; | 19 | import AppLoader from '../../components/ui/AppLoader'; |
20 | 20 | ||
21 | @inject('stores', 'actions') @observer | 21 | export default @inject('stores', 'actions') @observer class AppLayoutContainer extends Component { |
22 | export default class AppLayoutContainer extends Component { | ||
23 | static defaultProps = { | 22 | static defaultProps = { |
24 | children: null, | 23 | children: null, |
25 | }; | 24 | }; |
@@ -82,7 +81,7 @@ export default class AppLayoutContainer extends Component { | |||
82 | <Sidebar | 81 | <Sidebar |
83 | services={services.allDisplayed} | 82 | services={services.allDisplayed} |
84 | setActive={setActive} | 83 | setActive={setActive} |
85 | isAppMuted={settings.all.isAppMuted} | 84 | isAppMuted={settings.all.app.isAppMuted} |
86 | openSettings={openSettings} | 85 | openSettings={openSettings} |
87 | closeSettings={closeSettings} | 86 | closeSettings={closeSettings} |
88 | reorder={reorder} | 87 | reorder={reorder} |
@@ -92,25 +91,26 @@ export default class AppLayoutContainer extends Component { | |||
92 | deleteService={deleteService} | 91 | deleteService={deleteService} |
93 | updateService={updateService} | 92 | updateService={updateService} |
94 | toggleMuteApp={toggleMuteApp} | 93 | toggleMuteApp={toggleMuteApp} |
95 | showMessageBadgeWhenMutedSetting={settings.all.showMessageBadgeWhenMuted} | 94 | showMessageBadgeWhenMutedSetting={settings.all.app.showMessageBadgeWhenMuted} |
96 | showMessageBadgesEvenWhenMuted={ui.showMessageBadgesEvenWhenMuted} | 95 | showMessageBadgesEvenWhenMuted={ui.showMessageBadgesEvenWhenMuted} |
97 | /> | 96 | /> |
98 | ); | 97 | ); |
99 | 98 | ||
100 | const servicesContainer = ( | 99 | const servicesContainer = ( |
101 | <Services | 100 | <Services |
102 | services={services.allDisplayed} | 101 | services={services.allDisplayedUnordered} |
103 | handleIPCMessage={handleIPCMessage} | 102 | handleIPCMessage={handleIPCMessage} |
104 | setWebviewReference={setWebviewReference} | 103 | setWebviewReference={setWebviewReference} |
105 | openWindow={openWindow} | 104 | openWindow={openWindow} |
106 | reload={reload} | 105 | reload={reload} |
107 | isAppMuted={settings.all.isAppMuted} | 106 | isAppMuted={settings.all.app.isAppMuted} |
108 | update={updateService} | 107 | update={updateService} |
109 | /> | 108 | /> |
110 | ); | 109 | ); |
111 | 110 | ||
112 | return ( | 111 | return ( |
113 | <AppLayout | 112 | <AppLayout |
113 | isFullScreen={app.isFullScreen} | ||
114 | isOnline={app.isOnline} | 114 | isOnline={app.isOnline} |
115 | showServicesUpdatedInfoBar={ui.showServicesUpdatedInfoBar} | 115 | showServicesUpdatedInfoBar={ui.showServicesUpdatedInfoBar} |
116 | appUpdateIsDownloaded={app.updateStatus === app.updateStatusTypes.DOWNLOADED} | 116 | appUpdateIsDownloaded={app.updateStatus === app.updateStatusTypes.DOWNLOADED} |
@@ -125,6 +125,7 @@ export default class AppLayoutContainer extends Component { | |||
125 | areRequiredRequestsSuccessful={requests.areRequiredRequestsSuccessful} | 125 | areRequiredRequestsSuccessful={requests.areRequiredRequestsSuccessful} |
126 | retryRequiredRequests={retryRequiredRequests} | 126 | retryRequiredRequests={retryRequiredRequests} |
127 | areRequiredRequestsLoading={requests.areRequiredRequestsLoading} | 127 | areRequiredRequestsLoading={requests.areRequiredRequestsLoading} |
128 | darkMode={settings.all.app.darkMode} | ||
128 | > | 129 | > |
129 | {React.Children.count(children) > 0 ? children : null} | 130 | {React.Children.count(children) > 0 ? children : null} |
130 | </AppLayout> | 131 | </AppLayout> |
diff --git a/src/containers/settings/AccountScreen.js b/src/containers/settings/AccountScreen.js index c5c2982b0..5818af0b1 100644 --- a/src/containers/settings/AccountScreen.js +++ b/src/containers/settings/AccountScreen.js | |||
@@ -12,8 +12,7 @@ import AccountDashboard from '../../components/settings/account/AccountDashboard | |||
12 | 12 | ||
13 | const { BrowserWindow } = remote; | 13 | const { BrowserWindow } = remote; |
14 | 14 | ||
15 | @inject('stores', 'actions') @observer | 15 | export default @inject('stores', 'actions') @observer class AccountScreen extends Component { |
16 | export default class AccountScreen extends Component { | ||
17 | componentDidMount() { | 16 | componentDidMount() { |
18 | gaPage('Settings/Account Dashboard'); | 17 | gaPage('Settings/Account Dashboard'); |
19 | } | 18 | } |
diff --git a/src/containers/settings/EditServiceScreen.js b/src/containers/settings/EditServiceScreen.js index f2d5550e1..17d727642 100644 --- a/src/containers/settings/EditServiceScreen.js +++ b/src/containers/settings/EditServiceScreen.js | |||
@@ -7,6 +7,7 @@ import UserStore from '../../stores/UserStore'; | |||
7 | import RecipesStore from '../../stores/RecipesStore'; | 7 | import RecipesStore from '../../stores/RecipesStore'; |
8 | import ServicesStore from '../../stores/ServicesStore'; | 8 | import ServicesStore from '../../stores/ServicesStore'; |
9 | import FeaturesStore from '../../stores/FeaturesStore'; | 9 | import FeaturesStore from '../../stores/FeaturesStore'; |
10 | import SettingsStore from '../../stores/SettingsStore'; | ||
10 | import Form from '../../lib/Form'; | 11 | import Form from '../../lib/Form'; |
11 | import { gaPage } from '../../lib/analytics'; | 12 | import { gaPage } from '../../lib/analytics'; |
12 | 13 | ||
@@ -51,10 +52,13 @@ const messages = defineMessages({ | |||
51 | id: 'settings.service.form.icon', | 52 | id: 'settings.service.form.icon', |
52 | defaultMessage: '!!!Custom icon', | 53 | defaultMessage: '!!!Custom icon', |
53 | }, | 54 | }, |
55 | enableDarkMode: { | ||
56 | id: 'settings.service.form.enableDarkMode', | ||
57 | defaultMessage: '!!!Enable Dark Mode', | ||
58 | }, | ||
54 | }); | 59 | }); |
55 | 60 | ||
56 | @inject('stores', 'actions') @observer | 61 | export default @inject('stores', 'actions') @observer class EditServiceScreen extends Component { |
57 | export default class EditServiceScreen extends Component { | ||
58 | static contextTypes = { | 62 | static contextTypes = { |
59 | intl: intlShape, | 63 | intl: intlShape, |
60 | }; | 64 | }; |
@@ -113,6 +117,11 @@ export default class EditServiceScreen extends Component { | |||
113 | default: null, | 117 | default: null, |
114 | type: 'file', | 118 | type: 'file', |
115 | }, | 119 | }, |
120 | isDarkModeEnabled: { | ||
121 | label: intl.formatMessage(messages.enableDarkMode), | ||
122 | value: service.isDarkModeEnabled, | ||
123 | default: this.props.stores.settings.all.app.darkMode, | ||
124 | }, | ||
116 | }, | 125 | }, |
117 | }; | 126 | }; |
118 | 127 | ||
@@ -245,6 +254,7 @@ EditServiceScreen.wrappedComponent.propTypes = { | |||
245 | recipes: PropTypes.instanceOf(RecipesStore).isRequired, | 254 | recipes: PropTypes.instanceOf(RecipesStore).isRequired, |
246 | services: PropTypes.instanceOf(ServicesStore).isRequired, | 255 | services: PropTypes.instanceOf(ServicesStore).isRequired, |
247 | features: PropTypes.instanceOf(FeaturesStore).isRequired, | 256 | features: PropTypes.instanceOf(FeaturesStore).isRequired, |
257 | settings: PropTypes.instanceOf(SettingsStore).isRequired, | ||
248 | }).isRequired, | 258 | }).isRequired, |
249 | router: PropTypes.shape({ | 259 | router: PropTypes.shape({ |
250 | params: PropTypes.shape({ | 260 | params: PropTypes.shape({ |
diff --git a/src/containers/settings/EditSettingsScreen.js b/src/containers/settings/EditSettingsScreen.js index 1fa7ce8bc..df6442eb8 100644 --- a/src/containers/settings/EditSettingsScreen.js +++ b/src/containers/settings/EditSettingsScreen.js | |||
@@ -39,6 +39,10 @@ const messages = defineMessages({ | |||
39 | id: 'settings.app.form.language', | 39 | id: 'settings.app.form.language', |
40 | defaultMessage: '!!!Language', | 40 | defaultMessage: '!!!Language', |
41 | }, | 41 | }, |
42 | darkMode: { | ||
43 | id: 'settings.app.form.darkMode', | ||
44 | defaultMessage: '!!!Dark Mode', | ||
45 | }, | ||
42 | showDisabledServices: { | 46 | showDisabledServices: { |
43 | id: 'settings.app.form.showDisabledServices', | 47 | id: 'settings.app.form.showDisabledServices', |
44 | defaultMessage: '!!!Display disabled services tabs', | 48 | defaultMessage: '!!!Display disabled services tabs', |
@@ -51,22 +55,21 @@ const messages = defineMessages({ | |||
51 | id: 'settings.app.form.enableSpellchecking', | 55 | id: 'settings.app.form.enableSpellchecking', |
52 | defaultMessage: '!!!Enable spell checking', | 56 | defaultMessage: '!!!Enable spell checking', |
53 | }, | 57 | }, |
58 | enableGPUAcceleration: { | ||
59 | id: 'settings.app.form.enableGPUAcceleration', | ||
60 | defaultMessage: '!!!Enable GPU Acceleration', | ||
61 | }, | ||
54 | spellcheckingLanguage: { | 62 | spellcheckingLanguage: { |
55 | id: 'settings.app.form.spellcheckingLanguage', | 63 | id: 'settings.app.form.spellcheckingLanguage', |
56 | defaultMessage: '!!!Language for spell checking', | 64 | defaultMessage: '!!!Language for spell checking', |
57 | }, | 65 | }, |
58 | // spellcheckingAutomaticDetection: { | ||
59 | // id: 'settings.app.form.spellcheckingAutomaticDetection', | ||
60 | // defaultMessage: '!!!Detect language automatically', | ||
61 | // }, | ||
62 | beta: { | 66 | beta: { |
63 | id: 'settings.app.form.beta', | 67 | id: 'settings.app.form.beta', |
64 | defaultMessage: '!!!Include beta versions', | 68 | defaultMessage: '!!!Include beta versions', |
65 | }, | 69 | }, |
66 | }); | 70 | }); |
67 | 71 | ||
68 | @inject('stores', 'actions') @observer | 72 | export default @inject('stores', 'actions') @observer class EditSettingsScreen extends Component { |
69 | export default class EditSettingsScreen extends Component { | ||
70 | static contextTypes = { | 73 | static contextTypes = { |
71 | intl: intlShape, | 74 | intl: intlShape, |
72 | }; | 75 | }; |
@@ -84,22 +87,25 @@ export default class EditSettingsScreen extends Component { | |||
84 | }); | 87 | }); |
85 | 88 | ||
86 | settings.update({ | 89 | settings.update({ |
87 | settings: { | 90 | type: 'app', |
91 | data: { | ||
88 | runInBackground: settingsData.runInBackground, | 92 | runInBackground: settingsData.runInBackground, |
89 | enableSystemTray: settingsData.enableSystemTray, | 93 | enableSystemTray: settingsData.enableSystemTray, |
90 | minimizeToSystemTray: settingsData.minimizeToSystemTray, | 94 | minimizeToSystemTray: settingsData.minimizeToSystemTray, |
95 | enableGPUAcceleration: settingsData.enableGPUAcceleration, | ||
91 | showDisabledServices: settingsData.showDisabledServices, | 96 | showDisabledServices: settingsData.showDisabledServices, |
97 | darkMode: settingsData.darkMode, | ||
92 | showMessageBadgeWhenMuted: settingsData.showMessageBadgeWhenMuted, | 98 | showMessageBadgeWhenMuted: settingsData.showMessageBadgeWhenMuted, |
93 | enableSpellchecking: settingsData.enableSpellchecking, | 99 | enableSpellchecking: settingsData.enableSpellchecking, |
94 | // spellcheckingLanguage: settingsData.spellcheckingLanguage, | 100 | beta: settingsData.beta, // we need this info in the main process as well |
95 | locale: settingsData.locale, | 101 | locale: settingsData.locale, // we need this info in the main process as well |
96 | beta: settingsData.beta, | ||
97 | }, | 102 | }, |
98 | }); | 103 | }); |
99 | 104 | ||
100 | user.update({ | 105 | user.update({ |
101 | userData: { | 106 | userData: { |
102 | beta: settingsData.beta, | 107 | beta: settingsData.beta, |
108 | locale: settingsData.locale, | ||
103 | }, | 109 | }, |
104 | }); | 110 | }); |
105 | } | 111 | } |
@@ -116,17 +122,6 @@ export default class EditSettingsScreen extends Component { | |||
116 | }); | 122 | }); |
117 | }); | 123 | }); |
118 | 124 | ||
119 | // const spellcheckerLocales = [{ | ||
120 | // value: 'auto', | ||
121 | // label: intl.formatMessage(messages.spellcheckingAutomaticDetection), | ||
122 | // }]; | ||
123 | // Object.keys(SPELLCHECKER_LOCALES).forEach((key) => { | ||
124 | // spellcheckerLocales.push({ | ||
125 | // value: key, | ||
126 | // label: SPELLCHECKER_LOCALES[key], | ||
127 | // }); | ||
128 | // }); | ||
129 | |||
130 | const config = { | 125 | const config = { |
131 | fields: { | 126 | fields: { |
132 | autoLaunchOnStart: { | 127 | autoLaunchOnStart: { |
@@ -141,40 +136,44 @@ export default class EditSettingsScreen extends Component { | |||
141 | }, | 136 | }, |
142 | runInBackground: { | 137 | runInBackground: { |
143 | label: intl.formatMessage(messages.runInBackground), | 138 | label: intl.formatMessage(messages.runInBackground), |
144 | value: settings.all.runInBackground, | 139 | value: settings.all.app.runInBackground, |
145 | default: DEFAULT_APP_SETTINGS.runInBackground, | 140 | default: DEFAULT_APP_SETTINGS.runInBackground, |
146 | }, | 141 | }, |
147 | enableSystemTray: { | 142 | enableSystemTray: { |
148 | label: intl.formatMessage(messages.enableSystemTray), | 143 | label: intl.formatMessage(messages.enableSystemTray), |
149 | value: settings.all.enableSystemTray, | 144 | value: settings.all.app.enableSystemTray, |
150 | default: DEFAULT_APP_SETTINGS.enableSystemTray, | 145 | default: DEFAULT_APP_SETTINGS.enableSystemTray, |
151 | }, | 146 | }, |
152 | minimizeToSystemTray: { | 147 | minimizeToSystemTray: { |
153 | label: intl.formatMessage(messages.minimizeToSystemTray), | 148 | label: intl.formatMessage(messages.minimizeToSystemTray), |
154 | value: settings.all.minimizeToSystemTray, | 149 | value: settings.all.app.minimizeToSystemTray, |
155 | default: DEFAULT_APP_SETTINGS.minimizeToSystemTray, | 150 | default: DEFAULT_APP_SETTINGS.minimizeToSystemTray, |
156 | }, | 151 | }, |
157 | showDisabledServices: { | 152 | showDisabledServices: { |
158 | label: intl.formatMessage(messages.showDisabledServices), | 153 | label: intl.formatMessage(messages.showDisabledServices), |
159 | value: settings.all.showDisabledServices, | 154 | value: settings.all.app.showDisabledServices, |
160 | default: DEFAULT_APP_SETTINGS.showDisabledServices, | 155 | default: DEFAULT_APP_SETTINGS.showDisabledServices, |
161 | }, | 156 | }, |
162 | showMessageBadgeWhenMuted: { | 157 | showMessageBadgeWhenMuted: { |
163 | label: intl.formatMessage(messages.showMessageBadgeWhenMuted), | 158 | label: intl.formatMessage(messages.showMessageBadgeWhenMuted), |
164 | value: settings.all.showMessageBadgeWhenMuted, | 159 | value: settings.all.app.showMessageBadgeWhenMuted, |
165 | default: DEFAULT_APP_SETTINGS.showMessageBadgeWhenMuted, | 160 | default: DEFAULT_APP_SETTINGS.showMessageBadgeWhenMuted, |
166 | }, | 161 | }, |
167 | enableSpellchecking: { | 162 | enableSpellchecking: { |
168 | label: intl.formatMessage(messages.enableSpellchecking), | 163 | label: intl.formatMessage(messages.enableSpellchecking), |
169 | value: settings.all.enableSpellchecking, | 164 | value: settings.all.app.enableSpellchecking, |
170 | default: DEFAULT_APP_SETTINGS.enableSpellchecking, | 165 | default: DEFAULT_APP_SETTINGS.enableSpellchecking, |
171 | }, | 166 | }, |
172 | // spellcheckingLanguage: { | 167 | darkMode: { |
173 | // label: intl.formatMessage(messages.spellcheckingLanguage), | 168 | label: intl.formatMessage(messages.darkMode), |
174 | // value: settings.all.spellcheckingLanguage, | 169 | value: settings.all.app.darkMode, |
175 | // options: spellcheckerLocales, | 170 | default: DEFAULT_APP_SETTINGS.darkMode, |
176 | // default: DEFAULT_APP_SETTINGS.spellcheckingLanguage, | 171 | }, |
177 | // }, | 172 | enableGPUAcceleration: { |
173 | label: intl.formatMessage(messages.enableGPUAcceleration), | ||
174 | value: settings.all.app.enableGPUAcceleration, | ||
175 | default: DEFAULT_APP_SETTINGS.enableGPUAcceleration, | ||
176 | }, | ||
178 | locale: { | 177 | locale: { |
179 | label: intl.formatMessage(messages.language), | 178 | label: intl.formatMessage(messages.language), |
180 | value: app.locale, | 179 | value: app.locale, |
diff --git a/src/containers/settings/EditUserScreen.js b/src/containers/settings/EditUserScreen.js index a67fa7fb5..3da3e8d2c 100644 --- a/src/containers/settings/EditUserScreen.js +++ b/src/containers/settings/EditUserScreen.js | |||
@@ -50,8 +50,7 @@ const messages = defineMessages({ | |||
50 | }, | 50 | }, |
51 | }); | 51 | }); |
52 | 52 | ||
53 | @inject('stores', 'actions') @observer | 53 | export default @inject('stores', 'actions') @observer class EditUserScreen extends Component { |
54 | export default class EditUserScreen extends Component { | ||
55 | static contextTypes = { | 54 | static contextTypes = { |
56 | intl: intlShape, | 55 | intl: intlShape, |
57 | }; | 56 | }; |
diff --git a/src/containers/settings/InviteScreen.js b/src/containers/settings/InviteScreen.js index 5f341b1b3..38ca6ec74 100644 --- a/src/containers/settings/InviteScreen.js +++ b/src/containers/settings/InviteScreen.js | |||
@@ -5,8 +5,7 @@ import { inject, observer } from 'mobx-react'; | |||
5 | import Invite from '../../components/auth/Invite'; | 5 | import Invite from '../../components/auth/Invite'; |
6 | import { gaPage } from '../../lib/analytics'; | 6 | import { gaPage } from '../../lib/analytics'; |
7 | 7 | ||
8 | @inject('stores', 'actions') @observer | 8 | export default @inject('stores', 'actions') @observer class InviteScreen extends Component { |
9 | export default class InviteScreen extends Component { | ||
10 | componentDidMount() { | 9 | componentDidMount() { |
11 | gaPage('Settings/Invite'); | 10 | gaPage('Settings/Invite'); |
12 | } | 11 | } |
diff --git a/src/containers/settings/RecipesScreen.js b/src/containers/settings/RecipesScreen.js index 65341e9e3..4efe81505 100644 --- a/src/containers/settings/RecipesScreen.js +++ b/src/containers/settings/RecipesScreen.js | |||
@@ -11,8 +11,7 @@ import { gaPage } from '../../lib/analytics'; | |||
11 | 11 | ||
12 | import RecipesDashboard from '../../components/settings/recipes/RecipesDashboard'; | 12 | import RecipesDashboard from '../../components/settings/recipes/RecipesDashboard'; |
13 | 13 | ||
14 | @inject('stores', 'actions') @observer | 14 | export default @inject('stores', 'actions') @observer class RecipesScreen extends Component { |
15 | export default class RecipesScreen extends Component { | ||
16 | static propTypes = { | 15 | static propTypes = { |
17 | params: PropTypes.shape({ | 16 | params: PropTypes.shape({ |
18 | filter: PropTypes.string, | 17 | filter: PropTypes.string, |
diff --git a/src/containers/settings/ServicesScreen.js b/src/containers/settings/ServicesScreen.js index 12db1bcd3..c1a133ef7 100644 --- a/src/containers/settings/ServicesScreen.js +++ b/src/containers/settings/ServicesScreen.js | |||
@@ -10,8 +10,7 @@ import { gaPage } from '../../lib/analytics'; | |||
10 | 10 | ||
11 | import ServicesDashboard from '../../components/settings/services/ServicesDashboard'; | 11 | import ServicesDashboard from '../../components/settings/services/ServicesDashboard'; |
12 | 12 | ||
13 | @inject('stores', 'actions') @observer | 13 | export default @inject('stores', 'actions') @observer class ServicesScreen extends Component { |
14 | export default class ServicesScreen extends Component { | ||
15 | componentDidMount() { | 14 | componentDidMount() { |
16 | gaPage('Settings/Service Dashboard'); | 15 | gaPage('Settings/Service Dashboard'); |
17 | } | 16 | } |
diff --git a/src/containers/settings/SettingsWindow.js b/src/containers/settings/SettingsWindow.js index 13ca96f72..55589d0be 100644 --- a/src/containers/settings/SettingsWindow.js +++ b/src/containers/settings/SettingsWindow.js | |||
@@ -7,8 +7,7 @@ import ServicesStore from '../../stores/ServicesStore'; | |||
7 | import Layout from '../../components/settings/SettingsLayout'; | 7 | import Layout from '../../components/settings/SettingsLayout'; |
8 | import Navigation from '../../components/settings/navigation/SettingsNavigation'; | 8 | import Navigation from '../../components/settings/navigation/SettingsNavigation'; |
9 | 9 | ||
10 | @inject('stores', 'actions') @observer | 10 | export default @inject('stores', 'actions') @observer class SettingsContainer extends Component { |
11 | export default class SettingsContainer extends Component { | ||
12 | render() { | 11 | render() { |
13 | const { children, stores } = this.props; | 12 | const { children, stores } = this.props; |
14 | const { closeSettings } = this.props.actions.ui; | 13 | const { closeSettings } = this.props.actions.ui; |
diff --git a/src/containers/subscription/SubscriptionFormScreen.js b/src/containers/subscription/SubscriptionFormScreen.js index fc6e3c4be..9f7571bda 100644 --- a/src/containers/subscription/SubscriptionFormScreen.js +++ b/src/containers/subscription/SubscriptionFormScreen.js | |||
@@ -9,8 +9,7 @@ import SubscriptionForm from '../../components/subscription/SubscriptionForm'; | |||
9 | 9 | ||
10 | const { BrowserWindow } = remote; | 10 | const { BrowserWindow } = remote; |
11 | 11 | ||
12 | @inject('stores', 'actions') @observer | 12 | export default @inject('stores', 'actions') @observer class SubscriptionFormScreen extends Component { |
13 | export default class SubscriptionFormScreen extends Component { | ||
14 | static propTypes = { | 13 | static propTypes = { |
15 | onCloseWindow: PropTypes.func, | 14 | onCloseWindow: PropTypes.func, |
16 | content: PropTypes.oneOrManyChildElements, | 15 | content: PropTypes.oneOrManyChildElements, |
diff --git a/src/containers/subscription/SubscriptionPopupScreen.js b/src/containers/subscription/SubscriptionPopupScreen.js index bb0603170..6641f236d 100644 --- a/src/containers/subscription/SubscriptionPopupScreen.js +++ b/src/containers/subscription/SubscriptionPopupScreen.js | |||
@@ -5,8 +5,7 @@ import { inject, observer } from 'mobx-react'; | |||
5 | import SubscriptionPopup from '../../components/subscription/SubscriptionPopup'; | 5 | import SubscriptionPopup from '../../components/subscription/SubscriptionPopup'; |
6 | 6 | ||
7 | 7 | ||
8 | @inject('stores', 'actions') @observer | 8 | export default @inject('stores', 'actions') @observer class SubscriptionPopupScreen extends Component { |
9 | export default class SubscriptionPopupScreen extends Component { | ||
10 | state = { | 9 | state = { |
11 | complete: false, | 10 | complete: false, |
12 | }; | 11 | }; |