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:
1 parent
74d605f1c4
commit
750b4a2ea8
25 files changed
+426
-180
No files matched your search
+10
-10
@@ -162,17 +162,17 @@
|
||||
|
||||
<main class="mu-page">
|
||||
<div class="mu-container">
|
||||
<p class="mu-breadcrumb"><a href="#/">หน้าแรก</a>/ <span data-i18n="nav.routes">รายละเอียดสายรถ</span></p>
|
||||
<p class="mu-breadcrumb"><a href="#/" data-i18n="nav.home">หน้าแรก</a>/ <span data-i18n="nav.routes">รายละเอียดสายรถ</span></p>
|
||||
<h1 class="mu-page-title"><span class="mu-route-chip" id="route-chip"></span> <span id="route-title"></span></h1>
|
||||
|
||||
<!-- ตัวเลือกสายรถ: เติมจาก resource/data/routes.json (busDetail.init.js) -->
|
||||
<form class="mu-toolbar" onsubmit="return false">
|
||||
<select aria-label="เลือกสายรถ" id="route-select"></select>
|
||||
<select aria-label="เลือกสายรถ" data-i18n-attr="aria-label:route.selectRoute" id="route-select"></select>
|
||||
</form>
|
||||
|
||||
<!-- ============ รถประจำสาย + ติดต่อผู้ประกอบการ (การ์ดเดียว) ============ -->
|
||||
<!-- รูปรถ/คำอธิบาย/QR/เบอร์โทร: เติมจาก resource/data/captions/caption<รหัสสาย>.json + routes.json -->
|
||||
<section class="mu-vehicle-card" aria-label="รถประจำสายและติดต่อผู้ประกอบการ" id="route-vehicle-card">
|
||||
<section class="mu-vehicle-card" aria-label="รถประจำสายและติดต่อผู้ประกอบการ" data-i18n-attr="aria-label:aria.vehicleSection" id="route-vehicle-card">
|
||||
<img id="route-vehicle-img" alt="" loading="lazy" decoding="async" hidden>
|
||||
<div class="meta">
|
||||
<p class="label" data-i18n="route.vehicle">รถประจำสาย</p>
|
||||
@@ -183,25 +183,25 @@
|
||||
</section>
|
||||
|
||||
<!-- ============ สรุปเส้นทาง ============ -->
|
||||
<section class="mu-summary" aria-label="สรุปเส้นทาง">
|
||||
<section class="mu-summary" aria-label="สรุปเส้นทาง" data-i18n-attr="aria-label:aria.routeSummary">
|
||||
<div class="mu-container">
|
||||
<div class="mu-summary-grid">
|
||||
<div class="mu-stat tag-purple"><h3 id="stat-stops">–</h3><p>จุดจอดหลัก</p></div>
|
||||
<div class="mu-stat tag-sky"><h3 id="stat-provinces">–</h3><p>จังหวัดที่ผ่าน</p></div>
|
||||
<div class="mu-stat tag-mint"><h3 id="stat-trips">–</h3><p>รอบต่อวัน</p></div>
|
||||
<div class="mu-stat tag-pink"><h3 id="stat-next">–</h3><p>รอบถัดไป</p></div>
|
||||
<div class="mu-stat tag-purple"><h3 id="stat-stops">–</h3><p data-i18n="route.kpiStops">จุดจอดหลัก</p></div>
|
||||
<div class="mu-stat tag-sky"><h3 id="stat-provinces">–</h3><p data-i18n="route.kpiProvince">จังหวัดที่ผ่าน</p></div>
|
||||
<div class="mu-stat tag-mint"><h3 id="stat-trips">–</h3><p data-i18n="route.kpiTrips">รอบต่อวัน</p></div>
|
||||
<div class="mu-stat tag-pink"><h3 id="stat-next">–</h3><p data-i18n="route.kpiNext">รอบถัดไป</p></div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- ============ แผนที่เส้นทาง (Leaflet + GeoJSON จาก QGIS) ============ -->
|
||||
<section class="mu-zone" aria-label="แผนที่เส้นทาง">
|
||||
<section class="mu-zone" aria-label="แผนที่เส้นทาง" data-i18n-attr="aria-label:aria.routeMap">
|
||||
<div class="mu-zone-head">
|
||||
<span class="mu-zone-tag tag-sky" data-i18n="route.mapTitle">เส้นทางเดินรถ</span>
|
||||
<p class="mu-zone-desc" data-i18n="route.mapDesc">เส้นทางจริงจากข้อมูล GIS · ป้ายหยุดรถตามเส้นทาง</p>
|
||||
</div>
|
||||
<div class="mu-map-card">
|
||||
<div class="at-map" id="route-map" role="region" aria-label="แผนที่เส้นทางเดินรถ"></div>
|
||||
<div class="at-map" id="route-map" role="region" aria-label="แผนที่เส้นทางเดินรถ" data-i18n-attr="aria-label:aria.routeGeom"></div>
|
||||
<p class="at-map-caption" id="route-map-caption"></p>
|
||||
<div class="at-km-wrap" hidden>
|
||||
<h3><span data-i18n="map.alongRoute">จุดจอดตามเส้นทาง (กม. จากต้นทาง)</span></h3>
|
||||
|
||||
Reference in new issue
Block a user