Files
StarPilot/openpilot/starpilot/galaxy/web/js/tools.js
T
Prabhaav Pillai 856320d333 (Another fourth) round of Galaxy UI bug fixes
Improved UI consistency and responsiveness
added Playwright tests
implemented toggle preference backup/restore with validation and unit tests
moved navigation styling and state management.
2026-10-07 20:28:47 -04:00

25 lines
809 B
JavaScript

import { navigate } from "./router.js"
import { MenuTile } from "./menu-tile.js"
export const Tools = {
name: "Tools",
components: { MenuTile },
props: { tools: { type: Array, required: true }, mode: { type: String, required: true } },
methods: {
open(tool) { navigate(tool.path) },
availability(tool) {
if (this.mode === "local") return ""
return tool.availability === "partial-preview" ? "Sample available" : "Connect to your device to use this tool"
},
},
template: `
<div class="gx-view">
<h2>Tools</h2>
<div class="gx-grid">
<MenuTile v-for="tool in tools" :key="tool.path" :icon="tool.icon" :title="tool.name"
:description="tool.description" :availability="availability(tool)" @select="open(tool)" />
</div>
</div>
`,
}