feat: mobil uyumlu PWA — manifest, service worker, gercek kurulum, filtre cekmecesi

- public/manifest.webmanifest (standalone, tr, kisayollar) + 192/512 ve
  maskable ikonlar + apple-touch-icon; index.html PWA meta etiketleri
- public/sw.js: /assets cache-first (hash'li adlar), kabuk network-first,
  /api ASLA onbellekten (eski ihale gosterilmesin); surum degisince temizlik
- main.jsx: SW yalniz uretimde kaydedilir (dev'de HMR ile cakismasin)
- Mobil PWA sayfasindaki "Cihaza Yukle" dugmesi sahteydi (setInstalled(true));
  artik beforeinstallprompt ile gercek kurulum, standalone algilama, iOS/
  Android/masaustu yol tarifi
- Kucuk ekranda sol filtre paneli listeyi 72 satir asagi itiyordu: lg altinda
  "Filtreler" dugmesiyle acilan cekmece; sag panel xl altinda gizli

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
2026-09-04 00:39:40 +03:00
co-authored by Claude Fable 5.1
parent acec88a4c4
commit fabff18fe9
12 changed files with 136 additions and 7 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

+24
View File
@@ -0,0 +1,24 @@
{
"name": "İhaleist — Kamu İhale Takip",
"short_name": "İhaleist",
"description": "Türkiye kamu ihaleleri: arama, derin şartname analizi, kalem havuzu, uyum skoru, takip ve bildirim.",
"start_url": "/",
"scope": "/",
"display": "standalone",
"orientation": "any",
"background_color": "#1f2937",
"theme_color": "#1f2937",
"lang": "tr",
"categories": ["business", "productivity"],
"icons": [
{ "src": "/icons/icon-192.png", "sizes": "192x192", "type": "image/png" },
{ "src": "/icons/icon-512.png", "sizes": "512x512", "type": "image/png" },
{ "src": "/icons/maskable-192.png", "sizes": "192x192", "type": "image/png", "purpose": "maskable" },
{ "src": "/icons/maskable-512.png", "sizes": "512x512", "type": "image/png", "purpose": "maskable" }
],
"shortcuts": [
{ "name": "Ana İhale Listesi", "url": "/", "description": "Açık ihaleler" },
{ "name": "Kanban Pano", "url": "/?tab=kanban" },
{ "name": "Doküman Deposu", "url": "/?tab=dokuman_deposu" }
]
}
+28
View File
@@ -0,0 +1,28 @@
/* İhaleist service worker — uygulama kabuğu çevrimdışı açılır, API her zaman ağdan.
Sürüm değişince eski önbellek temizlenir (build her deploy'da yeni asset adı üretir). */
const SURUM = 'ihaleist-v1';
const KABUK = ['/', '/manifest.webmanifest', '/icons/icon-192.png', '/icons/icon-512.png'];
self.addEventListener('install', (e) => {
e.waitUntil(caches.open(SURUM).then((c) => c.addAll(KABUK)).then(() => self.skipWaiting()));
});
self.addEventListener('activate', (e) => {
e.waitUntil(caches.keys().then((ks) => Promise.all(ks.filter((k) => k !== SURUM).map((k) => caches.delete(k)))).then(() => self.clients.claim()));
});
self.addEventListener('fetch', (e) => {
const url = new URL(e.request.url);
if (e.request.method !== 'GET' || url.origin !== self.location.origin) return;
// API: yalnız ağ — önbellekten eski ihale gösterme
if (url.pathname.startsWith('/api/')) return;
// Hash'li build varlıkları: cache-first (değişmez adlar)
if (url.pathname.startsWith('/assets/')) {
e.respondWith(caches.match(e.request).then((hit) => hit || fetch(e.request).then((r) => {
const kopya = r.clone(); caches.open(SURUM).then((c) => c.put(e.request, kopya)); return r;
})));
return;
}
// Kabuk / sayfa: network-first, ağ yoksa önbellekten index
e.respondWith(fetch(e.request).then((r) => {
const kopya = r.clone(); caches.open(SURUM).then((c) => c.put(e.request, kopya)); return r;
}).catch(() => caches.match(e.request).then((hit) => hit || caches.match('/'))));
});