mirror of
https://github.com/fankes/beszel.git
synced 2025-10-20 02:09:28 +08:00
user creation and other updates
This commit is contained in:
@@ -1,6 +1,13 @@
|
||||
'use client'
|
||||
|
||||
import { Database, Github, Home, Server } from 'lucide-react'
|
||||
import {
|
||||
Database,
|
||||
DatabaseBackupIcon,
|
||||
Github,
|
||||
LayoutDashboard,
|
||||
MailIcon,
|
||||
Server,
|
||||
} from 'lucide-react'
|
||||
|
||||
import {
|
||||
CommandDialog,
|
||||
@@ -16,7 +23,7 @@ import { useEffect, useState } from 'react'
|
||||
import { useStore } from '@nanostores/react'
|
||||
import { $servers, navigate } from '@/lib/stores'
|
||||
|
||||
export default function () {
|
||||
export default function CommandPalette() {
|
||||
const [open, setOpen] = useState(false)
|
||||
const servers = useStore($servers)
|
||||
|
||||
@@ -39,24 +46,16 @@ export default function () {
|
||||
<CommandEmpty>No results found.</CommandEmpty>
|
||||
<CommandGroup heading="Suggestions">
|
||||
<CommandItem
|
||||
keywords={['home']}
|
||||
onSelect={() => {
|
||||
navigate('/')
|
||||
setOpen((open) => !open)
|
||||
}}
|
||||
>
|
||||
<Home className="mr-2 h-4 w-4" />
|
||||
<span>Home</span>
|
||||
<LayoutDashboard className="mr-2 h-4 w-4" />
|
||||
<span>Dashboard</span>
|
||||
<CommandShortcut>Page</CommandShortcut>
|
||||
</CommandItem>
|
||||
<CommandItem
|
||||
onSelect={() => {
|
||||
window.location.href = '/_/#/collections?collectionId=2hz5ncl8tizk5nx'
|
||||
}}
|
||||
>
|
||||
<Database className="mr-2 h-4 w-4" />
|
||||
<span>Admin UI</span>
|
||||
<CommandShortcut>PocketBase</CommandShortcut>
|
||||
</CommandItem>
|
||||
<CommandItem
|
||||
onSelect={() => {
|
||||
window.location.href = 'https://github.com/henrygd'
|
||||
@@ -79,9 +78,42 @@ export default function () {
|
||||
>
|
||||
<Server className="mr-2 h-4 w-4" />
|
||||
<span>{server.name}</span>
|
||||
<CommandShortcut>{server.host}</CommandShortcut>
|
||||
</CommandItem>
|
||||
))}
|
||||
</CommandGroup>
|
||||
<CommandSeparator />
|
||||
<CommandGroup heading="Admin">
|
||||
<CommandItem
|
||||
onSelect={() => {
|
||||
window.location.href = '/_/#/collections?collectionId=2hz5ncl8tizk5nx'
|
||||
}}
|
||||
>
|
||||
<Database className="mr-2 h-4 w-4" />
|
||||
<span>PocketBase</span>
|
||||
<CommandShortcut>Admin</CommandShortcut>
|
||||
</CommandItem>
|
||||
<CommandItem
|
||||
keywords={['email']}
|
||||
onSelect={() => {
|
||||
window.location.href = '/_/#/settings/backups'
|
||||
}}
|
||||
>
|
||||
<DatabaseBackupIcon className="mr-2 h-4 w-4" />
|
||||
<span>Database backups</span>
|
||||
<CommandShortcut>Admin</CommandShortcut>
|
||||
</CommandItem>
|
||||
<CommandItem
|
||||
keywords={['email']}
|
||||
onSelect={() => {
|
||||
window.location.href = '/_/#/settings/mail'
|
||||
}}
|
||||
>
|
||||
<MailIcon className="mr-2 h-4 w-4" />
|
||||
<span>SMTP settings</span>
|
||||
<CommandShortcut>Admin</CommandShortcut>
|
||||
</CommandItem>
|
||||
</CommandGroup>
|
||||
</CommandList>
|
||||
</CommandDialog>
|
||||
)
|
||||
|
Reference in New Issue
Block a user