mirror of
https://github.com/inventree/InvenTree.git
synced 2025-12-14 16:29:57 +00:00
[UI] Spotlight Updates (#10994)
- Fix broken "admin" action - Add action to jump to plugins page
This commit is contained in:
@@ -3,6 +3,7 @@ import type { SpotlightActionData } from '@mantine/spotlight';
|
|||||||
import {
|
import {
|
||||||
IconBarcode,
|
IconBarcode,
|
||||||
IconLink,
|
IconLink,
|
||||||
|
IconPlug,
|
||||||
IconPointer,
|
IconPointer,
|
||||||
IconSettings,
|
IconSettings,
|
||||||
IconUserBolt,
|
IconUserBolt,
|
||||||
@@ -152,10 +153,19 @@ export function getActions(navigate: NavigateFunction) {
|
|||||||
id: 'admin-center',
|
id: 'admin-center',
|
||||||
label: t`Admin Center`,
|
label: t`Admin Center`,
|
||||||
description: t`Go to the Admin Center`,
|
description: t`Go to the Admin Center`,
|
||||||
onClick: () => {}, /// navigate(menuItems['settings-admin'].link),}
|
onClick: () => navigate('/settings/admin'),
|
||||||
leftSection: <IconUserBolt size='1.2rem' />
|
leftSection: <IconUserBolt size='1.2rem' />
|
||||||
});
|
});
|
||||||
|
|
||||||
|
user?.isStaff() &&
|
||||||
|
_actions.push({
|
||||||
|
id: 'plugin-settings',
|
||||||
|
label: t`Plugins`,
|
||||||
|
description: t`Manage InvenTree plugins`,
|
||||||
|
onClick: () => navigate('/settings/admin/plugin'),
|
||||||
|
leftSection: <IconPlug size='1.2rem' />
|
||||||
|
});
|
||||||
|
|
||||||
return _actions;
|
return _actions;
|
||||||
}, [navigate, setNavigationOpen, globalSettings, user]);
|
}, [navigate, setNavigationOpen, globalSettings, user]);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user