mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +01:00
ok
This commit is contained in:
parent
a9de07a2f1
commit
f85fe08ad6
1 changed files with 10 additions and 2 deletions
|
|
@ -1,8 +1,9 @@
|
|||
import { SideMenu } from '@/components/common/SideMenu';
|
||||
import { useMessages, useNavigation } from '@/components/hooks';
|
||||
import { useLoginQuery, useMessages, useNavigation } from '@/components/hooks';
|
||||
import { Settings2, UserCircle, Users } from '@/components/icons';
|
||||
|
||||
export function SettingsNav({ onItemClick }: { onItemClick?: () => void }) {
|
||||
const { user } = useLoginQuery();
|
||||
const { formatMessage, labels } = useMessages();
|
||||
const { renderUrl, pathname } = useNavigation();
|
||||
|
||||
|
|
@ -33,7 +34,13 @@ export function SettingsNav({ onItemClick }: { onItemClick?: () => void }) {
|
|||
path: renderUrl('/settings/teams'),
|
||||
icon: <Users />,
|
||||
},
|
||||
],
|
||||
user?.isAdmin && {
|
||||
id: 'oidc',
|
||||
label: 'OIDC',
|
||||
path: renderUrl('/settings/oidc'),
|
||||
icon: <Settings2 />,
|
||||
},
|
||||
].filter(n => n),
|
||||
},
|
||||
];
|
||||
|
||||
|
|
@ -41,6 +48,7 @@ export function SettingsNav({ onItemClick }: { onItemClick?: () => void }) {
|
|||
.flatMap(e => e.items)
|
||||
.find(({ path }) => path && pathname.includes(path.split('?')[0]))?.id;
|
||||
|
||||
|
||||
return (
|
||||
<SideMenu
|
||||
items={items}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue