diff options
author | 2020-02-23 21:55:58 +0100 | |
---|---|---|
committer | 2020-02-23 21:55:58 +0100 | |
commit | eb3acd97acc62d84d3d4548a9089e0101d5780e1 (patch) | |
tree | 12b6211548832a6aff428b4d4287811a5b403bfd /src/containers/settings | |
parent | Fix warning about missing actions in PublishDebugLogModal (diff) | |
download | ferdium-app-eb3acd97acc62d84d3d4548a9089e0101d5780e1.tar.gz ferdium-app-eb3acd97acc62d84d3d4548a9089e0101d5780e1.tar.zst ferdium-app-eb3acd97acc62d84d3d4548a9089e0101d5780e1.zip |
#270 Add more navigation bar behaviour settings
Diffstat (limited to 'src/containers/settings')
-rw-r--r-- | src/containers/settings/EditSettingsScreen.js | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/src/containers/settings/EditSettingsScreen.js b/src/containers/settings/EditSettingsScreen.js index 8eb7c3b82..07fad5430 100644 --- a/src/containers/settings/EditSettingsScreen.js +++ b/src/containers/settings/EditSettingsScreen.js | |||
@@ -10,7 +10,7 @@ import UserStore from '../../stores/UserStore'; | |||
10 | import TodosStore from '../../features/todos/store'; | 10 | import TodosStore from '../../features/todos/store'; |
11 | import Form from '../../lib/Form'; | 11 | import Form from '../../lib/Form'; |
12 | import { APP_LOCALES, SPELLCHECKER_LOCALES } from '../../i18n/languages'; | 12 | import { APP_LOCALES, SPELLCHECKER_LOCALES } from '../../i18n/languages'; |
13 | import { DEFAULT_APP_SETTINGS, HIBERNATION_STRATEGIES } from '../../config'; | 13 | import { DEFAULT_APP_SETTINGS, HIBERNATION_STRATEGIES, NAVIGATION_BAR_BEHAVIOURS } from '../../config'; |
14 | import { config as spellcheckerConfig } from '../../features/spellchecker'; | 14 | import { config as spellcheckerConfig } from '../../features/spellchecker'; |
15 | 15 | ||
16 | import { getSelectOptions } from '../../helpers/i18n-helpers'; | 16 | import { getSelectOptions } from '../../helpers/i18n-helpers'; |
@@ -54,9 +54,9 @@ const messages = defineMessages({ | |||
54 | id: 'settings.app.form.privateNotifications', | 54 | id: 'settings.app.form.privateNotifications', |
55 | defaultMessage: '!!!Don\'t show message content in notifications', | 55 | defaultMessage: '!!!Don\'t show message content in notifications', |
56 | }, | 56 | }, |
57 | showServiceNavigationBar: { | 57 | navigationBarBehaviour: { |
58 | id: 'settings.app.form.showServiceNavigationBar', | 58 | id: 'settings.app.form.navigationBarBehaviour', |
59 | defaultMessage: '!!!Always show service navigation bar', | 59 | defaultMessage: '!!!Navigation bar behaviour', |
60 | }, | 60 | }, |
61 | sentry: { | 61 | sentry: { |
62 | id: 'settings.app.form.sentry', | 62 | id: 'settings.app.form.sentry', |
@@ -184,7 +184,7 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e | |||
184 | startMinimized: settingsData.startMinimized, | 184 | startMinimized: settingsData.startMinimized, |
185 | minimizeToSystemTray: settingsData.minimizeToSystemTray, | 185 | minimizeToSystemTray: settingsData.minimizeToSystemTray, |
186 | privateNotifications: settingsData.privateNotifications, | 186 | privateNotifications: settingsData.privateNotifications, |
187 | showServiceNavigationBar: settingsData.showServiceNavigationBar, | 187 | navigationBarBehaviour: settingsData.navigationBarBehaviour, |
188 | sentry: settingsData.sentry, | 188 | sentry: settingsData.sentry, |
189 | hibernate: settingsData.hibernate, | 189 | hibernate: settingsData.hibernate, |
190 | hibernationStrategy: settingsData.hibernationStrategy, | 190 | hibernationStrategy: settingsData.hibernationStrategy, |
@@ -248,6 +248,11 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e | |||
248 | locales: APP_LOCALES, | 248 | locales: APP_LOCALES, |
249 | }); | 249 | }); |
250 | 250 | ||
251 | const navigationBarBehaviours = getSelectOptions({ | ||
252 | locales: NAVIGATION_BAR_BEHAVIOURS, | ||
253 | sort: false, | ||
254 | }); | ||
255 | |||
251 | const hibernationStrategies = getSelectOptions({ | 256 | const hibernationStrategies = getSelectOptions({ |
252 | locales: HIBERNATION_STRATEGIES, | 257 | locales: HIBERNATION_STRATEGIES, |
253 | sort: false, | 258 | sort: false, |
@@ -295,10 +300,11 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e | |||
295 | value: settings.all.app.privateNotifications, | 300 | value: settings.all.app.privateNotifications, |
296 | default: DEFAULT_APP_SETTINGS.privateNotifications, | 301 | default: DEFAULT_APP_SETTINGS.privateNotifications, |
297 | }, | 302 | }, |
298 | showServiceNavigationBar: { | 303 | navigationBarBehaviour: { |
299 | label: intl.formatMessage(messages.showServiceNavigationBar), | 304 | label: intl.formatMessage(messages.navigationBarBehaviour), |
300 | value: settings.all.app.showServiceNavigationBar, | 305 | value: settings.all.app.navigationBarBehaviour, |
301 | default: DEFAULT_APP_SETTINGS.showServiceNavigationBar, | 306 | default: DEFAULT_APP_SETTINGS.navigationBarBehaviour, |
307 | options: navigationBarBehaviours, | ||
302 | }, | 308 | }, |
303 | sentry: { | 309 | sentry: { |
304 | label: intl.formatMessage(messages.sentry), | 310 | label: intl.formatMessage(messages.sentry), |