refactor(PageHeader): standardize header component across various managers by adding icons for improved visual consistency and user experience
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 1m53s
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 1m53s
This commit is contained in:
@@ -33,6 +33,7 @@ import {
|
||||
ServerCard,
|
||||
ServerBulkActions
|
||||
} from './components/server/index.js';
|
||||
import PageHeader from './components/PageHeader.jsx';
|
||||
|
||||
const API_URL = '/api';
|
||||
|
||||
@@ -585,49 +586,39 @@ function ServerManager() {
|
||||
|
||||
return (
|
||||
<div className="server-manager-layout">
|
||||
{/* Header */}
|
||||
<div className="page-header d-print-none mb-3">
|
||||
<div className="row align-items-center">
|
||||
<div className="col">
|
||||
<h2 className="page-title d-flex align-items-center">
|
||||
<IconServer className="me-2" />
|
||||
Управление серверами
|
||||
</h2>
|
||||
</div>
|
||||
<div className="col-auto ms-auto d-print-none">
|
||||
<div className="btn-list">
|
||||
{/* Tabs */}
|
||||
<div className="btn-group me-2" role="group">
|
||||
<button
|
||||
className={`btn ${activeTab === 'servers' ? 'btn-primary' : 'btn-outline-primary'}`}
|
||||
onClick={() => setActiveTab('servers')}
|
||||
>
|
||||
<IconServer size={16} className="me-1" />
|
||||
Серверы
|
||||
</button>
|
||||
<button
|
||||
className={`btn ${activeTab === 'connections' ? 'btn-primary' : 'btn-outline-primary'}`}
|
||||
onClick={() => setActiveTab('connections')}
|
||||
>
|
||||
<IconGitBranch size={16} className="me-1" />
|
||||
Связи
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{/* Actions */}
|
||||
<button type="button" className="btn btn-outline-secondary" onClick={exportAllLinks} disabled={servers.length === 0}>
|
||||
<IconDownload size={16} className="me-1" /> Экспорт
|
||||
<PageHeader
|
||||
title="Управление серверами"
|
||||
icon={<IconServer size={24} />}
|
||||
actions={
|
||||
<div className="btn-list">
|
||||
<div className="btn-group me-2" role="group">
|
||||
<button
|
||||
className={`btn ${activeTab === 'servers' ? 'btn-primary' : 'btn-outline-primary'}`}
|
||||
onClick={() => setActiveTab('servers')}
|
||||
>
|
||||
<IconServer size={16} className="me-1" />
|
||||
Серверы
|
||||
</button>
|
||||
<button type="button" className="btn btn-outline-primary" onClick={handleSaveChanges} disabled={loading}>
|
||||
<IconDatabase size={16} className={loading ? 'spin me-1' : 'me-1'} /> Сохранить
|
||||
</button>
|
||||
<button type="button" className="btn btn-primary" onClick={handleOpenAddServerModal}>
|
||||
<IconPlus size={16} className="me-1" /> Добавить
|
||||
<button
|
||||
className={`btn ${activeTab === 'connections' ? 'btn-primary' : 'btn-outline-primary'}`}
|
||||
onClick={() => setActiveTab('connections')}
|
||||
>
|
||||
<IconGitBranch size={16} className="me-1" />
|
||||
Связи
|
||||
</button>
|
||||
</div>
|
||||
<button type="button" className="btn btn-outline-secondary" onClick={exportAllLinks} disabled={servers.length === 0}>
|
||||
<IconDownload size={16} className="me-1" /> Экспорт
|
||||
</button>
|
||||
<button type="button" className="btn btn-outline-primary" onClick={handleSaveChanges} disabled={loading}>
|
||||
<IconDatabase size={16} className={loading ? 'spin me-1' : 'me-1'} /> Сохранить
|
||||
</button>
|
||||
<button type="button" className="btn btn-primary" onClick={handleOpenAddServerModal}>
|
||||
<IconPlus size={16} className="me-1" /> Добавить
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
/>
|
||||
|
||||
{/* Offcanvas: фильтры (только для вкладки «Серверы») */}
|
||||
{activeTab === 'servers' && (
|
||||
|
||||
Reference in New Issue
Block a user