Make collapsed sidebar navigation configurable

This commit is contained in:
jeffvli 2023-09-22 17:55:03 -07:00
parent 8cbc25a932
commit 47dc83f360
3 changed files with 43 additions and 20 deletions

View file

@ -87,6 +87,15 @@ export const SidebarSettings = () => {
});
};
const handleSetSidebarCollapsedNavigation = (e: ChangeEvent<HTMLInputElement>) => {
setSettings({
general: {
...settings,
sidebarCollapsedNavigation: e.target.checked,
},
});
};
const isSaveButtonDisabled = isEqual(settings.sidebarItems, localSidebarItems);
return (
@ -101,6 +110,16 @@ export const SidebarSettings = () => {
description="Show playlist list in sidebar"
title="Sidebar playlist list"
/>
<SettingsOptions
control={
<Switch
checked={settings.sidebarCollapsedNavigation}
onChange={handleSetSidebarCollapsedNavigation}
/>
}
description="Show navigation buttons in the collapsed sidebar"
title="Sidebar (collapsed) navigation"
/>
<SettingsOptions
control={
<Button