From aaaf26861d906a3039f06e674267de9829453b65 Mon Sep 17 00:00:00 2001 From: Marcus Kida Date: Tue, 10 Feb 2026 13:43:17 +0100 Subject: [PATCH] Make route button inactive if no start/destination entered --- static/app.js | 7 +++++++ static/index.html | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/static/app.js b/static/app.js index 6475f10..7cc4926 100644 --- a/static/app.js +++ b/static/app.js @@ -581,6 +581,7 @@ routeListEl.innerHTML = ""; fromInput.value = ""; toInput.value = ""; + updateRouteBtn(); fetchRepeaters(); } @@ -862,6 +863,12 @@ } }); + function updateRouteBtn() { + routeBtn.disabled = !fromInput.value.trim() || !toInput.value.trim(); + } + fromInput.addEventListener("input", updateRouteBtn); + toInput.addEventListener("input", updateRouteBtn); + routeBtn.addEventListener("click", findRoute); clearBtn.addEventListener("click", clearRoute); diff --git a/static/index.html b/static/index.html index f3856dd..8cf9e46 100644 --- a/static/index.html +++ b/static/index.html @@ -44,7 +44,7 @@
- +