Skip to main content

Adding a Standalone Page

1

Create the Vue component

Add a new .vue file in pkg/pastures/pages/. Use the standard template:
2

Register the route in index.ts

Import the component and add a route entry inside the plugin() function:
3

Add a virtualType in product.ts

Register the sidebar entry:
4

Add to basicType array

Include the new type in the appropriate basicType() call so it appears in the sidebar section:
5

Set sidebar position with weightType

Control where the entry appears in the sidebar. Higher weight = higher position.
6

Add demo data

If your page calls engineFetch, add a path match in lib/demoResponses.ts:
If your page uses inline fetch, define a DEMO_* constant in the component and check isGlobalDemoMode() in onMounted (as shown in step 1).

Adding a Tab to an Existing Tabbed Page

Tabbed container pages (OperationsPage, HarvesterPage, InfrastructurePage, AIAgentsPage) render child components as tabs.
1

Create the tab component

Create your .vue file in pages/ as above, but add support for the embedded prop:
When embedded is true, the component hides its own header since the parent tabbed page provides the tab bar.
2

Import and add to the tabs array

In the parent tabbed page (e.g., OperationsPage.vue), import the new component and add it to the tabs configuration:
3

Add demo data

Follow the same demo data pattern described above for standalone pages.
You do not need to register a separate route or sidebar entry for tabs — the parent container page handles routing.