diff --git a/README.md b/README.md index 70ea088..58d92ec 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,8 @@ repo นี้ deploy เป็น **Compose application** บน Dokploy (serve - **หน้าเดียว**: hash router (`#/`, `#/admin`) — เปลี่ยนหน้าไม่โหลดใหม่ (`performance.navigation` ไม่เพิ่ม, `timeOrigin` เดิม) - **ติดตั้งได้**: `manifest.json` (`display: standalone`, `start_url`/`scope` = `/`, `id` = `/`, ไอคอน 192/512 + maskable, `screenshots` แนวตั้ง/แนวนอน, `shortcuts`) ลิงก์ใน `index.html` -- ต้องมีครบตามที่ Chrome/Samsung ตรวจ: HTTPS ที่ certificate ถูกต้อง · manifest ที่ parse ผ่าน (`Page.getAppManifest` → `errors: []`) · `Page.getInstallabilityErrors` → `[]` · service worker คุมหน้าอยู่ · ไอคอนเป็น PNG จริง (ไม่ใช่ SVG) +- ต้องมีครบตามที่ Chrome/Samsung ตรวจ: HTTPS ที่ certificate ถูกต้อง · manifest ที่ parse ผ่าน (`Page.getAppManifest` → `errors: []`) · `Page.getInstallabilityErrors` → `[]` · service worker คุมหน้าอยู่ · ไอคอนเป็น PNG จริง (ไม่ใช่ SVG) และ **ขนาดจริงต้องตรงกับ `sizes` ที่ประกาศ** (48/72/96/144/192/512 + maskable 192/512) +- **Samsung Internet ใช้ `` + `application-name`** ประกอบการตัดสิน — ถ้าลบ meta พวกนี้จะขึ้น “ไม่ผ่านข้อกำหนด” ทั้งที่ manifest ครบ - **ออฟไลน์ได้**: `sw.js` precache shell ไว้ครบ เปิดแบบไม่มีเน็ตยังเห็นรายการ (ข้อมูลจากสำเนา JSON/localStorage) - **อัปเดตเอง**: `ui/pwa.js` ลงทะเบียนด้วย `updateViaCache: "none"` แล้ว `update()` ตอนเปิดหน้า / ทุก 30 นาที / กลับมาโฟกัสแท็บ / ต่อเน็ตใหม่ · `sw.js` ใช้ `skipWaiting()` + `clients.claim()` → `controllerchange` สั่ง reload หน้าเอง (ชะงักเฉพาะตอนกำลังพิมพ์ในฟอร์ม แล้วทำต่อเมื่อเลิกพิมพ์) - cache เวอร์ชันเก่าถูกลบใน `activate` → ผู้ใช้ไม่ต้องล้างแคชเอง diff --git a/icons/icon-144.png b/icons/icon-144.png new file mode 100644 index 0000000..1bca509 Binary files /dev/null and b/icons/icon-144.png differ diff --git a/icons/icon-192-maskable.png b/icons/icon-192-maskable.png new file mode 100644 index 0000000..6b66a8d Binary files /dev/null and b/icons/icon-192-maskable.png differ diff --git a/icons/icon-48.png b/icons/icon-48.png new file mode 100644 index 0000000..063faf4 Binary files /dev/null and b/icons/icon-48.png differ diff --git a/icons/icon-72.png b/icons/icon-72.png new file mode 100644 index 0000000..3af9756 Binary files /dev/null and b/icons/icon-72.png differ diff --git a/icons/icon-96.png b/icons/icon-96.png new file mode 100644 index 0000000..2d20e91 Binary files /dev/null and b/icons/icon-96.png differ diff --git a/index.html b/index.html index c13fe95..e3a0833 100644 --- a/index.html +++ b/index.html @@ -22,7 +22,13 @@ content="รายชื่อโปรเจคอดิเรกของเรา เลือกโปรเจคที่อยากดูได้เลย" /> - + + + + + + + diff --git a/manifest.json b/manifest.json index 68f59d3..db8607d 100644 --- a/manifest.json +++ b/manifest.json @@ -14,7 +14,32 @@ "background_color": "#FFFFFF", "categories": ["productivity", "entertainment"], "prefer_related_applications": false, + "related_applications": [], "icons": [ + { + "src": "icons/icon-48.png", + "sizes": "48x48", + "type": "image/png", + "purpose": "any" + }, + { + "src": "icons/icon-72.png", + "sizes": "72x72", + "type": "image/png", + "purpose": "any" + }, + { + "src": "icons/icon-96.png", + "sizes": "96x96", + "type": "image/png", + "purpose": "any" + }, + { + "src": "icons/icon-144.png", + "sizes": "144x144", + "type": "image/png", + "purpose": "any" + }, { "src": "icons/icon-192.png", "sizes": "192x192", @@ -27,6 +52,12 @@ "type": "image/png", "purpose": "any" }, + { + "src": "icons/icon-192-maskable.png", + "sizes": "192x192", + "type": "image/png", + "purpose": "maskable" + }, { "src": "icons/icon-512-maskable.png", "sizes": "512x512", diff --git a/sw.js b/sw.js index 6c61c40..a081eb3 100644 --- a/sw.js +++ b/sw.js @@ -2,7 +2,7 @@ กติกา: bump VERSION เฉพาะเมื่อแก้ไฟล์นี้หรือรายการ PRECACHE เนื้อหา (HTML/CSS/JS/JSON) ใช้ network-first จึงไม่ต้อง bump */ -const VERSION = "2026.11.24.4"; +const VERSION = "2026.11.24.5"; const CACHE = `hobbypj-${VERSION}`; const PRECACHE = [