diff --git a/starpilot/system/the_galaxy/assets/components/recordings/dashcam_routes.js b/starpilot/system/the_galaxy/assets/components/recordings/dashcam_routes.js index b89ae66c7..142dd616a 100644 --- a/starpilot/system/the_galaxy/assets/components/recordings/dashcam_routes.js +++ b/starpilot/system/the_galaxy/assets/components/recordings/dashcam_routes.js @@ -110,6 +110,14 @@ function refresh() { return fetchRoutes() } +function changeSortOrder(event) { + const sortOrder = String(event.target.value || "") + if (!["newest", "oldest", "longest", "shortest"].includes(sortOrder)) return + state.sortOrder = sortOrder + // Replacing the array forces the keyed route templates to move immediately. + state.routes = [...state.routes] +} + if (!isGalaxyTunnel()) refresh() function openDialog(htmlString) { @@ -825,7 +833,7 @@ export function RouteRecordings() {