Port the Stitch sensing-options design to /sensors with route-based nav, bundled Material Symbols icons, and honest privacy labels in place of mock certifications and scores.
99 lines
3.3 KiB
TypeScript
99 lines
3.3 KiB
TypeScript
const useMock =
|
|
(process.env.NUXT_PUBLIC_USE_MOCK ?? process.env.NUXT_USE_MOCK ?? '').toLowerCase() === 'true' ||
|
|
process.env.NUXT_PUBLIC_USE_MOCK === '1' ||
|
|
process.env.NUXT_USE_MOCK === '1'
|
|
|
|
export default defineNuxtConfig({
|
|
compatibilityDate: '2026-11-01',
|
|
ssr: true,
|
|
modules: ['@nuxt/icon'],
|
|
css: ['~/assets/css/tailwind.css'],
|
|
postcss: {
|
|
plugins: {
|
|
tailwindcss: {},
|
|
autoprefixer: {},
|
|
},
|
|
},
|
|
devtools: { enabled: false },
|
|
icon: {
|
|
mode: 'svg',
|
|
serverBundle: { collections: ['material-symbols'] },
|
|
clientBundle: {
|
|
icons: [
|
|
'material-symbols:menu',
|
|
'material-symbols:close',
|
|
'material-symbols:arrow-forward',
|
|
'material-symbols:visibility-outline',
|
|
'material-symbols:verified-user',
|
|
'material-symbols:sensors',
|
|
'material-symbols:hub-outline',
|
|
'material-symbols:bolt-outline',
|
|
'material-symbols:speed',
|
|
'material-symbols:sync',
|
|
'material-symbols:check-circle',
|
|
'material-symbols:sunny',
|
|
'material-symbols:partly-cloudy-day',
|
|
'material-symbols:calendar-month',
|
|
'material-symbols:map-outline',
|
|
'material-symbols:psychology',
|
|
'material-symbols:dns',
|
|
'material-symbols:shield-lock',
|
|
'material-symbols:warning',
|
|
'material-symbols:tune',
|
|
'material-symbols:cancel',
|
|
'material-symbols:stars',
|
|
'material-symbols:videocam-off',
|
|
'material-symbols:wifi-off',
|
|
'material-symbols:functions',
|
|
'material-symbols:verified',
|
|
'material-symbols:shield-with-heart',
|
|
],
|
|
scan: true,
|
|
},
|
|
fallbackToApi: false,
|
|
},
|
|
runtimeConfig: {
|
|
// Server-side Go API. K8s sets NUXT_API_INTERNAL_BASE=http://api:8080.
|
|
apiBase:
|
|
process.env.NUXT_API_INTERNAL_BASE ??
|
|
process.env.NUXT_API_BASE ??
|
|
process.env.NUXT_PUBLIC_API_BASE ??
|
|
'http://localhost:8080',
|
|
apiTimeoutMs: Number(process.env.NUXT_API_TIMEOUT_MS ?? 8000),
|
|
// Explicit dev fallback. The default is the real Go API.
|
|
useMock,
|
|
// Server-only control credentials for POST /api/scenario and /api/train.
|
|
controlUser: process.env.CONTROL_USER ?? process.env.NUXT_CONTROL_USER ?? '',
|
|
controlPass: process.env.CONTROL_PASS ?? process.env.NUXT_CONTROL_PASS ?? '',
|
|
controlToken: process.env.CONTROL_TOKEN ?? process.env.NUXT_CONTROL_TOKEN ?? '',
|
|
public: {
|
|
// Browser never calls Go directly; this is for display/future SSE wiring.
|
|
apiBase: process.env.NUXT_PUBLIC_API_BASE ?? '',
|
|
useMock,
|
|
demoNow: process.env.NUXT_PUBLIC_DEMO_NOW ?? '2026-11-14T08:12:00Z',
|
|
},
|
|
},
|
|
app: {
|
|
head: {
|
|
htmlAttrs: { lang: 'en', class: 'dark' },
|
|
title: 'Pulse Engine · SIT',
|
|
meta: [
|
|
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
|
|
{ name: 'theme-color', content: '#081723' },
|
|
],
|
|
link: [
|
|
{ rel: 'preconnect', href: 'https://fonts.googleapis.com' },
|
|
{ rel: 'preconnect', href: 'https://fonts.gstatic.com', crossorigin: '' },
|
|
{
|
|
rel: 'stylesheet',
|
|
href: 'https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap',
|
|
},
|
|
{ rel: 'icon', type: 'image/svg+xml', href: '/schwarz-digits-logo.svg' },
|
|
],
|
|
},
|
|
},
|
|
nitro: {
|
|
preset: 'node-server',
|
|
},
|
|
})
|