feat(admin): Control Center redesign, Explore dual-view и полный RU/EN i18n
CI / test (push) Failing after 3m9s
CI / push-image (push) Has been skipped
CI / ci-done (push) Failing after 0s

Refs EventHub/EventHubFrontAdmin#32
This commit is contained in:
2026-07-14 17:58:33 +03:00
parent de379e28bf
commit fd2c1f10ad
95 changed files with 12699 additions and 4410 deletions
@@ -0,0 +1,45 @@
import { useTranslation } from 'react-i18next';
import { LayoutList, Table2 } from 'lucide-react';
import type { ExploreViewMode } from '@/lib/exploreView';
import { cn } from '@/lib/utils';
import { Button } from '@/components/ui/button';
interface ExploreViewToggleProps {
value: ExploreViewMode;
onChange: (mode: ExploreViewMode) => void;
className?: string;
}
export function ExploreViewToggle({ value, onChange, className }: ExploreViewToggleProps) {
const { t } = useTranslation();
return (
<div
className={cn('inline-flex rounded-md border bg-background p-0.5', className)}
role="group"
aria-label={t('explore.viewAria')}
>
<Button
type="button"
variant={value === 'table' ? 'secondary' : 'ghost'}
size="sm"
className="h-8 gap-1.5 px-2.5"
onClick={() => onChange('table')}
aria-pressed={value === 'table'}
>
<Table2 className="h-3.5 w-3.5" />
<span className="hidden sm:inline">{t('explore.table')}</span>
</Button>
<Button
type="button"
variant={value === 'rows' ? 'secondary' : 'ghost'}
size="sm"
className="h-8 gap-1.5 px-2.5"
onClick={() => onChange('rows')}
aria-pressed={value === 'rows'}
>
<LayoutList className="h-3.5 w-3.5" />
<span className="hidden sm:inline">{t('explore.rows')}</span>
</Button>
</div>
);
}