mirror of
https://github.com/router-for-me/Cli-Proxy-API-Management-Center.git
synced 2026-06-16 21:03:58 +08:00
fix(layout): move mobile sidebar toggle left
This commit is contained in:
@@ -74,6 +74,12 @@ const headerIcons = {
|
||||
<path d="M4 17h16" />
|
||||
</svg>
|
||||
),
|
||||
close: (
|
||||
<svg {...headerIconProps}>
|
||||
<path d="M18 6 6 18" />
|
||||
<path d="m6 6 12 12" />
|
||||
</svg>
|
||||
),
|
||||
chevronLeft: (
|
||||
<svg {...headerIconProps}>
|
||||
<path d="m14 18-6-6 6-6" />
|
||||
@@ -465,6 +471,9 @@ export function MainLayout() {
|
||||
}
|
||||
showNotification(t('notification.data_refreshed'), 'success');
|
||||
};
|
||||
const mobileSidebarToggleLabel = sidebarOpen
|
||||
? t('sidebar.toggle_collapse', { defaultValue: 'Close navigation' })
|
||||
: t('sidebar.toggle_expand', { defaultValue: 'Open navigation' });
|
||||
|
||||
return (
|
||||
<div className={`app-shell ${sidebarCollapsed ? 'sidebar-is-collapsed' : ''}`}>
|
||||
@@ -489,17 +498,20 @@ export function MainLayout() {
|
||||
{sidebarCollapsed ? headerIcons.chevronRight : headerIcons.chevronLeft}
|
||||
</button>
|
||||
|
||||
<div className="header-actions floating-actions">
|
||||
<div className="mobile-sidebar-actions">
|
||||
<Button
|
||||
className="mobile-menu-btn"
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
onClick={() => setSidebarOpen((prev) => !prev)}
|
||||
title={t('sidebar.toggle_expand', { defaultValue: 'Open navigation' })}
|
||||
aria-label={t('sidebar.toggle_expand', { defaultValue: 'Open navigation' })}
|
||||
title={mobileSidebarToggleLabel}
|
||||
aria-label={mobileSidebarToggleLabel}
|
||||
>
|
||||
{headerIcons.menu}
|
||||
{sidebarOpen ? headerIcons.close : headerIcons.menu}
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
<div className="header-actions floating-actions">
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
|
||||
Reference in New Issue
Block a user