Files
StarPilot/openpilot/starpilot/galaxy/web/js/tools.js
T
Prabhaav Pillai ee83b3010a (Another seventh) round of Galaxy UI bug fixes
Improved consistency across Galaxy pages
Reworked the Model Manager layout, filters, downloads, randomizer, and Jetlink controls.
Improved vehicle selection and the Galaxy pairing and installation flow.
Fixed settings-row rendering, Android Auto upload timeouts, and Sentry event ID validation.
Updated tests for current UI behavior - all 102 JavaScript and 797 Python Galaxy tests pass.
2026-10-22 03:39:05 -04:00

25 lines
843 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" || tool.availability === "always") 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>
`,
}