feat: Refactor App and ServerManager components to improve navigation and modal handling
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 13m26s
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 13m26s
This commit is contained in:
+31
-38
@@ -64,51 +64,44 @@ function MainLayout() {
|
||||
<div className="page">
|
||||
{/* Верхнее меню Tabler Admin */}
|
||||
<header className="navbar navbar-expand-md navbar-light d-print-none" style={{boxShadow: '0 1px 0 0 #e9ecef'}}>
|
||||
<div className="container-xl">
|
||||
<div className="container-xl d-flex align-items-center justify-content-between">
|
||||
<Link to="/" className="navbar-brand d-flex align-items-center">
|
||||
<IconBrandTabler className="navbar-brand-icon me-2" />
|
||||
<span className="fw-bold">S3 Lists Manager</span>
|
||||
</Link>
|
||||
<nav className="nav nav-tabs ms-4">
|
||||
{navItems.slice(0, 3).map(item => (
|
||||
<Link
|
||||
key={item.id}
|
||||
to={item.path}
|
||||
className={`nav-link${activeTab === item.id ? ' active fw-bold' : ''}`}
|
||||
style={{display: 'flex', alignItems: 'center'}}>
|
||||
<item.icon className="me-2" />
|
||||
{item.title}
|
||||
</Link>
|
||||
))}
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
<div className="container-xl mt-4">
|
||||
<div className="row">
|
||||
<div className="col-2">
|
||||
<nav className="nav flex-column nav-pills">
|
||||
{navItems.slice(0, 3).map(item => (
|
||||
<Link
|
||||
key={item.id}
|
||||
to={item.path}
|
||||
className={`nav-link${activeTab === item.id ? ' active' : ''}`}
|
||||
style={{display: 'flex', alignItems: 'center'}}>
|
||||
<item.icon className="me-2" />
|
||||
{item.title}
|
||||
</Link>
|
||||
))}
|
||||
</nav>
|
||||
</div>
|
||||
<div className="col-10">
|
||||
<Routes>
|
||||
<Route path="/domains" element={
|
||||
<DataManager
|
||||
entityName="домен"
|
||||
entityKey="domains"
|
||||
placeholder="example.com"
|
||||
/>
|
||||
} />
|
||||
<Route path="/asns" element={
|
||||
<DataManager
|
||||
entityName="AS"
|
||||
entityKey="asns"
|
||||
placeholder="AS12345"
|
||||
/>
|
||||
} />
|
||||
<Route path="/servers" element={<ServerManager />} />
|
||||
<Route path="/" element={<Navigate to="/domains" replace />} />
|
||||
{/* Можно добавить другие разделы по необходимости */}
|
||||
</Routes>
|
||||
</div>
|
||||
</div>
|
||||
<Routes>
|
||||
<Route path="/domains" element={
|
||||
<DataManager
|
||||
entityName="домен"
|
||||
entityKey="domains"
|
||||
placeholder="example.com"
|
||||
/>
|
||||
} />
|
||||
<Route path="/asns" element={
|
||||
<DataManager
|
||||
entityName="AS"
|
||||
entityKey="asns"
|
||||
placeholder="AS12345"
|
||||
/>
|
||||
} />
|
||||
<Route path="/servers" element={<ServerManager />} />
|
||||
<Route path="/" element={<Navigate to="/domains" replace />} />
|
||||
</Routes>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user