mirror of
https://github.com/umami-software/umami.git
synced 2026-02-07 22:27:16 +01:00
Updated settings components.
This commit is contained in:
parent
a15c7cd596
commit
3004c37ccf
8 changed files with 20 additions and 13 deletions
|
|
@ -28,7 +28,7 @@ export function LanguageSetting() {
|
|||
return (
|
||||
<Row gap="3">
|
||||
<Select
|
||||
selectedKey={locale}
|
||||
value={locale}
|
||||
onChange={val => saveLocale(val as string)}
|
||||
allowSearch
|
||||
onSearch={setSearch}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ export function TimezoneSetting() {
|
|||
return (
|
||||
<Row gap="3">
|
||||
<Select
|
||||
selectedKey={timezone}
|
||||
value={timezone}
|
||||
onChange={(value: any) => saveTimezone(value)}
|
||||
allowSearch={true}
|
||||
onSearch={setSearch}
|
||||
|
|
|
|||
|
|
@ -70,7 +70,11 @@ export function UsersTable({
|
|||
</Row>
|
||||
</MenuItem>
|
||||
<MenuSeparator />
|
||||
<MenuItem id="delete" onAction={() => setDeleteUser(row)}>
|
||||
<MenuItem
|
||||
id="delete"
|
||||
onAction={() => setDeleteUser(row)}
|
||||
data-test="link-button-delete"
|
||||
>
|
||||
<Row alignItems="center" gap>
|
||||
<Icon>
|
||||
<Icons.Trash />
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import { Row, Text, Icon, DataTable, DataColumn, MenuItem } from '@umami/react-z
|
|||
import { useMessages, useNavigation } from '@/components/hooks';
|
||||
import { MenuButton } from '@/components/input/MenuButton';
|
||||
import { Lucide } from '@/components/icons';
|
||||
import Link from 'next/link';
|
||||
|
||||
export interface WebsitesTableProps {
|
||||
data: any[];
|
||||
|
|
@ -29,7 +30,9 @@ export function WebsitesTable({
|
|||
|
||||
return (
|
||||
<DataTable data={data}>
|
||||
<DataColumn id="name" label={formatMessage(labels.name)} />
|
||||
<DataColumn id="name" label={formatMessage(labels.name)}>
|
||||
{(row: any) => <Link href={`/websites/${row.id}`}>{row.name}</Link>}
|
||||
</DataColumn>
|
||||
<DataColumn id="domain" label={formatMessage(labels.domain)} />
|
||||
{showActions && (
|
||||
<DataColumn id="action" label=" " align="end">
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ export function DateFilter({
|
|||
return (
|
||||
<>
|
||||
<Select
|
||||
selectedKey={value}
|
||||
value={value}
|
||||
placeholder={formatMessage(labels.selectDate)}
|
||||
onChange={handleChange}
|
||||
renderValue={renderValue}
|
||||
|
|
|
|||
|
|
@ -20,8 +20,8 @@ export function MenuButton({
|
|||
<Lucide.Ellipsis />
|
||||
</Icon>
|
||||
</Button>
|
||||
<Popover>
|
||||
<Menu onAction={handleAction} style={{ minWidth: '140px' }}>
|
||||
<Popover placement="bottom start">
|
||||
<Menu aria-label="menu" onAction={handleAction} style={{ minWidth: '140px' }}>
|
||||
{children}
|
||||
</Menu>
|
||||
</Popover>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue