diff options
author | 2020-02-24 17:49:34 +0100 | |
---|---|---|
committer | 2020-02-24 17:49:34 +0100 | |
commit | e8a64e25a08b050b8097da63334d8e4c9d349bd7 (patch) | |
tree | 8c152f7785ebe9f351455f870ba9d66d2273a705 /src/containers | |
parent | Fix warning about missing actions in PublishDebugLogModal (diff) | |
download | ferdium-app-e8a64e25a08b050b8097da63334d8e4c9d349bd7.tar.gz ferdium-app-e8a64e25a08b050b8097da63334d8e4c9d349bd7.tar.zst ferdium-app-e8a64e25a08b050b8097da63334d8e4c9d349bd7.zip |
Add ability to change sidebar width
Diffstat (limited to 'src/containers')
-rw-r--r-- | src/containers/settings/EditSettingsScreen.js | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/containers/settings/EditSettingsScreen.js b/src/containers/settings/EditSettingsScreen.js index 8eb7c3b82..dac4c2b0a 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, SIDEBAR_WIDTH } 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'; |
@@ -118,6 +118,10 @@ const messages = defineMessages({ | |||
118 | id: 'settings.app.form.universalDarkMode', | 118 | id: 'settings.app.form.universalDarkMode', |
119 | defaultMessage: '!!!Enable universal Dark Mode', | 119 | defaultMessage: '!!!Enable universal Dark Mode', |
120 | }, | 120 | }, |
121 | serviceRibbonWidth: { | ||
122 | id: 'settings.app.form.serviceRibbonWidth', | ||
123 | defaultMessage: '!!!Sidebar width', | ||
124 | }, | ||
121 | accentColor: { | 125 | accentColor: { |
122 | id: 'settings.app.form.accentColor', | 126 | id: 'settings.app.form.accentColor', |
123 | defaultMessage: '!!!Accent color', | 127 | defaultMessage: '!!!Accent color', |
@@ -201,6 +205,7 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e | |||
201 | darkMode: settingsData.darkMode, | 205 | darkMode: settingsData.darkMode, |
202 | adaptableDarkMode: settingsData.adaptableDarkMode, | 206 | adaptableDarkMode: settingsData.adaptableDarkMode, |
203 | universalDarkMode: settingsData.universalDarkMode, | 207 | universalDarkMode: settingsData.universalDarkMode, |
208 | serviceRibbonWidth: settingsData.serviceRibbonWidth, | ||
204 | accentColor: settingsData.accentColor, | 209 | accentColor: settingsData.accentColor, |
205 | showMessageBadgeWhenMuted: settingsData.showMessageBadgeWhenMuted, | 210 | showMessageBadgeWhenMuted: settingsData.showMessageBadgeWhenMuted, |
206 | enableSpellchecking: settingsData.enableSpellchecking, | 211 | enableSpellchecking: settingsData.enableSpellchecking, |
@@ -253,6 +258,11 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e | |||
253 | sort: false, | 258 | sort: false, |
254 | }); | 259 | }); |
255 | 260 | ||
261 | const sidebarWidth = getSelectOptions({ | ||
262 | locales: SIDEBAR_WIDTH, | ||
263 | sort: false, | ||
264 | }); | ||
265 | |||
256 | const spellcheckingLanguages = getSelectOptions({ | 266 | const spellcheckingLanguages = getSelectOptions({ |
257 | locales: SPELLCHECKER_LOCALES, | 267 | locales: SPELLCHECKER_LOCALES, |
258 | automaticDetectionText: this.context.intl.formatMessage(globalMessages.spellcheckerAutomaticDetection), | 268 | automaticDetectionText: this.context.intl.formatMessage(globalMessages.spellcheckerAutomaticDetection), |
@@ -396,6 +406,12 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e | |||
396 | value: settings.all.app.universalDarkMode, | 406 | value: settings.all.app.universalDarkMode, |
397 | default: DEFAULT_APP_SETTINGS.universalDarkMode, | 407 | default: DEFAULT_APP_SETTINGS.universalDarkMode, |
398 | }, | 408 | }, |
409 | serviceRibbonWidth: { | ||
410 | label: intl.formatMessage(messages.serviceRibbonWidth), | ||
411 | value: settings.all.app.serviceRibbonWidth, | ||
412 | default: DEFAULT_APP_SETTINGS.serviceRibbonWidth, | ||
413 | options: sidebarWidth, | ||
414 | }, | ||
399 | accentColor: { | 415 | accentColor: { |
400 | label: intl.formatMessage(messages.accentColor), | 416 | label: intl.formatMessage(messages.accentColor), |
401 | value: settings.all.app.accentColor, | 417 | value: settings.all.app.accentColor, |