mock: three search tabs - stop code, place name, near me

- busStop.html: added the third tab (data-mode=near) and its own panel with
  the location button, hint and result area; removed the near button from the
  toolbar and deleted the old on-screen numpad markup
- busStop.search.js: MODE_NEAR in setMode, disables the other panels, hides
  the stop list while ranked results are shown, skips filtering in that mode,
  and removed the dead initNumpad code
- security gate: the tab is revealed only when isSecureContext and
  navigator.geolocation exist; otherwise it stays hidden and the mode is
  refused
- map.js: re-enable the button after a successful lookup
- i18n: stops.modeNear / nearCta / nearHint
- bump SW version to 2026.09.27.98

Verified on localhost:8090 - three tabs, near mode shows a map with 8 ranked
stops, button re-enables and works again, switching back restores the list;
with isSecureContext forced false the tab is hidden and unselectable.
This commit is contained in:
Bkk1234 committed 2026-10-24 00:11:56 +07:00
1 parent 74d605f1c4
commit 750b4a2ea8
25 files changed
+426 -180

No files matched your search

+3 -3
View File
@@ -436,7 +436,7 @@
</div>
</section>
<section class="mu-nearby" id="stop-nearby" aria-label="สถานที่ใกล้เคียง" hidden>
<section class="mu-nearby" id="stop-nearby" aria-label="สถานที่ใกล้เคียง" data-i18n-attr="aria-label:stop.nearby" hidden>
<h2><span data-i18n="stop.nearby">ใกล้เคียงป้าย</span></h2>
<p class="sub" id="stop-nearby-sub"></p>
<div class="mu-nearby-grid" id="stop-nearby-grid"></div>
@@ -450,7 +450,7 @@
<div class="mu-card-panel">
<h2><span data-i18n="stop.routes">สายรถที่ผ่านจุดนี้</span></h2>
<div class="mu-route-tools">
<input id="mu-route-filter" class="mu-route-filter" type="text" placeholder="ค้นหาสายรถหรือปลายทาง" data-i18n-attr="placeholder:stop.searchRoute,aria-label:stop.searchRoute">
<input id="mu-route-filter" class="mu-route-filter" type="text" placeholder="ค้นหาสายรถหรือปลายทาง" data-i18n-attr="placeholder:stop.searchRoute" data-i18n-attr="placeholder:stop.searchRoute,aria-label:stop.searchRoute">
<span class="mu-route-count" id="mu-route-count"></span>
</div>
<ul class="mu-list mu-stop-list" id="stop-routes"></ul>
@@ -458,7 +458,7 @@
<aside class="mu-card-panel">
<h2><span data-i18n="stop.mapInfo">แผนที่และข้อมูลป้าย</span></h2>
<div class="at-map" id="stop-map" role="region" aria-label="แผนที่เส้นทางที่ผ่านป้ายนี้"></div>
<div class="at-map" id="stop-map" role="region" aria-label="แผนที่เส้นทางที่ผ่านป้ายนี้" data-i18n-attr="aria-label:aria.stopRoutesMap"></div>
<p class="at-map-caption" id="stop-map-caption"></p>
<div id="stop-chips" style="display:flex; flex-wrap:wrap; gap:8px; margin-top:14px;"></div>
</aside>