mirror of
https://github.com/umami-software/umami.git
synced 2026-02-13 17:15:37 +01:00
Fixed properties queries.
This commit is contained in:
parent
465a03f987
commit
5e6799a715
38 changed files with 139 additions and 499 deletions
|
|
@ -1,14 +1,5 @@
|
|||
import { useMessages, useModified } from '@/components/hooks';
|
||||
import {
|
||||
Button,
|
||||
Icon,
|
||||
Modal,
|
||||
Dialog,
|
||||
DialogTrigger,
|
||||
Text,
|
||||
Column,
|
||||
useToast,
|
||||
} from '@umami/react-zen';
|
||||
import { Button, Icon, Modal, Dialog, DialogTrigger, Text, useToast } from '@umami/react-zen';
|
||||
import { Plus } from '@/components/icons';
|
||||
import { WebsiteAddForm } from './WebsiteAddForm';
|
||||
|
||||
|
|
@ -33,11 +24,7 @@ export function WebsiteAddButton({ teamId, onSave }: { teamId: string; onSave?:
|
|||
</Button>
|
||||
<Modal>
|
||||
<Dialog title={formatMessage(labels.addWebsite)} style={{ width: 400 }}>
|
||||
{({ close }) => (
|
||||
<Column width="300px">
|
||||
<WebsiteAddForm teamId={teamId} onSave={handleSave} onClose={close} />
|
||||
</Column>
|
||||
)}
|
||||
{({ close }) => <WebsiteAddForm teamId={teamId} onSave={handleSave} onClose={close} />}
|
||||
</Dialog>
|
||||
</Modal>
|
||||
</DialogTrigger>
|
||||
|
|
|
|||
|
|
@ -1,21 +1,15 @@
|
|||
'use client';
|
||||
import { Column } from '@umami/react-zen';
|
||||
import { useLoginQuery, useMessages } from '@/components/hooks';
|
||||
import { useMessages } from '@/components/hooks';
|
||||
import { WebsitesDataTable } from './WebsitesDataTable';
|
||||
import { ROLES } from '@/lib/constants';
|
||||
import { SectionHeader } from '@/components/common/SectionHeader';
|
||||
import { WebsiteAddButton } from './WebsiteAddButton';
|
||||
|
||||
export function WebsitesSettingsPage({ teamId }: { teamId: string }) {
|
||||
const { user } = useLoginQuery();
|
||||
const canCreate = user.role !== ROLES.viewOnly;
|
||||
const { formatMessage, labels } = useMessages();
|
||||
|
||||
return (
|
||||
<Column gap>
|
||||
<SectionHeader title={formatMessage(labels.websites)}>
|
||||
{canCreate && <WebsiteAddButton teamId={teamId} />}
|
||||
</SectionHeader>
|
||||
<SectionHeader title={formatMessage(labels.websites)} />
|
||||
<WebsitesDataTable teamId={teamId} />
|
||||
</Column>
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue