mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +01:00
Updated settings button.
This commit is contained in:
parent
1c7f9da320
commit
93e71d900f
1 changed files with 1 additions and 18 deletions
|
|
@ -8,12 +8,9 @@ import {
|
|||
MenuItem,
|
||||
MenuSeparator,
|
||||
MenuSection,
|
||||
Dialog,
|
||||
SubMenuTrigger,
|
||||
} from '@umami/react-zen';
|
||||
import { useMessages, useLoginQuery, useNavigation, useConfig } from '@/components/hooks';
|
||||
import { LogOut, LockKeyhole, Settings, Knobs } from '@/components/icons';
|
||||
import { PreferenceSettings } from '@/app/(main)/settings/preferences/PreferenceSettings';
|
||||
import { LogOut, LockKeyhole, Settings } from '@/components/icons';
|
||||
|
||||
export function SettingsButton() {
|
||||
const { formatMessage, labels } = useMessages();
|
||||
|
|
@ -44,20 +41,6 @@ export function SettingsButton() {
|
|||
<MenuSection title={user.username}>
|
||||
<MenuSeparator />
|
||||
<MenuItem id="settings" icon={<Settings />} label={formatMessage(labels.settings)} />
|
||||
{cloudMode && (
|
||||
<SubMenuTrigger>
|
||||
<MenuItem
|
||||
icon={<Knobs />}
|
||||
label={formatMessage(labels.preferences)}
|
||||
showSubMenuIcon
|
||||
/>
|
||||
<Popover placement="right bottom">
|
||||
<Dialog>
|
||||
<PreferenceSettings />
|
||||
</Dialog>
|
||||
</Popover>
|
||||
</SubMenuTrigger>
|
||||
)}
|
||||
{!cloudMode && user.isAdmin && (
|
||||
<MenuItem id="admin" icon={<LockKeyhole />} label={formatMessage(labels.admin)} />
|
||||
)}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue