mirror of
https://github.com/umami-software/umami.git
synced 2026-02-12 16:45:35 +01:00
- Rename SideMenu to NavMenu with visible group title labels and selected item highlighting - Update react-zen to 0.242.0 and fix responsive breakpoints (xs -> base) - Style floating tooltips with inverted background across WorldMap, charts, and WeeklyTraffic - Add CSS variables for primary color and use IconLabel consistently - Remove stray console.log from LoadingPanel Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
41 lines
1.4 KiB
TypeScript
41 lines
1.4 KiB
TypeScript
import { Column, Grid, Row } from '@umami/react-zen';
|
|
import { ExportButton } from '@/components/input/ExportButton';
|
|
import { FilterBar } from '@/components/input/FilterBar';
|
|
import { MonthFilter } from '@/components/input/MonthFilter';
|
|
import { WebsiteDateFilter } from '@/components/input/WebsiteDateFilter';
|
|
import { WebsiteFilterButton } from '@/components/input/WebsiteFilterButton';
|
|
|
|
export function WebsiteControls({
|
|
websiteId,
|
|
allowFilter = true,
|
|
allowDateFilter = true,
|
|
allowMonthFilter,
|
|
allowDownload = false,
|
|
allowCompare = false,
|
|
}: {
|
|
websiteId: string;
|
|
allowFilter?: boolean;
|
|
allowBounceFilter?: boolean;
|
|
allowDateFilter?: boolean;
|
|
allowMonthFilter?: boolean;
|
|
allowDownload?: boolean;
|
|
allowCompare?: boolean;
|
|
}) {
|
|
return (
|
|
<Column gap>
|
|
<Grid columns={{ base: '1fr', md: 'auto 1fr' }} gap>
|
|
<Row alignItems="center" justifyContent="flex-start" gap="4">
|
|
{allowFilter && <WebsiteFilterButton websiteId={websiteId} />}
|
|
</Row>
|
|
<Row alignItems="center" justifyContent={{ base: 'flex-start', md: 'flex-end' }}>
|
|
{allowDateFilter && (
|
|
<WebsiteDateFilter websiteId={websiteId} allowCompare={allowCompare} />
|
|
)}
|
|
{allowDownload && <ExportButton websiteId={websiteId} />}
|
|
{allowMonthFilter && <MonthFilter />}
|
|
</Row>
|
|
</Grid>
|
|
{allowFilter && <FilterBar websiteId={websiteId} />}
|
|
</Column>
|
|
);
|
|
}
|