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
+11
-11
@@ -12,8 +12,8 @@
|
||||
<link href="./_shared.css" rel="stylesheet">
|
||||
<link href="./vendor/leaflet/leaflet.css" rel="stylesheet">
|
||||
<link href="./map.css" rel="stylesheet">
|
||||
<meta name="app-version" content="2026.09.27.94">
|
||||
<link rel="icon" type="image/png" href="../.image/icons/minibus-512x512.png?v=2026.09.27.94">
|
||||
<meta name="app-version" content="2026.09.27.98">
|
||||
<link rel="icon" type="image/png" href="../.image/icons/minibus-512x512.png?v=2026.09.27.98">
|
||||
<style>
|
||||
.mu-card.empty { width: 100%; padding: 16px; text-align: center; color: #6f7b95; background: #fff7fb; border: 1px dashed #f4c7df; }
|
||||
a.mu-card { text-decoration: none; color: inherit; display: block; }
|
||||
@@ -339,7 +339,7 @@
|
||||
<meta name="theme-color" content="#7a4cc0">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="default">
|
||||
<link rel="apple-touch-icon" href="../.image/icons/minibus-192x192.png?v=2026.09.27.94">
|
||||
<link rel="apple-touch-icon" href="../.image/icons/minibus-192x192.png?v=2026.09.27.98">
|
||||
<script src="./imageurl.js" defer></script>
|
||||
<script src="./pwa.js" defer></script>
|
||||
<script src="./i18n.js" defer></script>
|
||||
@@ -443,14 +443,14 @@
|
||||
|
||||
<header class="mu-topbar">
|
||||
<div class="mu-container mu-topbar-inner">
|
||||
<a class="mu-brand" href="#/" aria-label="Atroute — หน้าแรก">
|
||||
<img class="mu-logo-img" src="../.image/icons/minibus-512x512.png?v=2026.09.27.94" alt="Atroute logo" width="44" height="44" decoding="async">
|
||||
<a class="mu-brand" href="#/" aria-label="Atroute — หน้าแรก" data-i18n-attr="aria-label:aria.brandHome">
|
||||
<img class="mu-logo-img" src="../.image/icons/minibus-512x512.png?v=2026.09.27.98" alt="Atroute logo" width="44" height="44" decoding="async">
|
||||
<span>
|
||||
<span class="mu-brand-title">Atroute</span>
|
||||
<span class="mu-brand-subtitle" data-i18n="brand.subtitle">สถานีขนส่งผู้โดยสารจังหวัดอ่างทอง</span>
|
||||
</span>
|
||||
</a>
|
||||
<nav class="mu-nav" aria-label="เมนูหลัก">
|
||||
<nav class="mu-nav" aria-label="เมนูหลัก" data-i18n-attr="aria-label:aria.mainMenu">
|
||||
<a class="active" href="#/" data-i18n="nav.home">หน้าแรก</a>
|
||||
<a href="#/stops" data-i18n="nav.stops">ป้ายหยุดรถ</a>
|
||||
<a href="#/routes" data-i18n="nav.routes">รายละเอียดสายรถ</a>
|
||||
@@ -459,7 +459,7 @@
|
||||
<a href="#/credits" data-i18n="nav.credits">เครดิต</a>
|
||||
</nav>
|
||||
<details class="mu-menu" id="topnav">
|
||||
<summary class="mu-menu-btn" aria-label="เมนูหลัก" aria-haspopup="true">
|
||||
<summary class="mu-menu-btn" aria-label="เมนูหลัก" data-i18n-attr="aria-label:aria.mainMenu" aria-haspopup="true">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><line x1="4" x2="20" y1="6" y2="6"/><line x1="4" x2="20" y1="12" y2="12"/><line x1="4" x2="20" y1="18" y2="18"/></svg>
|
||||
</summary>
|
||||
<div class="mu-menu-panel" role="menu">
|
||||
@@ -472,7 +472,7 @@
|
||||
<a href="#/credits" data-i18n="nav.credits" role="menuitem">เครดิต</a>
|
||||
</div>
|
||||
</details>
|
||||
<div class="mu-lang-switch" role="group" aria-label="ภาษา / Language">
|
||||
<div class="mu-lang-switch" role="group" aria-label="ภาษา / Language" data-i18n-attr="aria-label:aria.langSwitch">
|
||||
<button type="button" class="mu-lang-btn" data-i18n-switch="th">ไทย</button>
|
||||
<button type="button" class="mu-lang-btn" data-i18n-switch="en">EN</button>
|
||||
</div>
|
||||
@@ -487,7 +487,7 @@
|
||||
<div class="mu-footer-grid">
|
||||
<div class="mu-footer-brand">
|
||||
<div class="mu-footer-brand-row">
|
||||
<img src="../.image/icons/minibus-512x512.png?v=2026.09.27.94" alt="Atroute">
|
||||
<img src="../.image/icons/minibus-512x512.png?v=2026.09.27.98" alt="Atroute">
|
||||
<div>
|
||||
<strong>Atroute</strong>
|
||||
<span data-i18n="brand.subtitle">สถานีขนส่งผู้โดยสารจังหวัดอ่างทอง</span>
|
||||
@@ -523,9 +523,9 @@
|
||||
|
||||
<div class="mu-footer-bottom">
|
||||
<p>© 2026 Atroute</p>
|
||||
<span class="mu-visitor" title="จำนวนผู้เข้าชมเว็บไซต์">
|
||||
<span class="mu-visitor" title="จำนวนผู้เข้าชมเว็บไซต์" data-i18n-attr="title:visitors.tip">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"/><circle cx="12" cy="12" r="3"/></svg>
|
||||
<span>ผู้เข้าชม</span>
|
||||
<span data-i18n="visitors.label">ผู้เข้าชม</span>
|
||||
<strong id="visitor-count">12,834</strong>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user