mirror of
https://github.com/furyhawk/bus_sg_app.git
synced 2026-07-21 18:26:55 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b98c9496bf | ||
|
|
aa5d9cad26 | ||
|
|
e82ed2fdfd |
@@ -6,6 +6,12 @@ A lightweight bus transport web app that uses the gateway OpenAPI contract at:
|
||||
|
||||
The frontend is built with SvelteKit. It dynamically loads transport endpoints from the OpenAPI spec and calls them through a SvelteKit server hook proxy.
|
||||
|
||||
## Live demo
|
||||
|
||||
Access the app at https://bus.furyhawk.lol/ or scan the QR code below:
|
||||
|
||||
[](https://bus.furyhawk.lol/)
|
||||
|
||||
## Screenshot
|
||||
|
||||

|
||||
@@ -18,7 +24,7 @@ The frontend is built with SvelteKit. It dynamically loads transport endpoints f
|
||||
|
||||
## Run
|
||||
|
||||
1. Ensure your API gateway is running at http://localhost:8067.
|
||||
1. Ensure your API gateway is running at http://localhost:8067. Refer to https://github.com/furyhawk/lta_datamall_api.git
|
||||
2. Install dependencies:
|
||||
|
||||
```bash
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 975 B |
@@ -430,7 +430,7 @@
|
||||
|
||||
async function selectBusStop(stop, loadArrivals = false) {
|
||||
selectedStop = stop;
|
||||
locationMessage = `Selected stop: ${stop.description} (${stop.code})`;
|
||||
locationMessage = `Selected stop: <strong>${escapeHtml(stop.description)}</strong> (${stop.code})`;
|
||||
await updateMap();
|
||||
if (loadArrivals) {
|
||||
await runArrival();
|
||||
@@ -444,7 +444,7 @@
|
||||
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();
|
||||
setStatus("Location Ready", "ok");
|
||||
|
||||
@@ -543,7 +543,7 @@
|
||||
{/if}
|
||||
<span class="visually-hidden">{locating ? "Locating..." : "Use Current Location"}</span>
|
||||
</button>
|
||||
<p class="hint">{locationMessage}</p>
|
||||
<p class="hint">{@html locationMessage}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user