From 1fd97a01b2b55ae9ae17f47fe0c86b99afd3771e Mon Sep 17 00:00:00 2001 From: André Oliveira <37463445+SpecialAro@users.noreply.github.com> Date: Thu, 5 May 2022 01:23:19 +0100 Subject: Feature: makes Services location in sidebar changeable (#95) --- src/containers/settings/EditSettingsScreen.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/containers/settings') 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 { DEFAULT_APP_SETTINGS, HIBERNATION_STRATEGIES, SIDEBAR_WIDTH, + SIDEBAR_SERVICES_LOCATION, ICON_SIZES, NAVIGATION_BAR_BEHAVIOURS, SEARCH_ENGINE_NAMES, @@ -189,6 +190,10 @@ const messages = defineMessages({ id: 'settings.app.form.serviceRibbonWidth', defaultMessage: 'Sidebar width', }, + sidebarServicesLocation: { + id: 'settings.app.form.sidebarServicesLocation', + defaultMessage: 'Sidebar Services Icons Location', + }, iconSize: { id: 'settings.app.form.iconSize', defaultMessage: 'Service icon size', @@ -344,6 +349,7 @@ class EditSettingsScreen extends Component { splitMode: Boolean(settingsData.splitMode), splitColumns: Number(settingsData.splitColumns), serviceRibbonWidth: Number(settingsData.serviceRibbonWidth), + sidebarServicesLocation: Number(settingsData.sidebarServicesLocation), iconSize: Number(settingsData.iconSize), enableLongPressServiceHint: Boolean( settingsData.enableLongPressServiceHint, @@ -442,6 +448,11 @@ class EditSettingsScreen extends Component { sort: false, }); + const sidebarServicesLocation = getSelectOptions({ + locales: SIDEBAR_SERVICES_LOCATION, + sort: false, + }); + const iconSizes = getSelectOptions({ locales: ICON_SIZES, sort: false, @@ -683,6 +694,12 @@ class EditSettingsScreen extends Component { default: DEFAULT_APP_SETTINGS.serviceRibbonWidth, options: sidebarWidth, }, + sidebarServicesLocation: { + label: intl.formatMessage(messages.sidebarServicesLocation), + value: settings.all.app.sidebarServicesLocation, + default: DEFAULT_APP_SETTINGS.sidebarServicesLocation, + options: sidebarServicesLocation, + }, iconSize: { label: intl.formatMessage(messages.iconSize), value: settings.all.app.iconSize, -- cgit v1.2.3-54-g00ecf