diff --git a/frontend/src/views/AppLayout.vue b/frontend/src/views/AppLayout.vue index 24f0cd6..dd247a7 100644 --- a/frontend/src/views/AppLayout.vue +++ b/frontend/src/views/AppLayout.vue @@ -24,10 +24,10 @@ - - Shopfloor Dashboard - TV Slideshow - Displays + Shopfloor Dashboard + TV Slideshow + Parts Kiosk Settings @@ -111,11 +111,20 @@ import { currentTheme, toggleTheme } from '../stores/theme' import { dashboardApi, notificationsApi } from '../api' import { getFacilityName, getSiteLogo, getServicenowUrls } from '../utils/siteSettings' import { withBase } from '../utils/basePath' -import { isPluginEnabled } from '../composables/enabledPlugins' const router = useRouter() const route = useRoute() const authStore = useAuthStore() + +// The Displays links are hardcoded (not plugin-driven nav), so gate each by +// whether its route was actually staged into THIS build. A lean site without +// slides / printedparts must not show a TV Slideshow / Parts Kiosk link that +// dead-ends on a blank page. Route existence is the true "is it in this build" +// test - more reliable than plugin-enabled state, which a copied registry can +// report for a plugin that was never staged. +const stagedRoutePaths = new Set(router.getRoutes().map(r => r.path)) +const hasRoute = (path) => stagedRoutePaths.has(path) +const showDisplays = ['/shopfloor', '/tv', '/parts-kiosk'].some(hasRoute) const routeViewKey = computed(() => route.path.startsWith('/settings') ? '/settings' : route.path )