diff options
author | 2019-09-17 12:14:48 +0200 | |
---|---|---|
committer | 2019-09-17 12:14:48 +0200 | |
commit | d14071f3503f768c9c0e040dee549be6a6b40e5f (patch) | |
tree | b6c945c8b4baf31344dbabd2ac555559285ebec6 /src/containers/settings/EditSettingsScreen.js | |
parent | Add "npm run prepare-code" command (diff) | |
download | ferdium-app-d14071f3503f768c9c0e040dee549be6a6b40e5f.tar.gz ferdium-app-d14071f3503f768c9c0e040dee549be6a6b40e5f.tar.zst ferdium-app-d14071f3503f768c9c0e040dee549be6a6b40e5f.zip |
Implement #41
Diffstat (limited to 'src/containers/settings/EditSettingsScreen.js')
-rw-r--r-- | src/containers/settings/EditSettingsScreen.js | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/src/containers/settings/EditSettingsScreen.js b/src/containers/settings/EditSettingsScreen.js index 778b70ad9..1b134622a 100644 --- a/src/containers/settings/EditSettingsScreen.js +++ b/src/containers/settings/EditSettingsScreen.js | |||
@@ -9,7 +9,7 @@ import UserStore from '../../stores/UserStore'; | |||
9 | import TodosStore from '../../features/todos/store'; | 9 | import TodosStore from '../../features/todos/store'; |
10 | import Form from '../../lib/Form'; | 10 | import Form from '../../lib/Form'; |
11 | import { APP_LOCALES, SPELLCHECKER_LOCALES } from '../../i18n/languages'; | 11 | import { APP_LOCALES, SPELLCHECKER_LOCALES } from '../../i18n/languages'; |
12 | import { DEFAULT_APP_SETTINGS } from '../../config'; | 12 | import { DEFAULT_APP_SETTINGS, DEFAULT_LOCK_PASSWORD } from '../../config'; |
13 | import { config as spellcheckerConfig } from '../../features/spellchecker'; | 13 | import { config as spellcheckerConfig } from '../../features/spellchecker'; |
14 | 14 | ||
15 | import { getSelectOptions } from '../../helpers/i18n-helpers'; | 15 | import { getSelectOptions } from '../../helpers/i18n-helpers'; |
@@ -57,6 +57,14 @@ const messages = defineMessages({ | |||
57 | id: 'settings.app.form.todoServer', | 57 | id: 'settings.app.form.todoServer', |
58 | defaultMessage: '!!!Todo Server', | 58 | defaultMessage: '!!!Todo Server', |
59 | }, | 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', | ||
67 | }, | ||
60 | language: { | 68 | language: { |
61 | id: 'settings.app.form.language', | 69 | id: 'settings.app.form.language', |
62 | defaultMessage: '!!!Language', | 70 | defaultMessage: '!!!Language', |
@@ -124,6 +132,8 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e | |||
124 | privateNotifications: settingsData.privateNotifications, | 132 | privateNotifications: settingsData.privateNotifications, |
125 | server: settingsData.server, | 133 | server: settingsData.server, |
126 | todoServer: settingsData.todoServer, | 134 | todoServer: settingsData.todoServer, |
135 | lockingFeatureEnabled: settingsData.lockingFeatureEnabled, | ||
136 | lockedPassword: settingsData.lockedPassword, | ||
127 | enableGPUAcceleration: settingsData.enableGPUAcceleration, | 137 | enableGPUAcceleration: settingsData.enableGPUAcceleration, |
128 | showDisabledServices: settingsData.showDisabledServices, | 138 | showDisabledServices: settingsData.showDisabledServices, |
129 | darkMode: settingsData.darkMode, | 139 | darkMode: settingsData.darkMode, |
@@ -214,6 +224,17 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e | |||
214 | value: settings.all.app.todoServer || TODOS_FRONTEND, | 224 | value: settings.all.app.todoServer || TODOS_FRONTEND, |
215 | default: TODOS_FRONTEND, | 225 | default: TODOS_FRONTEND, |
216 | }, | 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 || DEFAULT_LOCK_PASSWORD, | ||
235 | default: DEFAULT_LOCK_PASSWORD, | ||
236 | type: 'password', | ||
237 | }, | ||
217 | showDisabledServices: { | 238 | showDisabledServices: { |
218 | label: intl.formatMessage(messages.showDisabledServices), | 239 | label: intl.formatMessage(messages.showDisabledServices), |
219 | value: settings.all.app.showDisabledServices, | 240 | value: settings.all.app.showDisabledServices, |
@@ -290,6 +311,7 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e | |||
290 | updateStatusTypes, | 311 | updateStatusTypes, |
291 | isClearingAllCache, | 312 | isClearingAllCache, |
292 | server, | 313 | server, |
314 | lockingFeatureEnabled, | ||
293 | } = app; | 315 | } = app; |
294 | const { | 316 | const { |
295 | checkForUpdates, | 317 | checkForUpdates, |
@@ -316,6 +338,7 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e | |||
316 | isTodosEnabled={todos.isFeatureActive} | 338 | isTodosEnabled={todos.isFeatureActive} |
317 | isWorkspaceEnabled={workspaces.isFeatureActive} | 339 | isWorkspaceEnabled={workspaces.isFeatureActive} |
318 | server={server || 'https://api.franzinfra.com'} | 340 | server={server || 'https://api.franzinfra.com'} |
341 | lockingFeatureEnabled={lockingFeatureEnabled} | ||
319 | /> | 342 | /> |
320 | </ErrorBoundary> | 343 | </ErrorBoundary> |
321 | ); | 344 | ); |