mirror of
https://github.com/fankes/beszel.git
synced 2025-10-20 02:09:28 +08:00
update command palette items
This commit is contained in:
@@ -6,6 +6,7 @@ import {
|
|||||||
LogsIcon,
|
LogsIcon,
|
||||||
MailIcon,
|
MailIcon,
|
||||||
Server,
|
Server,
|
||||||
|
SettingsIcon,
|
||||||
UsersIcon,
|
UsersIcon,
|
||||||
} from 'lucide-react'
|
} from 'lucide-react'
|
||||||
|
|
||||||
@@ -46,33 +47,9 @@ export default function CommandPalette() {
|
|||||||
<CommandInput placeholder="Search for systems or settings..." />
|
<CommandInput placeholder="Search for systems or settings..." />
|
||||||
<CommandList>
|
<CommandList>
|
||||||
<CommandEmpty>No results found.</CommandEmpty>
|
<CommandEmpty>No results found.</CommandEmpty>
|
||||||
<CommandGroup heading="Suggestions">
|
|
||||||
<CommandItem
|
|
||||||
keywords={['home']}
|
|
||||||
onSelect={() => {
|
|
||||||
navigate('/')
|
|
||||||
setOpen((open) => !open)
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<LayoutDashboard className="mr-2 h-4 w-4" />
|
|
||||||
<span>Dashboard</span>
|
|
||||||
<CommandShortcut>Page</CommandShortcut>
|
|
||||||
</CommandItem>
|
|
||||||
<CommandItem
|
|
||||||
keywords={['github']}
|
|
||||||
onSelect={() => {
|
|
||||||
window.location.href = 'https://github.com/henrygd/beszel/blob/main/readme.md'
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Github className="mr-2 h-4 w-4" />
|
|
||||||
<span>Documentation</span>
|
|
||||||
<CommandShortcut>GitHub</CommandShortcut>
|
|
||||||
</CommandItem>
|
|
||||||
</CommandGroup>
|
|
||||||
{systems.length > 0 && (
|
{systems.length > 0 && (
|
||||||
<>
|
<>
|
||||||
<CommandSeparator />
|
<CommandGroup>
|
||||||
<CommandGroup heading="Systems">
|
|
||||||
{systems.map((system) => (
|
{systems.map((system) => (
|
||||||
<CommandItem
|
<CommandItem
|
||||||
key={system.id}
|
key={system.id}
|
||||||
@@ -87,11 +64,56 @@ export default function CommandPalette() {
|
|||||||
</CommandItem>
|
</CommandItem>
|
||||||
))}
|
))}
|
||||||
</CommandGroup>
|
</CommandGroup>
|
||||||
|
<CommandSeparator className="mb-1.5" />
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
<CommandGroup heading="Pages / Settings">
|
||||||
|
<CommandItem
|
||||||
|
keywords={['home']}
|
||||||
|
onSelect={() => {
|
||||||
|
navigate('/')
|
||||||
|
setOpen((open) => !open)
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<LayoutDashboard className="mr-2 h-4 w-4" />
|
||||||
|
<span>Dashboard</span>
|
||||||
|
<CommandShortcut>Page</CommandShortcut>
|
||||||
|
</CommandItem>
|
||||||
|
<CommandItem
|
||||||
|
onSelect={() => {
|
||||||
|
navigate('/settings/general')
|
||||||
|
setOpen((open) => !open)
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<SettingsIcon className="mr-2 h-4 w-4" />
|
||||||
|
<span>Settings</span>
|
||||||
|
<CommandShortcut>Settings</CommandShortcut>
|
||||||
|
</CommandItem>
|
||||||
|
<CommandItem
|
||||||
|
keywords={['alerts']}
|
||||||
|
onSelect={() => {
|
||||||
|
navigate('/settings/notifications')
|
||||||
|
setOpen((open) => !open)
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<MailIcon className="mr-2 h-4 w-4" />
|
||||||
|
<span>Notification settings</span>
|
||||||
|
<CommandShortcut>Settings</CommandShortcut>
|
||||||
|
</CommandItem>
|
||||||
|
<CommandItem
|
||||||
|
keywords={['github']}
|
||||||
|
onSelect={() => {
|
||||||
|
window.location.href = 'https://github.com/henrygd/beszel/blob/main/readme.md'
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Github className="mr-2 h-4 w-4" />
|
||||||
|
<span>Documentation</span>
|
||||||
|
<CommandShortcut>GitHub</CommandShortcut>
|
||||||
|
</CommandItem>
|
||||||
|
</CommandGroup>
|
||||||
{isAdmin() && (
|
{isAdmin() && (
|
||||||
<>
|
<>
|
||||||
<CommandSeparator />
|
<CommandSeparator className="mb-1.5" />
|
||||||
<CommandGroup heading="Admin">
|
<CommandGroup heading="Admin">
|
||||||
<CommandItem
|
<CommandItem
|
||||||
keywords={['pocketbase']}
|
keywords={['pocketbase']}
|
||||||
|
Reference in New Issue
Block a user