diff options
author | 2020-02-26 17:32:05 +0100 | |
---|---|---|
committer | 2020-02-26 17:32:05 +0100 | |
commit | 644878643de84e0566294b57ca40fc70d11437c4 (patch) | |
tree | 284746227df93d54595c833431e625daf8e3c7ea /src/containers/settings | |
parent | Implement user.css and user.js (#401) (diff) | |
parent | Fix merge errors (diff) | |
download | ferdium-app-644878643de84e0566294b57ca40fc70d11437c4.tar.gz ferdium-app-644878643de84e0566294b57ca40fc70d11437c4.tar.zst ferdium-app-644878643de84e0566294b57ca40fc70d11437c4.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 ee5e3615c..6dd21f961 100644 --- a/src/containers/settings/EditSettingsScreen.js +++ b/src/containers/settings/EditSettingsScreen.js | |||
@@ -11,7 +11,7 @@ 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 { | 13 | import { |
14 | DEFAULT_APP_SETTINGS, HIBERNATION_STRATEGIES, SIDEBAR_WIDTH, ICON_SIZES, | 14 | DEFAULT_APP_SETTINGS, HIBERNATION_STRATEGIES, SIDEBAR_WIDTH, ICON_SIZES, NAVIGATION_BAR_BEHAVIOURS, |
15 | } from '../../config'; | 15 | } from '../../config'; |
16 | import { config as spellcheckerConfig } from '../../features/spellchecker'; | 16 | import { config as spellcheckerConfig } from '../../features/spellchecker'; |
17 | 17 | ||
@@ -56,9 +56,9 @@ const messages = defineMessages({ | |||
56 | id: 'settings.app.form.privateNotifications', | 56 | id: 'settings.app.form.privateNotifications', |
57 | defaultMessage: '!!!Don\'t show message content in notifications', | 57 | defaultMessage: '!!!Don\'t show message content in notifications', |
58 | }, | 58 | }, |
59 | showServiceNavigationBar: { | 59 | navigationBarBehaviour: { |
60 | id: 'settings.app.form.showServiceNavigationBar', | 60 | id: 'settings.app.form.navigationBarBehaviour', |
61 | defaultMessage: '!!!Always show service navigation bar', | 61 | defaultMessage: '!!!Navigation bar behaviour', |
62 | }, | 62 | }, |
63 | sentry: { | 63 | sentry: { |
64 | id: 'settings.app.form.sentry', | 64 | id: 'settings.app.form.sentry', |
@@ -194,7 +194,7 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e | |||
194 | startMinimized: settingsData.startMinimized, | 194 | startMinimized: settingsData.startMinimized, |
195 | minimizeToSystemTray: settingsData.minimizeToSystemTray, | 195 | minimizeToSystemTray: settingsData.minimizeToSystemTray, |
196 | privateNotifications: settingsData.privateNotifications, | 196 | privateNotifications: settingsData.privateNotifications, |
197 | showServiceNavigationBar: settingsData.showServiceNavigationBar, | 197 | navigationBarBehaviour: settingsData.navigationBarBehaviour, |
198 | sentry: settingsData.sentry, | 198 | sentry: settingsData.sentry, |
199 | hibernate: settingsData.hibernate, | 199 | hibernate: settingsData.hibernate, |
200 | hibernationStrategy: settingsData.hibernationStrategy, | 200 | hibernationStrategy: settingsData.hibernationStrategy, |
@@ -260,6 +260,11 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e | |||
260 | locales: APP_LOCALES, | 260 | locales: APP_LOCALES, |
261 | }); | 261 | }); |
262 | 262 | ||
263 | const navigationBarBehaviours = getSelectOptions({ | ||
264 | locales: NAVIGATION_BAR_BEHAVIOURS, | ||
265 | sort: false, | ||
266 | }); | ||
267 | |||
263 | const hibernationStrategies = getSelectOptions({ | 268 | const hibernationStrategies = getSelectOptions({ |
264 | locales: HIBERNATION_STRATEGIES, | 269 | locales: HIBERNATION_STRATEGIES, |
265 | sort: false, | 270 | sort: false, |
@@ -317,10 +322,11 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e | |||
317 | value: settings.all.app.privateNotifications, | 322 | value: settings.all.app.privateNotifications, |
318 | default: DEFAULT_APP_SETTINGS.privateNotifications, | 323 | default: DEFAULT_APP_SETTINGS.privateNotifications, |
319 | }, | 324 | }, |
320 | showServiceNavigationBar: { | 325 | navigationBarBehaviour: { |
321 | label: intl.formatMessage(messages.showServiceNavigationBar), | 326 | label: intl.formatMessage(messages.navigationBarBehaviour), |
322 | value: settings.all.app.showServiceNavigationBar, | 327 | value: settings.all.app.navigationBarBehaviour, |
323 | default: DEFAULT_APP_SETTINGS.showServiceNavigationBar, | 328 | default: DEFAULT_APP_SETTINGS.navigationBarBehaviour, |
329 | options: navigationBarBehaviours, | ||
324 | }, | 330 | }, |
325 | sentry: { | 331 | sentry: { |
326 | label: intl.formatMessage(messages.sentry), | 332 | label: intl.formatMessage(messages.sentry), |