diff options
author | 2020-02-26 09:54:35 +0100 | |
---|---|---|
committer | 2020-02-26 09:54:35 +0100 | |
commit | 97d9f482956845cf139c6ce4cbd8480cb1a8bc83 (patch) | |
tree | 50b6658adc6cf768377a2b855bfb1af6f0f43568 /src/containers/settings/EditSettingsScreen.js | |
parent | Add migration from old setting (diff) | |
parent | Avoid AppVeyor builds on i18n-only commits (diff) | |
download | ferdium-app-97d9f482956845cf139c6ce4cbd8480cb1a8bc83.tar.gz ferdium-app-97d9f482956845cf139c6ce4cbd8480cb1a8bc83.tar.zst ferdium-app-97d9f482956845cf139c6ce4cbd8480cb1a8bc83.zip |
Merge branch 'develop' into feat/#270
Diffstat (limited to 'src/containers/settings/EditSettingsScreen.js')
-rw-r--r-- | src/containers/settings/EditSettingsScreen.js | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/src/containers/settings/EditSettingsScreen.js b/src/containers/settings/EditSettingsScreen.js index 07fad5430..6dd21f961 100644 --- a/src/containers/settings/EditSettingsScreen.js +++ b/src/containers/settings/EditSettingsScreen.js | |||
@@ -10,7 +10,9 @@ 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, NAVIGATION_BAR_BEHAVIOURS } from '../../config'; | 13 | import { |
14 | DEFAULT_APP_SETTINGS, HIBERNATION_STRATEGIES, SIDEBAR_WIDTH, ICON_SIZES, NAVIGATION_BAR_BEHAVIOURS, | ||
15 | } from '../../config'; | ||
14 | import { config as spellcheckerConfig } from '../../features/spellchecker'; | 16 | import { config as spellcheckerConfig } from '../../features/spellchecker'; |
15 | 17 | ||
16 | import { getSelectOptions } from '../../helpers/i18n-helpers'; | 18 | import { getSelectOptions } from '../../helpers/i18n-helpers'; |
@@ -118,6 +120,14 @@ const messages = defineMessages({ | |||
118 | id: 'settings.app.form.universalDarkMode', | 120 | id: 'settings.app.form.universalDarkMode', |
119 | defaultMessage: '!!!Enable universal Dark Mode', | 121 | defaultMessage: '!!!Enable universal Dark Mode', |
120 | }, | 122 | }, |
123 | serviceRibbonWidth: { | ||
124 | id: 'settings.app.form.serviceRibbonWidth', | ||
125 | defaultMessage: '!!!Sidebar width', | ||
126 | }, | ||
127 | iconSize: { | ||
128 | id: 'settings.app.form.iconSize', | ||
129 | defaultMessage: '!!!Service icon size', | ||
130 | }, | ||
121 | accentColor: { | 131 | accentColor: { |
122 | id: 'settings.app.form.accentColor', | 132 | id: 'settings.app.form.accentColor', |
123 | defaultMessage: '!!!Accent color', | 133 | defaultMessage: '!!!Accent color', |
@@ -201,6 +211,8 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e | |||
201 | darkMode: settingsData.darkMode, | 211 | darkMode: settingsData.darkMode, |
202 | adaptableDarkMode: settingsData.adaptableDarkMode, | 212 | adaptableDarkMode: settingsData.adaptableDarkMode, |
203 | universalDarkMode: settingsData.universalDarkMode, | 213 | universalDarkMode: settingsData.universalDarkMode, |
214 | serviceRibbonWidth: settingsData.serviceRibbonWidth, | ||
215 | iconSize: settingsData.iconSize, | ||
204 | accentColor: settingsData.accentColor, | 216 | accentColor: settingsData.accentColor, |
205 | showMessageBadgeWhenMuted: settingsData.showMessageBadgeWhenMuted, | 217 | showMessageBadgeWhenMuted: settingsData.showMessageBadgeWhenMuted, |
206 | enableSpellchecking: settingsData.enableSpellchecking, | 218 | enableSpellchecking: settingsData.enableSpellchecking, |
@@ -258,6 +270,16 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e | |||
258 | sort: false, | 270 | sort: false, |
259 | }); | 271 | }); |
260 | 272 | ||
273 | const sidebarWidth = getSelectOptions({ | ||
274 | locales: SIDEBAR_WIDTH, | ||
275 | sort: false, | ||
276 | }); | ||
277 | |||
278 | const iconSizes = getSelectOptions({ | ||
279 | locales: ICON_SIZES, | ||
280 | sort: false, | ||
281 | }); | ||
282 | |||
261 | const spellcheckingLanguages = getSelectOptions({ | 283 | const spellcheckingLanguages = getSelectOptions({ |
262 | locales: SPELLCHECKER_LOCALES, | 284 | locales: SPELLCHECKER_LOCALES, |
263 | automaticDetectionText: this.context.intl.formatMessage(globalMessages.spellcheckerAutomaticDetection), | 285 | automaticDetectionText: this.context.intl.formatMessage(globalMessages.spellcheckerAutomaticDetection), |
@@ -402,6 +424,18 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e | |||
402 | value: settings.all.app.universalDarkMode, | 424 | value: settings.all.app.universalDarkMode, |
403 | default: DEFAULT_APP_SETTINGS.universalDarkMode, | 425 | default: DEFAULT_APP_SETTINGS.universalDarkMode, |
404 | }, | 426 | }, |
427 | serviceRibbonWidth: { | ||
428 | label: intl.formatMessage(messages.serviceRibbonWidth), | ||
429 | value: settings.all.app.serviceRibbonWidth, | ||
430 | default: DEFAULT_APP_SETTINGS.serviceRibbonWidth, | ||
431 | options: sidebarWidth, | ||
432 | }, | ||
433 | iconSize: { | ||
434 | label: intl.formatMessage(messages.iconSize), | ||
435 | value: settings.all.app.iconSize, | ||
436 | default: DEFAULT_APP_SETTINGS.iconSize, | ||
437 | options: iconSizes, | ||
438 | }, | ||
405 | accentColor: { | 439 | accentColor: { |
406 | label: intl.formatMessage(messages.accentColor), | 440 | label: intl.formatMessage(messages.accentColor), |
407 | value: settings.all.app.accentColor, | 441 | value: settings.all.app.accentColor, |