fix(Settings): hide AI Assistant from navigation until installed

This commit is contained in:
Jake Turner 2026-03-09 05:13:06 +00:00 committed by Jake Turner
parent 5d3c659d05
commit be25408fe7
2 changed files with 16 additions and 1 deletions

View File

@ -1,5 +1,17 @@
# Release Notes
## Unreleased
### Features
- **AI Assistant**: Added improved user guidance for troubleshooting GPU pass-through issues
- **Settings**: Nomad now automatically performs nightly checks for available app updates, and users can select and apply updates from the Apps page in Settings
### Bug Fixes
- **Settings**: Fixed an issue where the AI Assistant settings page would be shown in navigation even if the AI Assistant was not installed, thus causing 404 errors when clicked
- **Security**: Path traversal and SSRF mitigations
### Improvements
## Version 1.28.0 - March 5, 2026
### Features

View File

@ -13,12 +13,15 @@ import {
import { usePage } from '@inertiajs/react'
import StyledSidebar from '~/components/StyledSidebar'
import { getServiceLink } from '~/lib/navigation'
import useServiceInstalledStatus from '~/hooks/useServiceInstalledStatus'
import { SERVICE_NAMES } from '../../constants/service_names'
export default function SettingsLayout({ children }: { children: React.ReactNode }) {
const { aiAssistantName } = usePage<{ aiAssistantName: string }>().props
const aiAssistantInstallStatus = useServiceInstalledStatus(SERVICE_NAMES.OLLAMA)
const navigation = [
{ name: aiAssistantName, href: '/settings/models', icon: IconWand, current: false },
...(aiAssistantInstallStatus.isInstalled ? [{ name: aiAssistantName, href: '/settings/models', icon: IconWand, current: false }] : []),
{ name: 'Apps', href: '/settings/apps', icon: IconTerminal2, current: false },
{ name: 'Benchmark', href: '/settings/benchmark', icon: IconChartBar, current: false },
{ name: 'Content Explorer', href: '/settings/zim/remote-explorer', icon: IconZoom, current: false },