UI: Refine 'no buses available' flow and fix decimal bug
This commit is contained in:
@ -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"
|
||||
|
||||
Reference in New Issue
Block a user