From f754cffe58ae91e1eac2641634686023c919bed7 Mon Sep 17 00:00:00 2001 From: Bkk1234 Date: Sat, 24 Oct 2026 00:14:32 +0700 Subject: [PATCH] stops: fit three search tabs on narrow screens, bump SW cache version The third tab made the Thai labels wrap on 375px. The tab bar now stretches its children so all three share the same height, uses centred two-line labels with a 56px minimum, and keeps zero horizontal overflow at 360/375/414px. sw.js VERSION 1.0.0 -> 1.0.1 so browsers drop the cached shell and pick up the three-tab markup without a manual cache clear. --- frontend/public/sw.js | 2 +- frontend/src/styles/pages/stops.css | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/frontend/public/sw.js b/frontend/public/sw.js index 4a8784b..8c5022c 100644 --- a/frontend/public/sw.js +++ b/frontend/public/sw.js @@ -15,7 +15,7 @@ - SW ใหม่ → skipWaiting + clients.claim + แจ้งหน้าเว็บ ============================================================ */ -const VERSION = "1.0.0"; +const VERSION = "1.0.1"; /* bump เมื่อแก้ UI เพื่อบังคับให้ cache เก่าถูกทิ้ง */ const CACHE = `atroute-${VERSION}`; const OFFLINE_URL = "/offline.html"; diff --git a/frontend/src/styles/pages/stops.css b/frontend/src/styles/pages/stops.css index 098c108..5c2de41 100644 --- a/frontend/src/styles/pages/stops.css +++ b/frontend/src/styles/pages/stops.css @@ -336,6 +336,19 @@ .mu-kpi-grid { grid-template-columns: 1fr; } .mu-search-tabs { width: 100%; } .mu-search-tab { flex: 1; justify-content: center; padding: 10px 12px; font-size: 0.85rem; } + + /* 3 แท็บบนจอแคบ: ข้อความไทยยาว → ให้ห่อเป็น 2 บรรทัดอย่างเรียบร้อย + และทุกแท็บสูงเท่ากัน (flex stretch) */ + .mu-search-tabs { align-items: stretch; } + .mu-search-tab { + min-height: 56px; + text-align: center; + line-height: 1.25; + padding: 10px 8px; + gap: 6px; + } + .mu-search-tab .ic { flex: none; } + .mu-search-tab span { display: block; } .mu-stop-action { flex-direction: column; align-items: flex-start; } /* กล่องรหัส: ย่อให้พอดีจอ 375px (5×40 + เครื่องหมาย + gap = ~244px) */ .mu-code-boxes { gap: 5px; }