mirror of
https://github.com/furyhawk/bus_sg_app.git
synced 2026-07-21 02:06:48 +00:00
feat: enhance location message formatting with HTML for better visibility
This commit is contained in:
@@ -430,7 +430,7 @@
|
|||||||
|
|
||||||
async function selectBusStop(stop, loadArrivals = false) {
|
async function selectBusStop(stop, loadArrivals = false) {
|
||||||
selectedStop = stop;
|
selectedStop = stop;
|
||||||
locationMessage = `Selected stop: ${stop.description} (${stop.code})`;
|
locationMessage = `Selected stop: <strong>${escapeHtml(stop.description)}</strong> (${stop.code})`;
|
||||||
await updateMap();
|
await updateMap();
|
||||||
if (loadArrivals) {
|
if (loadArrivals) {
|
||||||
await runArrival();
|
await runArrival();
|
||||||
@@ -444,7 +444,7 @@
|
|||||||
throw new Error("No nearby bus stop found.");
|
throw new Error("No nearby bus stop found.");
|
||||||
}
|
}
|
||||||
|
|
||||||
locationMessage = `Nearest stop found: ${selectedStop.description} (${selectedStop.code}). Tap another stop in the list or map.`;
|
locationMessage = `Nearest stop found: <strong>${escapeHtml(selectedStop.description)}</strong> (${selectedStop.code}). Tap another stop in the list or map.`;
|
||||||
await updateMap();
|
await updateMap();
|
||||||
setStatus("Location Ready", "ok");
|
setStatus("Location Ready", "ok");
|
||||||
|
|
||||||
@@ -543,7 +543,7 @@
|
|||||||
{/if}
|
{/if}
|
||||||
<span class="visually-hidden">{locating ? "Locating..." : "Use Current Location"}</span>
|
<span class="visually-hidden">{locating ? "Locating..." : "Use Current Location"}</span>
|
||||||
</button>
|
</button>
|
||||||
<p class="hint">{locationMessage}</p>
|
<p class="hint">{@html locationMessage}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user