Website header updates.

This commit is contained in:
Mike Cao 2025-04-04 23:26:52 -07:00
parent 2b99274895
commit 96c2c32d14
26 changed files with 137 additions and 247 deletions

View file

@ -1,30 +1,27 @@
import { Button, Icon, PopupTrigger, Popup, Form, FormRow } from '@umami/react-zen';
import { Button, Icon, DialogTrigger, Popover, Column, Label } from '@umami/react-zen';
import { TimezoneSetting } from '@/app/(main)/profile/TimezoneSetting';
import { DateRangeSetting } from '@/app/(main)/profile/DateRangeSetting';
import { Icons } from '@/components/icons';
import { useMessages } from '@/components/hooks';
import styles from './SettingsButton.module.css';
export function SettingsButton() {
const { formatMessage, labels } = useMessages();
return (
<PopupTrigger>
<DialogTrigger>
<Button variant="quiet">
<Icon>
<Icons.Gear />
</Icon>
</Button>
<Popup className={styles.popup} position="bottom" alignment="end">
<Form>
<FormRow label={formatMessage(labels.timezone)}>
<TimezoneSetting />
</FormRow>
<FormRow label={formatMessage(labels.defaultDateRange)}>
<DateRangeSetting />
</FormRow>
</Form>
</Popup>
</PopupTrigger>
<Popover placement="bottom end">
<Column gap="3">
<Label>{formatMessage(labels.timezone)}</Label>
<TimezoneSetting />
<Label>{formatMessage(labels.defaultDateRange)}</Label>
<DateRangeSetting />
</Column>
</Popover>
</DialogTrigger>
);
}