import {
IconBook,
IconBrandWikipedia,
IconCalculator,
IconHelp,
IconMapRoute,
IconMessageCircleSearch,
IconSettings,
IconWifiOff,
} from '@tabler/icons-react'
import { Head, Link } from '@inertiajs/react'
import BouncingLogo from '~/components/BouncingLogo'
import AppLayout from '~/layouts/AppLayout'
import { getServiceLink } from '~/lib/navigation'
const NAV_ITEMS = [
{
label: 'AI Chat',
to: '/ai-chat',
description: 'Chat with local AI models',
icon: ,
},
{
label: 'Calculators',
to: '/calculators',
description: 'Perform various calculations',
icon: ,
},
{
label: 'Ebooks',
to: '/ebooks',
description: 'Explore our collection of eBooks',
icon: ,
},
{
label: 'Kiwix (Offline Browser)',
to: '/kiwix',
description: 'Access offline content with Kiwix',
icon: ,
},
{
label: 'OpenStreetMap',
to: '/openstreetmap',
description: 'View maps and geospatial data',
icon: ,
},
{
label: 'Wikipedia',
to: '/wikipedia',
description: 'Browse an offline Wikipedia snapshot',
icon: ,
},
]
const STATIC_ITEMS = [
{
label: 'Help',
to: '/help',
description: 'Read Project N.O.M.A.D. manuals and guides',
icon: ,
installed: true,
},
{
label: 'Settings',
to: '/settings',
description: 'Configure your N.O.M.A.D. settings',
icon: ,
installed: true,
},
]
export default function Home(props: {
system: {
services: { id: number; service_name: string; installed: boolean; ui_location: string }[]
}
}) {
const items = []
props.system.services.map((service) => {
items.push({
label: service.service_name,
to: getServiceLink(service.ui_location),
description: `Access ${service.service_name} content`,
icon: ,
installed: service.installed,
})
})
items.push(...STATIC_ITEMS)
return (
)
}