UI: Refine 'no buses available' flow and fix decimal bug

This commit is contained in:
2026-03-01 22:06:42 -05:00
parent e0284f7518
commit fa8551b19d
3 changed files with 28 additions and 11 deletions

View File

@ -329,6 +329,13 @@ const sonarHtml = `
`;
// Watch for route selection changes
// Watch for ETA loading to automatically show ETACard if no buses are available
watch([etaCargando, () => busesActivos.value.length], ([loading, count]) => {
if (!loading && count === 0 && routeStore.selectedRouteId && routeStore.wasSelectedFromMap) {
showETACard.value = true;
}
});
watch(() => routeStore.selectedRouteId, (routeId) => {
if (routeId) {
if (routeStore.wasSelectedFromMap) {
@ -393,7 +400,7 @@ function handleImageError(event: Event) {
>
<template #extra-triggers>
<ArrivalBanner
:is-visible="!!(paradaCercana && routeStore.selectedRouteId && !isBannerClosing && routeStore.wasSelectedFromMap)"
:is-visible="!!(paradaCercana && routeStore.selectedRouteId && !isBannerClosing && routeStore.wasSelectedFromMap && busesActivos.length > 0)"
:stop-name="paradaCercana?.name || ''"
:is-loading="etaCargando"
:has-active-buses="busesActivos.length > 0"