feat: Обновить компоненты интерфейса, добавив новый заголовок страницы и состояние пустого контента в менеджерах ASNs, Domains и IPRanges, а также улучшить стили для адаптивного отображения
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 2m0s
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 2m0s
This commit is contained in:
@@ -5,7 +5,8 @@ import {
|
||||
IconDeviceFloppy,
|
||||
IconPlayerPlay,
|
||||
IconBolt,
|
||||
IconEraser
|
||||
IconEraser,
|
||||
IconDots
|
||||
} from '@tabler/icons-react';
|
||||
import PortalDropdown from './PortalDropdown.jsx';
|
||||
import { IconClock } from '@tabler/icons-react';
|
||||
@@ -31,6 +32,7 @@ function PageHeaderActions({
|
||||
onOnlineUpdate,
|
||||
onBackgroundUpdate,
|
||||
}) {
|
||||
const secondaryButtons = Boolean(onImport || onExport || onClear || onClearCommunities || onHistory);
|
||||
// Рендер плейсхолдеров во время загрузки/перезагрузки страницы
|
||||
if (loading) {
|
||||
const showUpdateGroup = Boolean(onBackgroundUpdate || onOnlineUpdate);
|
||||
@@ -95,7 +97,7 @@ function PageHeaderActions({
|
||||
)}
|
||||
</div>
|
||||
<span className="vr d-none d-lg-inline" />
|
||||
<div className="btn-group">
|
||||
<div className="btn-group d-none d-sm-inline-flex">
|
||||
{onRefresh && (
|
||||
<button className="btn btn-outline-secondary" type="button" onClick={onRefresh} disabled={disableRefresh} title="Обновить данные">
|
||||
<IconRefresh className={loading ? 'spin me-1' : 'me-1'} /> Обновить
|
||||
@@ -159,6 +161,48 @@ function PageHeaderActions({
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
{/* Компактное меню для маленьких экранов */}
|
||||
{secondaryButtons && (
|
||||
<div className="btn-group d-inline-flex d-sm-none">
|
||||
<PortalDropdown
|
||||
buttonClassName="btn btn-outline-secondary"
|
||||
buttonProps={{ title: 'Ещё действия' }}
|
||||
align="left"
|
||||
buttonContent={<><IconDots className="me-1" /> Ещё</>}
|
||||
>
|
||||
{onRefresh && (
|
||||
<button className="dropdown-item" type="button" onClick={onRefresh} disabled={disableRefresh}>
|
||||
<IconRefresh className="me-1" /> Обновить
|
||||
</button>
|
||||
)}
|
||||
{onImport && (
|
||||
<button className="dropdown-item" type="button" onClick={onImport}>
|
||||
<IconUpload className="me-1" /> Импорт
|
||||
</button>
|
||||
)}
|
||||
{onExport && (
|
||||
<button className="dropdown-item" type="button" onClick={onExport} disabled={disableExport}>
|
||||
<IconDownload className="me-1" /> Экспорт
|
||||
</button>
|
||||
)}
|
||||
{onClear && (
|
||||
<button className="dropdown-item" type="button" onClick={onClear} disabled={disableClear}>
|
||||
Очистить
|
||||
</button>
|
||||
)}
|
||||
{onClearCommunities && (
|
||||
<button className="dropdown-item" type="button" onClick={onClearCommunities} disabled={disableClearCommunities}>
|
||||
<IconEraser className="me-1" /> Очистить community
|
||||
</button>
|
||||
)}
|
||||
{onHistory && (
|
||||
<button className="dropdown-item" type="button" onClick={onHistory}>
|
||||
История
|
||||
</button>
|
||||
)}
|
||||
</PortalDropdown>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user