mirror of
https://github.com/umami-software/umami.git
synced 2026-02-15 18:15:35 +01:00
New settings layouts. Segment management screen.
This commit is contained in:
parent
2dbcf63eeb
commit
eb7b6978d3
70 changed files with 762 additions and 499 deletions
|
|
@ -2,7 +2,8 @@ import { ConfirmationForm } from '@/components/common/ConfirmationForm';
|
|||
import { useApi, useMessages, useModified } from '@/components/hooks';
|
||||
import { messages } from '@/components/messages';
|
||||
import { Trash } from '@/components/icons';
|
||||
import { Button, Icon, Modal, DialogTrigger, Dialog } from '@umami/react-zen';
|
||||
import { Dialog } from '@umami/react-zen';
|
||||
import { ActionButton } from '@/components/input/ActionButton';
|
||||
|
||||
export function TeamMemberRemoveButton({
|
||||
teamId,
|
||||
|
|
@ -34,29 +35,22 @@ export function TeamMemberRemoveButton({
|
|||
};
|
||||
|
||||
return (
|
||||
<DialogTrigger>
|
||||
<Button variant="quiet">
|
||||
<Icon>
|
||||
<Trash />
|
||||
</Icon>
|
||||
</Button>
|
||||
<Modal>
|
||||
<Dialog title={formatMessage(labels.removeMember)} style={{ width: 400 }}>
|
||||
{({ close }) => (
|
||||
<ConfirmationForm
|
||||
message={formatMessage(messages.confirmRemove, {
|
||||
target: userName,
|
||||
})}
|
||||
isLoading={isPending}
|
||||
error={error}
|
||||
onConfirm={handleConfirm.bind(null, close)}
|
||||
onClose={close}
|
||||
buttonLabel={formatMessage(labels.remove)}
|
||||
buttonVariant="danger"
|
||||
/>
|
||||
)}
|
||||
</Dialog>
|
||||
</Modal>
|
||||
</DialogTrigger>
|
||||
<ActionButton tooltip={formatMessage(labels.delete)} icon={<Trash />}>
|
||||
<Dialog title={formatMessage(labels.removeMember)} style={{ width: 400 }}>
|
||||
{({ close }) => (
|
||||
<ConfirmationForm
|
||||
message={formatMessage(messages.confirmRemove, {
|
||||
target: userName,
|
||||
})}
|
||||
isLoading={isPending}
|
||||
error={error}
|
||||
onConfirm={handleConfirm.bind(null, close)}
|
||||
onClose={close}
|
||||
buttonLabel={formatMessage(labels.remove)}
|
||||
buttonVariant="danger"
|
||||
/>
|
||||
)}
|
||||
</Dialog>
|
||||
</ActionButton>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue