diff --git a/frontend-modern/src/components/Settings/SettingsPageShell.tsx b/frontend-modern/src/components/Settings/SettingsPageShell.tsx index 6e063dd81..3b775abdd 100644 --- a/frontend-modern/src/components/Settings/SettingsPageShell.tsx +++ b/frontend-modern/src/components/Settings/SettingsPageShell.tsx @@ -1,4 +1,4 @@ -import { Accessor, Component, For, JSX, Setter, Show, createSignal } from 'solid-js'; +import { Accessor, Component, For, JSX, Setter, Show } from 'solid-js'; import ChevronRight from 'lucide-solid/icons/chevron-right'; import { Card } from '@/components/shared/Card'; import { PageHeader } from '@/components/shared/PageHeader'; @@ -32,29 +32,8 @@ interface SettingsPageShellProps { } export const SettingsPageShell: Component = (props) => { - const [focusedNavigationExpanded, setFocusedNavigationExpanded] = createSignal(false); const unsavedChangesBanner = () => getSettingsUnsavedChangesBanner(); const infrastructureWorkspaceActive = () => isInfrastructureSettingsTab(props.activeTab()); - const effectiveSidebarCollapsed = () => - infrastructureWorkspaceActive() && !props.isMobileMenuOpen() - ? !focusedNavigationExpanded() - : props.sidebarCollapsed(); - const collapseSidebar = () => { - if (infrastructureWorkspaceActive() && !props.isMobileMenuOpen()) { - setFocusedNavigationExpanded(false); - return; - } - - props.setSidebarCollapsed(true); - }; - const expandSidebar = () => { - if (infrastructureWorkspaceActive() && !props.isMobileMenuOpen()) { - setFocusedNavigationExpanded(true); - return; - } - - props.setSidebarCollapsed(false); - }; const isSidebarItemActive = (itemId: SettingsTab) => itemId === 'infrastructure-systems' ? isInfrastructureSettingsTab(props.activeTab()) @@ -114,21 +93,21 @@ export const SettingsPageShell: Component = (props) => {
- +

{SETTINGS_SHELL_COPY.navigationTitle}

- +
- +
= (props) => {
@@ -207,13 +186,13 @@ export const SettingsPageShell: Component = (props) => { type="button" aria-current={isActive() ? 'page' : undefined} disabled={item.disabled} - class={`group flex w-full items-center ${effectiveSidebarCollapsed() ? 'justify-center' : 'justify-between'} lg:rounded-md ${effectiveSidebarCollapsed() ? 'px-2 py-2.5' : 'px-4 py-3.5 lg:px-3 lg:py-2'} text-[15px] lg:text-sm font-medium transition-colors ${item.disabled ? 'opacity-60 cursor-not-allowed text-muted' : isActive() ? 'lg:bg-blue-50 text-blue-600 dark:lg:bg-blue-900 dark:text-blue-300 lg:dark:text-blue-200 bg-surface' : ' lg:hover:bg-surface-hover hover:text-base-content active:bg-surface-hover lg:active:bg-transparent'}`} + class={`group flex w-full items-center ${props.sidebarCollapsed() ? 'justify-center' : 'justify-between'} lg:rounded-md ${props.sidebarCollapsed() ? 'px-2 py-2.5' : 'px-4 py-3.5 lg:px-3 lg:py-2'} text-[15px] lg:text-sm font-medium transition-colors ${item.disabled ? 'opacity-60 cursor-not-allowed text-muted' : isActive() ? 'lg:bg-blue-50 text-blue-600 dark:lg:bg-blue-900 dark:text-blue-300 lg:dark:text-blue-200 bg-surface' : ' lg:hover:bg-surface-hover hover:text-base-content active:bg-surface-hover lg:active:bg-transparent'}`} onClick={() => { if (item.disabled) return; props.setActiveTab(item.id); props.setIsMobileMenuOpen(false); }} - title={effectiveSidebarCollapsed() ? item.label : undefined} + title={props.sidebarCollapsed() ? item.label : undefined} >
= (props) => { {...(item.iconProps || {})} />
- +