aboutsummaryrefslogtreecommitdiffstats
path: root/src/containers/settings/EditSettingsScreen.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/containers/settings/EditSettingsScreen.js')
-rw-r--r--src/containers/settings/EditSettingsScreen.js179
1 files changed, 101 insertions, 78 deletions
diff --git a/src/containers/settings/EditSettingsScreen.js b/src/containers/settings/EditSettingsScreen.js
index 09244bc3c..1b05644f9 100644
--- a/src/containers/settings/EditSettingsScreen.js
+++ b/src/containers/settings/EditSettingsScreen.js
@@ -1,7 +1,7 @@
1import React, { Component } from 'react'; 1import React, { Component } from 'react';
2import PropTypes from 'prop-types'; 2import PropTypes from 'prop-types';
3import { inject, observer } from 'mobx-react'; 3import { inject, observer } from 'mobx-react';
4import { defineMessages, intlShape } from 'react-intl'; 4import { defineMessages, injectIntl } from 'react-intl';
5 5
6import AppStore from '../../stores/AppStore'; 6import AppStore from '../../stores/AppStore';
7import SettingsStore from '../../stores/SettingsStore'; 7import SettingsStore from '../../stores/SettingsStore';
@@ -10,10 +10,18 @@ import TodosStore from '../../features/todos/store';
10import Form from '../../lib/Form'; 10import Form from '../../lib/Form';
11import { APP_LOCALES, SPELLCHECKER_LOCALES } from '../../i18n/languages'; 11import { APP_LOCALES, SPELLCHECKER_LOCALES } from '../../i18n/languages';
12import { 12import {
13 HIBERNATION_STRATEGIES, SIDEBAR_WIDTH, ICON_SIZES, NAVIGATION_BAR_BEHAVIOURS, SEARCH_ENGINE_NAMES, TODO_APPS, 13 DEFAULT_APP_SETTINGS,
14 DEFAULT_SETTING_KEEP_ALL_WORKSPACES_LOADED, DEFAULT_IS_FEATURE_ENABLED_BY_USER, WAKE_UP_STRATEGIES, 14 HIBERNATION_STRATEGIES,
15 SIDEBAR_WIDTH,
16 ICON_SIZES,
17 NAVIGATION_BAR_BEHAVIOURS,
18 SEARCH_ENGINE_NAMES,
19 TODO_APPS,
20 DEFAULT_SETTING_KEEP_ALL_WORKSPACES_LOADED,
21 DEFAULT_IS_FEATURE_ENABLED_BY_USER,
22 WAKE_UP_STRATEGIES,
15} from '../../config'; 23} from '../../config';
16import { DEFAULT_APP_SETTINGS, isMac } from '../../environment'; 24import { isMac } from '../../environment';
17 25
18import { getSelectOptions } from '../../helpers/i18n-helpers'; 26import { getSelectOptions } from '../../helpers/i18n-helpers';
19import { hash } from '../../helpers/password-helpers'; 27import { hash } from '../../helpers/password-helpers';
@@ -31,195 +39,197 @@ const debug = require('debug')('Ferdi:EditSettingsScreen');
31const messages = defineMessages({ 39const messages = defineMessages({
32 autoLaunchOnStart: { 40 autoLaunchOnStart: {
33 id: 'settings.app.form.autoLaunchOnStart', 41 id: 'settings.app.form.autoLaunchOnStart',
34 defaultMessage: '!!!Launch Ferdi on start', 42 defaultMessage: 'Launch Ferdi on start',
35 }, 43 },
36 autoLaunchInBackground: { 44 autoLaunchInBackground: {
37 id: 'settings.app.form.autoLaunchInBackground', 45 id: 'settings.app.form.autoLaunchInBackground',
38 defaultMessage: '!!!Open in background', 46 defaultMessage: 'Open in background',
39 }, 47 },
40 runInBackground: { 48 runInBackground: {
41 id: 'settings.app.form.runInBackground', 49 id: 'settings.app.form.runInBackground',
42 defaultMessage: '!!!Keep Ferdi in background when closing the window', 50 defaultMessage: 'Keep Ferdi in background when closing the window',
43 }, 51 },
44 startMinimized: { 52 startMinimized: {
45 id: 'settings.app.form.startMinimized', 53 id: 'settings.app.form.startMinimized',
46 defaultMessage: '!!!Start minimized', 54 defaultMessage: 'Start minimized',
47 }, 55 },
48 confirmOnQuit: { 56 confirmOnQuit: {
49 id: 'settings.app.form.confirmOnQuit', 57 id: 'settings.app.form.confirmOnQuit',
50 defaultMessage: '!!!Confirm when quitting Ferdi', 58 defaultMessage: 'Confirm when quitting Ferdi',
51 }, 59 },
52 enableSystemTray: { 60 enableSystemTray: {
53 id: 'settings.app.form.enableSystemTray', 61 id: 'settings.app.form.enableSystemTray',
54 defaultMessage: '!!!Always show Ferdi in System Tray', 62 defaultMessage: 'Always show Ferdi in System Tray',
55 }, 63 },
56 enableMenuBar: { 64 enableMenuBar: {
57 id: 'settings.app.form.enableMenuBar', 65 id: 'settings.app.form.enableMenuBar',
58 defaultMessage: '!!!Always show Ferdi in Menu Bar', 66 defaultMessage: 'Always show Ferdi in Menu Bar',
59 }, 67 },
60 reloadAfterResume: { 68 reloadAfterResume: {
61 id: 'settings.app.form.reloadAfterResume', 69 id: 'settings.app.form.reloadAfterResume',
62 defaultMessage: '!!!Reload Ferdi after system resume', 70 defaultMessage: 'Reload Ferdi after system resume',
63 }, 71 },
64 minimizeToSystemTray: { 72 minimizeToSystemTray: {
65 id: 'settings.app.form.minimizeToSystemTray', 73 id: 'settings.app.form.minimizeToSystemTray',
66 defaultMessage: '!!!Minimize Ferdi to system tray', 74 defaultMessage: 'Minimize Ferdi to system tray',
67 }, 75 },
68 closeToSystemTray: { 76 closeToSystemTray: {
69 id: 'settings.app.form.closeToSystemTray', 77 id: 'settings.app.form.closeToSystemTray',
70 defaultMessage: '!!!Close Ferdi to system tray', 78 defaultMessage: 'Close Ferdi to system tray',
71 }, 79 },
72 privateNotifications: { 80 privateNotifications: {
73 id: 'settings.app.form.privateNotifications', 81 id: 'settings.app.form.privateNotifications',
74 defaultMessage: '!!!Don\'t show message content in notifications', 82 defaultMessage: "Don't show message content in notifications",
75 }, 83 },
76 clipboardNotifications: { 84 clipboardNotifications: {
77 id: 'settings.app.form.clipboardNotifications', 85 id: 'settings.app.form.clipboardNotifications',
78 defaultMessage: '!!!Don\'t show notifications for clipboard events', 86 defaultMessage: "Don't show notifications for clipboard events",
79 }, 87 },
80 notifyTaskBarOnMessage: { 88 notifyTaskBarOnMessage: {
81 id: 'settings.app.form.notifyTaskBarOnMessage', 89 id: 'settings.app.form.notifyTaskBarOnMessage',
82 defaultMessage: '!!!Notify TaskBar/Dock on new message', 90 defaultMessage: 'Notify TaskBar/Dock on new message',
83 }, 91 },
84 navigationBarBehaviour: { 92 navigationBarBehaviour: {
85 id: 'settings.app.form.navigationBarBehaviour', 93 id: 'settings.app.form.navigationBarBehaviour',
86 defaultMessage: '!!!Navigation bar behaviour', 94 defaultMessage: 'Navigation bar behaviour',
87 }, 95 },
88 searchEngine: { 96 searchEngine: {
89 id: 'settings.app.form.searchEngine', 97 id: 'settings.app.form.searchEngine',
90 defaultMessage: '!!!Search engine', 98 defaultMessage: 'Search engine',
91 }, 99 },
92 sentry: { 100 sentry: {
93 id: 'settings.app.form.sentry', 101 id: 'settings.app.form.sentry',
94 defaultMessage: '!!!Send telemetry data', 102 defaultMessage: 'Send telemetry data',
95 }, 103 },
96 hibernateOnStartup: { 104 hibernateOnStartup: {
97 id: 'settings.app.form.hibernateOnStartup', 105 id: 'settings.app.form.hibernateOnStartup',
98 defaultMessage: '!!!Keep services in hibernation on startup', 106 defaultMessage: 'Keep services in hibernation on startup',
99 }, 107 },
100 hibernationStrategy: { 108 hibernationStrategy: {
101 id: 'settings.app.form.hibernationStrategy', 109 id: 'settings.app.form.hibernationStrategy',
102 defaultMessage: '!!!Hibernation strategy', 110 defaultMessage: 'Hibernation strategy',
103 }, 111 },
104 wakeUpStrategy: { 112 wakeUpStrategy: {
105 id: 'settings.app.form.wakeUpStrategy', 113 id: 'settings.app.form.wakeUpStrategy',
106 defaultMessage: '!!!Wake up strategy', 114 defaultMessage: 'Wake up strategy',
107 }, 115 },
108 predefinedTodoServer: { 116 predefinedTodoServer: {
109 id: 'settings.app.form.predefinedTodoServer', 117 id: 'settings.app.form.predefinedTodoServer',
110 defaultMessage: '!!!Todo Server', 118 defaultMessage: 'Todo Server',
111 }, 119 },
112 customTodoServer: { 120 customTodoServer: {
113 id: 'settings.app.form.customTodoServer', 121 id: 'settings.app.form.customTodoServer',
114 defaultMessage: '!!!Custom TodoServer', 122 defaultMessage: 'Custom Todo Server',
115 }, 123 },
116 enableLock: { 124 enableLock: {
117 id: 'settings.app.form.enableLock', 125 id: 'settings.app.form.enableLock',
118 defaultMessage: '!!!Enable Password Lock', 126 defaultMessage: 'Enable Password Lock',
119 }, 127 },
120 lockPassword: { 128 lockPassword: {
121 id: 'settings.app.form.lockPassword', 129 id: 'settings.app.form.lockPassword',
122 defaultMessage: '!!!Password', 130 defaultMessage: 'Password',
123 }, 131 },
124 useTouchIdToUnlock: { 132 useTouchIdToUnlock: {
125 id: 'settings.app.form.useTouchIdToUnlock', 133 id: 'settings.app.form.useTouchIdToUnlock',
126 defaultMessage: '!!!Allow using Touch ID to unlock', 134 defaultMessage: 'Allow using TouchID to unlock Ferdi',
127 }, 135 },
128 inactivityLock: { 136 inactivityLock: {
129 id: 'settings.app.form.inactivityLock', 137 id: 'settings.app.form.inactivityLock',
130 defaultMessage: '!!!Lock after inactivity', 138 defaultMessage: 'Lock after inactivity',
131 }, 139 },
132 scheduledDNDEnabled: { 140 scheduledDNDEnabled: {
133 id: 'settings.app.form.scheduledDNDEnabled', 141 id: 'settings.app.form.scheduledDNDEnabled',
134 defaultMessage: '!!!Enable scheduled Do-not-Disturb', 142 defaultMessage: 'Enable scheduled Do-not-Disturb',
135 }, 143 },
136 scheduledDNDStart: { 144 scheduledDNDStart: {
137 id: 'settings.app.form.scheduledDNDStart', 145 id: 'settings.app.form.scheduledDNDStart',
138 defaultMessage: '!!!From', 146 defaultMessage: 'From',
139 }, 147 },
140 scheduledDNDEnd: { 148 scheduledDNDEnd: {
141 id: 'settings.app.form.scheduledDNDEnd', 149 id: 'settings.app.form.scheduledDNDEnd',
142 defaultMessage: '!!!To', 150 defaultMessage: 'To',
143 }, 151 },
144 language: { 152 language: {
145 id: 'settings.app.form.language', 153 id: 'settings.app.form.language',
146 defaultMessage: '!!!Language', 154 defaultMessage: 'Language',
147 }, 155 },
148 darkMode: { 156 darkMode: {
149 id: 'settings.app.form.darkMode', 157 id: 'settings.app.form.darkMode',
150 defaultMessage: '!!!Dark Mode', 158 defaultMessage: 'Enable Dark Mode',
151 }, 159 },
152 adaptableDarkMode: { 160 adaptableDarkMode: {
153 id: 'settings.app.form.adaptableDarkMode', 161 id: 'settings.app.form.adaptableDarkMode',
154 defaultMessage: '!!!Synchronize dark mode with my OS\'s dark mode setting', 162 defaultMessage: "Synchronize dark mode with my OS's dark mode setting",
155 }, 163 },
156 universalDarkMode: { 164 universalDarkMode: {
157 id: 'settings.app.form.universalDarkMode', 165 id: 'settings.app.form.universalDarkMode',
158 defaultMessage: '!!!Enable universal Dark Mode', 166 defaultMessage: 'Enable universal Dark Mode',
167 },
168 splitMode: {
169 id: 'settings.app.form.splitMode',
170 defaultMessage: 'Enable Split View Mode',
159 }, 171 },
160 serviceRibbonWidth: { 172 serviceRibbonWidth: {
161 id: 'settings.app.form.serviceRibbonWidth', 173 id: 'settings.app.form.serviceRibbonWidth',
162 defaultMessage: '!!!Sidebar width', 174 defaultMessage: 'Sidebar width',
163 }, 175 },
164 iconSize: { 176 iconSize: {
165 id: 'settings.app.form.iconSize', 177 id: 'settings.app.form.iconSize',
166 defaultMessage: '!!!Service icon size', 178 defaultMessage: 'Service icon size',
167 }, 179 },
168 useVerticalStyle: { 180 useVerticalStyle: {
169 id: 'settings.app.form.useVerticalStyle', 181 id: 'settings.app.form.useVerticalStyle',
170 defaultMessage: '!!!Use horizontal style', 182 defaultMessage: 'Use horizontal style',
171 }, 183 },
172 alwaysShowWorkspaces: { 184 alwaysShowWorkspaces: {
173 id: 'settings.app.form.alwaysShowWorkspaces', 185 id: 'settings.app.form.alwaysShowWorkspaces',
174 defaultMessage: '!!!Always show workspace drawer', 186 defaultMessage: 'Always show workspace drawer',
175 }, 187 },
176 accentColor: { 188 accentColor: {
177 id: 'settings.app.form.accentColor', 189 id: 'settings.app.form.accentColor',
178 defaultMessage: '!!!Accent color', 190 defaultMessage: 'Accent color',
179 }, 191 },
180 showDisabledServices: { 192 showDisabledServices: {
181 id: 'settings.app.form.showDisabledServices', 193 id: 'settings.app.form.showDisabledServices',
182 defaultMessage: '!!!Display disabled services tabs', 194 defaultMessage: 'Display disabled services tabs',
183 }, 195 },
184 showMessageBadgeWhenMuted: { 196 showMessageBadgeWhenMuted: {
185 id: 'settings.app.form.showMessagesBadgesWhenMuted', 197 id: 'settings.app.form.showMessagesBadgesWhenMuted',
186 defaultMessage: '!!!Show unread message badge when notifications are disabled', 198 defaultMessage: 'Show unread message badge when notifications are disabled',
187 }, 199 },
188 showDragArea: { 200 showDragArea: {
189 id: 'settings.app.form.showDragArea', 201 id: 'settings.app.form.showDragArea',
190 defaultMessage: '!!!Show draggable area on window', 202 defaultMessage: 'Show draggable area on window',
191 }, 203 },
192 enableSpellchecking: { 204 enableSpellchecking: {
193 id: 'settings.app.form.enableSpellchecking', 205 id: 'settings.app.form.enableSpellchecking',
194 defaultMessage: '!!!Enable spell checking', 206 defaultMessage: 'Enable spell checking',
195 }, 207 },
196 enableGPUAcceleration: { 208 enableGPUAcceleration: {
197 id: 'settings.app.form.enableGPUAcceleration', 209 id: 'settings.app.form.enableGPUAcceleration',
198 defaultMessage: '!!!Enable GPU Acceleration', 210 defaultMessage: 'Enable GPU Acceleration',
199 }, 211 },
200 beta: { 212 beta: {
201 id: 'settings.app.form.beta', 213 id: 'settings.app.form.beta',
202 defaultMessage: '!!!Include beta versions', 214 defaultMessage: 'Include beta versions',
203 }, 215 },
204 automaticUpdates: { 216 automaticUpdates: {
205 id: 'settings.app.form.automaticUpdates', 217 id: 'settings.app.form.automaticUpdates',
206 defaultMessage: '!!!Enable updates', 218 defaultMessage: 'Enable updates',
207 }, 219 },
208 enableTodos: { 220 enableTodos: {
209 id: 'settings.app.form.enableTodos', 221 id: 'settings.app.form.enableTodos',
210 defaultMessage: '!!!Enable Franz Todos', 222 defaultMessage: 'Enable Ferdi Todos',
211 }, 223 },
212 keepAllWorkspacesLoaded: { 224 keepAllWorkspacesLoaded: {
213 id: 'settings.app.form.keepAllWorkspacesLoaded', 225 id: 'settings.app.form.keepAllWorkspacesLoaded',
214 defaultMessage: '!!!Keep all workspaces loaded', 226 defaultMessage: 'Keep all workspaces loaded',
215 }, 227 },
216}); 228});
217 229
218export default @inject('stores', 'actions') @observer class EditSettingsScreen extends Component { 230@inject('stores', 'actions')
219 static contextTypes = { 231@observer
220 intl: intlShape, 232class EditSettingsScreen extends Component {
221 };
222
223 constructor(props) { 233 constructor(props) {
224 super(props); 234 super(props);
225 235
@@ -283,12 +293,15 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e
283 darkMode: Boolean(settingsData.darkMode), 293 darkMode: Boolean(settingsData.darkMode),
284 adaptableDarkMode: Boolean(settingsData.adaptableDarkMode), 294 adaptableDarkMode: Boolean(settingsData.adaptableDarkMode),
285 universalDarkMode: Boolean(settingsData.universalDarkMode), 295 universalDarkMode: Boolean(settingsData.universalDarkMode),
296 splitMode: Boolean(settingsData.splitMode),
286 serviceRibbonWidth: Number(settingsData.serviceRibbonWidth), 297 serviceRibbonWidth: Number(settingsData.serviceRibbonWidth),
287 iconSize: Number(settingsData.iconSize), 298 iconSize: Number(settingsData.iconSize),
288 useVerticalStyle: Boolean(settingsData.useVerticalStyle), 299 useVerticalStyle: Boolean(settingsData.useVerticalStyle),
289 alwaysShowWorkspaces: Boolean(settingsData.alwaysShowWorkspaces), 300 alwaysShowWorkspaces: Boolean(settingsData.alwaysShowWorkspaces),
290 accentColor: settingsData.accentColor, 301 accentColor: settingsData.accentColor,
291 showMessageBadgeWhenMuted: Boolean(settingsData.showMessageBadgeWhenMuted), 302 showMessageBadgeWhenMuted: Boolean(
303 settingsData.showMessageBadgeWhenMuted,
304 ),
292 showDragArea: Boolean(settingsData.showDragArea), 305 showDragArea: Boolean(settingsData.showDragArea),
293 enableSpellchecking: Boolean(settingsData.enableSpellchecking), 306 enableSpellchecking: Boolean(settingsData.enableSpellchecking),
294 spellcheckerLanguage: settingsData.spellcheckerLanguage, 307 spellcheckerLanguage: settingsData.spellcheckerLanguage,
@@ -309,24 +322,27 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e
309 322
310 if (workspaces.isFeatureActive) { 323 if (workspaces.isFeatureActive) {
311 const { keepAllWorkspacesLoaded } = workspaces.settings; 324 const { keepAllWorkspacesLoaded } = workspaces.settings;
312 if (Boolean(keepAllWorkspacesLoaded) !== Boolean(settingsData.keepAllWorkspacesLoaded)) { 325 if (
326 Boolean(keepAllWorkspacesLoaded) !==
327 Boolean(settingsData.keepAllWorkspacesLoaded)
328 ) {
313 workspaceActions.toggleKeepAllWorkspacesLoadedSetting(); 329 workspaceActions.toggleKeepAllWorkspacesLoadedSetting();
314 } 330 }
315 } 331 }
316 332
317 if (todos.isFeatureActive) { 333 if (todos.isFeatureActive) {
318 const { isFeatureEnabledByUser } = todos.settings; 334 const { isFeatureEnabledByUser } = todos.settings;
319 if (Boolean(isFeatureEnabledByUser) !== Boolean(settingsData.enableTodos)) { 335 if (
336 Boolean(isFeatureEnabledByUser) !== Boolean(settingsData.enableTodos)
337 ) {
320 todosActions.toggleTodosFeatureVisibility(); 338 todosActions.toggleTodosFeatureVisibility();
321 } 339 }
322 } 340 }
323 } 341 }
324 342
325 prepareForm() { 343 prepareForm() {
326 const { 344 const { app, settings, user, todos, workspaces } = this.props.stores;
327 app, settings, user, todos, workspaces, 345 const { intl } = this.props;
328 } = this.props.stores;
329 const { intl } = this.context;
330 const { lockedPassword } = this.state; 346 const { lockedPassword } = this.state;
331 347
332 const locales = getSelectOptions({ 348 const locales = getSelectOptions({
@@ -370,7 +386,9 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e
370 386
371 const spellcheckingLanguages = getSelectOptions({ 387 const spellcheckingLanguages = getSelectOptions({
372 locales: SPELLCHECKER_LOCALES, 388 locales: SPELLCHECKER_LOCALES,
373 automaticDetectionText: this.context.intl.formatMessage(globalMessages.spellcheckerAutomaticDetection), 389 automaticDetectionText: intl.formatMessage(
390 globalMessages.spellcheckerAutomaticDetection,
391 ),
374 }); 392 });
375 393
376 const config = { 394 const config = {
@@ -401,7 +419,9 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e
401 default: DEFAULT_APP_SETTINGS.confirmOnQuit, 419 default: DEFAULT_APP_SETTINGS.confirmOnQuit,
402 }, 420 },
403 enableSystemTray: { 421 enableSystemTray: {
404 label: intl.formatMessage(isMac ? messages.enableMenuBar : messages.enableSystemTray), 422 label: intl.formatMessage(
423 isMac ? messages.enableMenuBar : messages.enableSystemTray,
424 ),
405 value: settings.all.app.enableSystemTray, 425 value: settings.all.app.enableSystemTray,
406 default: DEFAULT_APP_SETTINGS.enableSystemTray, 426 default: DEFAULT_APP_SETTINGS.enableSystemTray,
407 }, 427 },
@@ -566,6 +586,11 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e
566 value: settings.all.app.universalDarkMode, 586 value: settings.all.app.universalDarkMode,
567 default: DEFAULT_APP_SETTINGS.universalDarkMode, 587 default: DEFAULT_APP_SETTINGS.universalDarkMode,
568 }, 588 },
589 splitMode: {
590 label: intl.formatMessage(messages.splitMode),
591 value: settings.all.app.splitMode,
592 default: DEFAULT_APP_SETTINGS.splitMode,
593 },
569 serviceRibbonWidth: { 594 serviceRibbonWidth: {
570 label: intl.formatMessage(messages.serviceRibbonWidth), 595 label: intl.formatMessage(messages.serviceRibbonWidth),
571 value: settings.all.app.serviceRibbonWidth, 596 value: settings.all.app.serviceRibbonWidth,
@@ -637,23 +662,15 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e
637 } 662 }
638 663
639 render() { 664 render() {
640 const { 665 const { app, todos, workspaces, services } = this.props.stores;
641 app,
642 todos,
643 workspaces,
644 services,
645 } = this.props.stores;
646 const { 666 const {
647 updateStatus, 667 updateStatus,
648 updateStatusTypes, 668 updateStatusTypes,
649 isClearingAllCache, 669 isClearingAllCache,
650 lockingFeatureEnabled, 670 lockingFeatureEnabled,
651 } = app; 671 } = app;
652 const { 672 const { checkForUpdates, installUpdate, clearAllCache } =
653 checkForUpdates, 673 this.props.actions.app;
654 installUpdate,
655 clearAllCache,
656 } = this.props.actions.app;
657 const form = this.prepareForm(); 674 const form = this.prepareForm();
658 675
659 return ( 676 return (
@@ -666,7 +683,7 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e
666 isUpdateAvailable={updateStatus === updateStatusTypes.AVAILABLE} 683 isUpdateAvailable={updateStatus === updateStatusTypes.AVAILABLE}
667 noUpdateAvailable={updateStatus === updateStatusTypes.NOT_AVAILABLE} 684 noUpdateAvailable={updateStatus === updateStatusTypes.NOT_AVAILABLE}
668 updateIsReadyToInstall={updateStatus === updateStatusTypes.DOWNLOADED} 685 updateIsReadyToInstall={updateStatus === updateStatusTypes.DOWNLOADED}
669 onSubmit={(d) => this.onSubmit(d)} 686 onSubmit={d => this.onSubmit(d)}
670 getCacheSize={() => app.cacheSize} 687 getCacheSize={() => app.cacheSize}
671 isClearingAllCache={isClearingAllCache} 688 isClearingAllCache={isClearingAllCache}
672 onClearAllCache={clearAllCache} 689 onClearAllCache={clearAllCache}
@@ -675,9 +692,13 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e
675 lockingFeatureEnabled={lockingFeatureEnabled} 692 lockingFeatureEnabled={lockingFeatureEnabled}
676 automaticUpdates={this.props.stores.settings.app.automaticUpdates} 693 automaticUpdates={this.props.stores.settings.app.automaticUpdates}
677 isDarkmodeEnabled={this.props.stores.settings.app.darkMode} 694 isDarkmodeEnabled={this.props.stores.settings.app.darkMode}
678 isAdaptableDarkModeEnabled={this.props.stores.settings.app.adaptableDarkMode} 695 isAdaptableDarkModeEnabled={
696 this.props.stores.settings.app.adaptableDarkMode
697 }
679 isTodosActivated={this.props.stores.todos.isFeatureEnabledByUser} 698 isTodosActivated={this.props.stores.todos.isFeatureEnabledByUser}
680 isUsingCustomTodoService={this.props.stores.todos.isUsingCustomTodoService} 699 isUsingCustomTodoService={
700 this.props.stores.todos.isUsingCustomTodoService
701 }
681 isNightlyEnabled={this.props.stores.settings.app.nightly} 702 isNightlyEnabled={this.props.stores.settings.app.nightly}
682 hasAddedTodosAsService={services.isTodosServiceAdded} 703 hasAddedTodosAsService={services.isTodosServiceAdded}
683 isOnline={app.isOnline} 704 isOnline={app.isOnline}
@@ -704,3 +725,5 @@ EditSettingsScreen.wrappedComponent.propTypes = {
704 workspaces: PropTypes.instanceOf(WorkspacesStore).isRequired, 725 workspaces: PropTypes.instanceOf(WorkspacesStore).isRequired,
705 }).isRequired, 726 }).isRequired,
706}; 727};
728
729export default injectIntl(EditSettingsScreen);