mirror of
https://github.com/umami-software/umami.git
synced 2026-02-07 06:07:17 +01:00
New mobile menu.
This commit is contained in:
parent
be5f0494cc
commit
10bc2895eb
6 changed files with 90 additions and 32 deletions
|
|
@ -57,7 +57,6 @@ export function SideMenu({
|
|||
<Column
|
||||
gap
|
||||
padding
|
||||
width="240px"
|
||||
overflowY="auto"
|
||||
justifyContent="space-between"
|
||||
position="sticky"
|
||||
|
|
|
|||
|
|
@ -1,18 +0,0 @@
|
|||
import { Button, Icon, DialogTrigger, Dialog, Modal } from '@umami/react-zen';
|
||||
import { Menu } from '@/components/icons';
|
||||
import { ReactNode } from 'react';
|
||||
|
||||
export function MobileMenuButton({ children }: { children: ReactNode }) {
|
||||
return (
|
||||
<DialogTrigger>
|
||||
<Button>
|
||||
<Icon>
|
||||
<Menu />
|
||||
</Icon>
|
||||
</Button>
|
||||
<Modal position="left" offset="20px">
|
||||
<Dialog variant="sheet">{children}</Dialog>
|
||||
</Modal>
|
||||
</DialogTrigger>
|
||||
);
|
||||
}
|
||||
|
|
@ -1,6 +1,11 @@
|
|||
import { useState } from 'react';
|
||||
import { Select, SelectProps, ListItem, Text, Row } from '@umami/react-zen';
|
||||
import { useUserWebsitesQuery, useMessages, useLoginQuery, useWebsite } from '@/components/hooks';
|
||||
import {
|
||||
useUserWebsitesQuery,
|
||||
useMessages,
|
||||
useLoginQuery,
|
||||
useWebsiteQuery,
|
||||
} from '@/components/hooks';
|
||||
import { Empty } from '@/components/common/Empty';
|
||||
|
||||
export function WebsiteSelect({
|
||||
|
|
@ -15,7 +20,7 @@ export function WebsiteSelect({
|
|||
includeTeams?: boolean;
|
||||
} & SelectProps) {
|
||||
const { formatMessage, messages } = useMessages();
|
||||
const website = useWebsite();
|
||||
const { data: website } = useWebsiteQuery(websiteId);
|
||||
const [name, setName] = useState<string>(website?.name);
|
||||
const [search, setSearch] = useState('');
|
||||
const { user } = useLoginQuery();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue