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.js67
1 files changed, 62 insertions, 5 deletions
diff --git a/src/containers/settings/EditSettingsScreen.js b/src/containers/settings/EditSettingsScreen.js
index 9aba212be..4d85d4f12 100644
--- a/src/containers/settings/EditSettingsScreen.js
+++ b/src/containers/settings/EditSettingsScreen.js
@@ -9,7 +9,7 @@ import UserStore from '../../stores/UserStore';
9import TodosStore from '../../features/todos/store'; 9import 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 { DEFAULT_APP_SETTINGS } from '../../config'; 12import { DEFAULT_APP_SETTINGS, DEFAULT_LOCK_PASSWORD } from '../../config';
13import { config as spellcheckerConfig } from '../../features/spellchecker'; 13import { config as spellcheckerConfig } from '../../features/spellchecker';
14 14
15import { getSelectOptions } from '../../helpers/i18n-helpers'; 15import { getSelectOptions } from '../../helpers/i18n-helpers';
@@ -17,6 +17,8 @@ import { getSelectOptions } from '../../helpers/i18n-helpers';
17import EditSettingsForm from '../../components/settings/settings/EditSettingsForm'; 17import EditSettingsForm from '../../components/settings/settings/EditSettingsForm';
18import ErrorBoundary from '../../components/util/ErrorBoundary'; 18import ErrorBoundary from '../../components/util/ErrorBoundary';
19 19
20import { API, TODOS_FRONTEND } from '../../environment';
21
20import globalMessages from '../../i18n/globalMessages'; 22import globalMessages from '../../i18n/globalMessages';
21import { DEFAULT_IS_FEATURE_ENABLED_BY_USER } from '../../features/todos'; 23import { DEFAULT_IS_FEATURE_ENABLED_BY_USER } from '../../features/todos';
22import WorkspacesStore from '../../features/workspaces/store'; 24import WorkspacesStore from '../../features/workspaces/store';
@@ -25,7 +27,7 @@ import { DEFAULT_SETTING_KEEP_ALL_WORKSPACES_LOADED } from '../../features/works
25const messages = defineMessages({ 27const messages = defineMessages({
26 autoLaunchOnStart: { 28 autoLaunchOnStart: {
27 id: 'settings.app.form.autoLaunchOnStart', 29 id: 'settings.app.form.autoLaunchOnStart',
28 defaultMessage: '!!!Launch Franz on start', 30 defaultMessage: '!!!Launch Ferdi on start',
29 }, 31 },
30 autoLaunchInBackground: { 32 autoLaunchInBackground: {
31 id: 'settings.app.form.autoLaunchInBackground', 33 id: 'settings.app.form.autoLaunchInBackground',
@@ -33,15 +35,35 @@ const messages = defineMessages({
33 }, 35 },
34 runInBackground: { 36 runInBackground: {
35 id: 'settings.app.form.runInBackground', 37 id: 'settings.app.form.runInBackground',
36 defaultMessage: '!!!Keep Franz in background when closing the window', 38 defaultMessage: '!!!Keep Ferdi in background when closing the window',
37 }, 39 },
38 enableSystemTray: { 40 enableSystemTray: {
39 id: 'settings.app.form.enableSystemTray', 41 id: 'settings.app.form.enableSystemTray',
40 defaultMessage: '!!!Show Franz in system tray', 42 defaultMessage: '!!!Show Ferdi in system tray',
41 }, 43 },
42 minimizeToSystemTray: { 44 minimizeToSystemTray: {
43 id: 'settings.app.form.minimizeToSystemTray', 45 id: 'settings.app.form.minimizeToSystemTray',
44 defaultMessage: '!!!Minimize Franz to system tray', 46 defaultMessage: '!!!Minimize Ferdi to system tray',
47 },
48 privateNotifications: {
49 id: 'settings.app.form.privateNotifications',
50 defaultMessage: '!!!Don\'t show message content in notifications',
51 },
52 server: {
53 id: 'settings.app.form.server',
54 defaultMessage: '!!!Server',
55 },
56 todoServer: {
57 id: 'settings.app.form.todoServer',
58 defaultMessage: '!!!Todo Server',
59 },
60 enableLock: {
61 id: 'settings.app.form.enableLock',
62 defaultMessage: '!!!Enable Ferdi password lock',
63 },
64 lockPassword: {
65 id: 'settings.app.form.lockPassword',
66 defaultMessage: '!!!Ferdi Lock password',
45 }, 67 },
46 language: { 68 language: {
47 id: 'settings.app.form.language', 69 id: 'settings.app.form.language',
@@ -107,6 +129,11 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e
107 runInBackground: settingsData.runInBackground, 129 runInBackground: settingsData.runInBackground,
108 enableSystemTray: settingsData.enableSystemTray, 130 enableSystemTray: settingsData.enableSystemTray,
109 minimizeToSystemTray: settingsData.minimizeToSystemTray, 131 minimizeToSystemTray: settingsData.minimizeToSystemTray,
132 privateNotifications: settingsData.privateNotifications,
133 server: settingsData.server,
134 todoServer: settingsData.todoServer,
135 lockingFeatureEnabled: settingsData.lockingFeatureEnabled,
136 lockedPassword: settingsData.lockedPassword,
110 enableGPUAcceleration: settingsData.enableGPUAcceleration, 137 enableGPUAcceleration: settingsData.enableGPUAcceleration,
111 showDisabledServices: settingsData.showDisabledServices, 138 showDisabledServices: settingsData.showDisabledServices,
112 darkMode: settingsData.darkMode, 139 darkMode: settingsData.darkMode,
@@ -182,6 +209,32 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e
182 value: settings.all.app.minimizeToSystemTray, 209 value: settings.all.app.minimizeToSystemTray,
183 default: DEFAULT_APP_SETTINGS.minimizeToSystemTray, 210 default: DEFAULT_APP_SETTINGS.minimizeToSystemTray,
184 }, 211 },
212 privateNotifications: {
213 label: intl.formatMessage(messages.privateNotifications),
214 value: settings.all.app.privateNotifications,
215 default: DEFAULT_APP_SETTINGS.privateNotifications,
216 },
217 server: {
218 label: intl.formatMessage(messages.server),
219 value: settings.all.app.server || API,
220 default: API,
221 },
222 todoServer: {
223 label: intl.formatMessage(messages.todoServer),
224 value: settings.all.app.todoServer,
225 default: TODOS_FRONTEND,
226 },
227 lockingFeatureEnabled: {
228 label: intl.formatMessage(messages.enableLock),
229 value: settings.all.app.lockingFeatureEnabled || false,
230 default: false,
231 },
232 lockedPassword: {
233 label: intl.formatMessage(messages.lockPassword),
234 value: settings.all.app.lockedPassword,
235 default: DEFAULT_LOCK_PASSWORD,
236 type: 'password',
237 },
185 showDisabledServices: { 238 showDisabledServices: {
186 label: intl.formatMessage(messages.showDisabledServices), 239 label: intl.formatMessage(messages.showDisabledServices),
187 value: settings.all.app.showDisabledServices, 240 value: settings.all.app.showDisabledServices,
@@ -257,6 +310,8 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e
257 cacheSize, 310 cacheSize,
258 updateStatusTypes, 311 updateStatusTypes,
259 isClearingAllCache, 312 isClearingAllCache,
313 server,
314 lockingFeatureEnabled,
260 } = app; 315 } = app;
261 const { 316 const {
262 checkForUpdates, 317 checkForUpdates,
@@ -282,6 +337,8 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e
282 isSpellcheckerIncludedInCurrentPlan={spellcheckerConfig.isIncludedInCurrentPlan} 337 isSpellcheckerIncludedInCurrentPlan={spellcheckerConfig.isIncludedInCurrentPlan}
283 isTodosEnabled={todos.isFeatureActive} 338 isTodosEnabled={todos.isFeatureActive}
284 isWorkspaceEnabled={workspaces.isFeatureActive} 339 isWorkspaceEnabled={workspaces.isFeatureActive}
340 server={server || 'https://api.franzinfra.com'}
341 lockingFeatureEnabled={lockingFeatureEnabled}
285 /> 342 />
286 </ErrorBoundary> 343 </ErrorBoundary>
287 ); 344 );