diff options
author | André Oliveira <37463445+SpecialAro@users.noreply.github.com> | 2022-05-05 01:23:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-05 00:23:19 +0000 |
commit | 1fd97a01b2b55ae9ae17f47fe0c86b99afd3771e (patch) | |
tree | 4fd4a5243e5a48a4f2a135f135b2397a8e16f4dd /src/containers | |
parent | Fixing test dir name (diff) | |
download | ferdium-app-1fd97a01b2b55ae9ae17f47fe0c86b99afd3771e.tar.gz ferdium-app-1fd97a01b2b55ae9ae17f47fe0c86b99afd3771e.tar.zst ferdium-app-1fd97a01b2b55ae9ae17f47fe0c86b99afd3771e.zip |
Feature: makes Services location in sidebar changeable (#95)
Diffstat (limited to 'src/containers')
-rw-r--r-- | src/containers/settings/EditSettingsScreen.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/containers/settings/EditSettingsScreen.js b/src/containers/settings/EditSettingsScreen.js index 6f906684e..4c5e6d921 100644 --- a/src/containers/settings/EditSettingsScreen.js +++ b/src/containers/settings/EditSettingsScreen.js | |||
@@ -14,6 +14,7 @@ import { | |||
14 | DEFAULT_APP_SETTINGS, | 14 | DEFAULT_APP_SETTINGS, |
15 | HIBERNATION_STRATEGIES, | 15 | HIBERNATION_STRATEGIES, |
16 | SIDEBAR_WIDTH, | 16 | SIDEBAR_WIDTH, |
17 | SIDEBAR_SERVICES_LOCATION, | ||
17 | ICON_SIZES, | 18 | ICON_SIZES, |
18 | NAVIGATION_BAR_BEHAVIOURS, | 19 | NAVIGATION_BAR_BEHAVIOURS, |
19 | SEARCH_ENGINE_NAMES, | 20 | SEARCH_ENGINE_NAMES, |
@@ -189,6 +190,10 @@ const messages = defineMessages({ | |||
189 | id: 'settings.app.form.serviceRibbonWidth', | 190 | id: 'settings.app.form.serviceRibbonWidth', |
190 | defaultMessage: 'Sidebar width', | 191 | defaultMessage: 'Sidebar width', |
191 | }, | 192 | }, |
193 | sidebarServicesLocation: { | ||
194 | id: 'settings.app.form.sidebarServicesLocation', | ||
195 | defaultMessage: 'Sidebar Services Icons Location', | ||
196 | }, | ||
192 | iconSize: { | 197 | iconSize: { |
193 | id: 'settings.app.form.iconSize', | 198 | id: 'settings.app.form.iconSize', |
194 | defaultMessage: 'Service icon size', | 199 | defaultMessage: 'Service icon size', |
@@ -344,6 +349,7 @@ class EditSettingsScreen extends Component { | |||
344 | splitMode: Boolean(settingsData.splitMode), | 349 | splitMode: Boolean(settingsData.splitMode), |
345 | splitColumns: Number(settingsData.splitColumns), | 350 | splitColumns: Number(settingsData.splitColumns), |
346 | serviceRibbonWidth: Number(settingsData.serviceRibbonWidth), | 351 | serviceRibbonWidth: Number(settingsData.serviceRibbonWidth), |
352 | sidebarServicesLocation: Number(settingsData.sidebarServicesLocation), | ||
347 | iconSize: Number(settingsData.iconSize), | 353 | iconSize: Number(settingsData.iconSize), |
348 | enableLongPressServiceHint: Boolean( | 354 | enableLongPressServiceHint: Boolean( |
349 | settingsData.enableLongPressServiceHint, | 355 | settingsData.enableLongPressServiceHint, |
@@ -442,6 +448,11 @@ class EditSettingsScreen extends Component { | |||
442 | sort: false, | 448 | sort: false, |
443 | }); | 449 | }); |
444 | 450 | ||
451 | const sidebarServicesLocation = getSelectOptions({ | ||
452 | locales: SIDEBAR_SERVICES_LOCATION, | ||
453 | sort: false, | ||
454 | }); | ||
455 | |||
445 | const iconSizes = getSelectOptions({ | 456 | const iconSizes = getSelectOptions({ |
446 | locales: ICON_SIZES, | 457 | locales: ICON_SIZES, |
447 | sort: false, | 458 | sort: false, |
@@ -683,6 +694,12 @@ class EditSettingsScreen extends Component { | |||
683 | default: DEFAULT_APP_SETTINGS.serviceRibbonWidth, | 694 | default: DEFAULT_APP_SETTINGS.serviceRibbonWidth, |
684 | options: sidebarWidth, | 695 | options: sidebarWidth, |
685 | }, | 696 | }, |
697 | sidebarServicesLocation: { | ||
698 | label: intl.formatMessage(messages.sidebarServicesLocation), | ||
699 | value: settings.all.app.sidebarServicesLocation, | ||
700 | default: DEFAULT_APP_SETTINGS.sidebarServicesLocation, | ||
701 | options: sidebarServicesLocation, | ||
702 | }, | ||
686 | iconSize: { | 703 | iconSize: { |
687 | label: intl.formatMessage(messages.iconSize), | 704 | label: intl.formatMessage(messages.iconSize), |
688 | value: settings.all.app.iconSize, | 705 | value: settings.all.app.iconSize, |