mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +01:00
Small fixes.
Some checks are pending
Node.js CI / build (postgresql, 18.18, 10) (push) Waiting to run
Some checks are pending
Node.js CI / build (postgresql, 18.18, 10) (push) Waiting to run
This commit is contained in:
parent
40492ec7c4
commit
bcafa12349
8 changed files with 22 additions and 27 deletions
|
|
@ -5,7 +5,7 @@ import Link from 'next/link';
|
||||||
import { WebsiteNav } from '@/app/(main)/websites/[websiteId]/WebsiteNav';
|
import { WebsiteNav } from '@/app/(main)/websites/[websiteId]/WebsiteNav';
|
||||||
import { Logo } from '@/components/svg';
|
import { Logo } from '@/components/svg';
|
||||||
import { NavButton } from '@/components/input/NavButton';
|
import { NavButton } from '@/components/input/NavButton';
|
||||||
import { MobileMenu } from '@/components/common/MobileMenu';
|
import { MobileMenuButton } from '@/components/input/MobileMenuButton';
|
||||||
|
|
||||||
export function MobileNav() {
|
export function MobileNav() {
|
||||||
const { formatMessage, labels } = useMessages();
|
const { formatMessage, labels } = useMessages();
|
||||||
|
|
@ -34,7 +34,7 @@ export function MobileNav() {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Grid columns="auto 1fr" flexGrow={1}>
|
<Grid columns="auto 1fr" flexGrow={1}>
|
||||||
<MobileMenu>
|
<MobileMenuButton>
|
||||||
{({ close }) => {
|
{({ close }) => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|
@ -54,7 +54,7 @@ export function MobileNav() {
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
</MobileMenu>
|
</MobileMenuButton>
|
||||||
<Row alignItems="center" justifyContent="center" flexGrow={1}>
|
<Row alignItems="center" justifyContent="center" flexGrow={1}>
|
||||||
<IconLabel icon={<Logo />} style={{ width: 'auto' }}>
|
<IconLabel icon={<Logo />} style={{ width: 'auto' }}>
|
||||||
<Text weight="bold">umami</Text>
|
<Text weight="bold">umami</Text>
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import { Grid, Column, Row } from '@umami/react-zen';
|
||||||
import { useMessages, useNavigation } from '@/components/hooks';
|
import { useMessages, useNavigation } from '@/components/hooks';
|
||||||
import { MetricsExpandedTable } from '@/components/metrics/MetricsExpandedTable';
|
import { MetricsExpandedTable } from '@/components/metrics/MetricsExpandedTable';
|
||||||
import { WebsiteExpandedMenu } from '@/app/(main)/websites/[websiteId]/WebsiteExpandedMenu';
|
import { WebsiteExpandedMenu } from '@/app/(main)/websites/[websiteId]/WebsiteExpandedMenu';
|
||||||
import { MobileMenu } from '@/components/common/MobileMenu';
|
import { MobileMenuButton } from '@/components/input/MobileMenuButton';
|
||||||
|
|
||||||
export function WebsiteExpandedView({
|
export function WebsiteExpandedView({
|
||||||
websiteId,
|
websiteId,
|
||||||
|
|
@ -21,11 +21,11 @@ export function WebsiteExpandedView({
|
||||||
return (
|
return (
|
||||||
<Column gap>
|
<Column gap>
|
||||||
<Row display={{ xs: 'flex', md: 'none' }}>
|
<Row display={{ xs: 'flex', md: 'none' }}>
|
||||||
<MobileMenu>
|
<MobileMenuButton>
|
||||||
{({ close }) => {
|
{({ close }) => {
|
||||||
return <WebsiteExpandedMenu excludedIds={excludedIds} onItemClick={close} />;
|
return <WebsiteExpandedMenu excludedIds={excludedIds} onItemClick={close} />;
|
||||||
}}
|
}}
|
||||||
</MobileMenu>
|
</MobileMenuButton>
|
||||||
</Row>
|
</Row>
|
||||||
<Grid columns={{ xs: '1fr', md: 'auto 1fr' }} gap="6" height="100%" overflow="hidden">
|
<Grid columns={{ xs: '1fr', md: 'auto 1fr' }} gap="6" height="100%" overflow="hidden">
|
||||||
<Column
|
<Column
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { Button, Icon, Text, Row, DialogTrigger, Dialog, Modal } from '@umami/react-zen';
|
import { Icon, Text, Row } from '@umami/react-zen';
|
||||||
import { PageHeader } from '@/components/common/PageHeader';
|
import { PageHeader } from '@/components/common/PageHeader';
|
||||||
import { Share, Edit } from '@/components/icons';
|
import { Share, Edit } from '@/components/icons';
|
||||||
import { Favicon } from '@/components/common/Favicon';
|
import { Favicon } from '@/components/common/Favicon';
|
||||||
|
|
@ -6,6 +6,7 @@ import { ActiveUsers } from '@/components/metrics/ActiveUsers';
|
||||||
import { WebsiteShareForm } from '@/app/(main)/websites/[websiteId]/settings/WebsiteShareForm';
|
import { WebsiteShareForm } from '@/app/(main)/websites/[websiteId]/settings/WebsiteShareForm';
|
||||||
import { useMessages, useNavigation, useWebsite } from '@/components/hooks';
|
import { useMessages, useNavigation, useWebsite } from '@/components/hooks';
|
||||||
import { LinkButton } from '@/components/common/LinkButton';
|
import { LinkButton } from '@/components/common/LinkButton';
|
||||||
|
import { DialogButton } from '@/components/input/DialogButton';
|
||||||
|
|
||||||
export function WebsiteHeader({ showActions }: { showActions?: boolean }) {
|
export function WebsiteHeader({ showActions }: { showActions?: boolean }) {
|
||||||
const website = useWebsite();
|
const website = useWebsite();
|
||||||
|
|
@ -45,20 +46,10 @@ const ShareButton = ({ websiteId, shareId }) => {
|
||||||
const { formatMessage, labels } = useMessages();
|
const { formatMessage, labels } = useMessages();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DialogTrigger>
|
<DialogButton icon={<Share />} label={formatMessage(labels.share)} width="800px">
|
||||||
<Button>
|
|
||||||
<Icon>
|
|
||||||
<Share />
|
|
||||||
</Icon>
|
|
||||||
<Text>Share</Text>
|
|
||||||
</Button>
|
|
||||||
<Modal>
|
|
||||||
<Dialog title={formatMessage(labels.share)} style={{ width: 800 }}>
|
|
||||||
{({ close }) => {
|
{({ close }) => {
|
||||||
return <WebsiteShareForm websiteId={websiteId} shareId={shareId} onClose={close} />;
|
return <WebsiteShareForm websiteId={websiteId} shareId={shareId} onClose={close} />;
|
||||||
}}
|
}}
|
||||||
</Dialog>
|
</DialogButton>
|
||||||
</Modal>
|
|
||||||
</DialogTrigger>
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -161,7 +161,7 @@ export function WebsiteNav({
|
||||||
.find(({ path }) => path && pathname.endsWith(path.split('?')[0]))?.id;
|
.find(({ path }) => path && pathname.endsWith(path.split('?')[0]))?.id;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Column padding="3" gap>
|
<Column padding="3" position="sticky" top="0" gap>
|
||||||
<WebsiteSelect
|
<WebsiteSelect
|
||||||
websiteId={websiteId}
|
websiteId={websiteId}
|
||||||
teamId={teamId}
|
teamId={teamId}
|
||||||
|
|
|
||||||
|
|
@ -106,7 +106,7 @@ export function WebsitePanels({ websiteId }: { websiteId: string }) {
|
||||||
</GridRow>
|
</GridRow>
|
||||||
|
|
||||||
<GridRow layout="two-one" {...rowProps}>
|
<GridRow layout="two-one" {...rowProps}>
|
||||||
<Panel gridColumn={{ xs: 'span 1', md: 'span 2' }} padding="0">
|
<Panel gridColumn={{ xs: 'span 1', md: 'span 2' }} paddingX="0" paddingY="0">
|
||||||
<WorldMap websiteId={websiteId} />
|
<WorldMap websiteId={websiteId} />
|
||||||
</Panel>
|
</Panel>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,6 @@ export function DialogButton({
|
||||||
<Button {...props}>
|
<Button {...props}>
|
||||||
<IconLabel icon={icon} label={label} />
|
<IconLabel icon={icon} label={label} />
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Modal placement={isMobile ? 'fullscreen' : 'center'}>
|
<Modal placement={isMobile ? 'fullscreen' : 'center'}>
|
||||||
<Dialog variant={isMobile ? 'sheet' : undefined} title={title || label} style={style}>
|
<Dialog variant={isMobile ? 'sheet' : undefined} title={title || label} style={style}>
|
||||||
{children}
|
{children}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { Dialog, DialogTrigger, Button, Icon, Modal, DialogProps } from '@umami/react-zen';
|
import { Dialog, DialogTrigger, Button, Icon, Modal, DialogProps } from '@umami/react-zen';
|
||||||
import { Menu } from '@/components/icons';
|
import { Menu } from '@/components/icons';
|
||||||
|
|
||||||
export function MobileMenu(props: DialogProps) {
|
export function MobileMenuButton(props: DialogProps) {
|
||||||
return (
|
return (
|
||||||
<DialogTrigger>
|
<DialogTrigger>
|
||||||
<Button>
|
<Button>
|
||||||
|
|
@ -65,7 +65,12 @@ export function WorldMap({ websiteId, data, ...props }: WorldMapProps) {
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Column {...props} data-tip="" data-for="world-map-tooltip" style={{ margin: 'auto 0' }}>
|
<Column
|
||||||
|
{...props}
|
||||||
|
data-tip=""
|
||||||
|
data-for="world-map-tooltip"
|
||||||
|
style={{ margin: 'auto 0', overflow: 'hidden' }}
|
||||||
|
>
|
||||||
<ComposableMap projection="geoMercator">
|
<ComposableMap projection="geoMercator">
|
||||||
<ZoomableGroup zoom={0.8} minZoom={0.7} center={[0, 40]}>
|
<ZoomableGroup zoom={0.8} minZoom={0.7} center={[0, 40]}>
|
||||||
<Geographies geography={`${process.env.basePath || ''}${MAP_FILE}`}>
|
<Geographies geography={`${process.env.basePath || ''}${MAP_FILE}`}>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue