shelter-repository.ts hentet './data/shelters.json' relativt. Under
/shelter/{romnr} løses det til /shelter/data/shelters.json; SPA-fallback
svarer med index.html (200 text/html), response.json() kaster,
refreshData() returnerer false og loadData() avbryter før
handleDeepLink() — førstegangsbesøkende via delt lenke fikk «Fant ikke
tilfluktsrommet» og tom liste.
Samme rotårsak i index.html (manifest.webmanifest, icons/icon-192.png)
og i manifestet (start_url/scope ".", icons "icons/…"): under en
dyplenke-rute ble manifestet index.html og «legg til på startskjerm»
uteble.
- shelter-repository.ts: `${import.meta.env.BASE_URL}data/shelters.json`
- index.html: /manifest.webmanifest, /icons/icon-192.png
- manifest.webmanifest: start_url "/", scope "/", icons "/icons/…"
Verifisert i ny Playwright-kontekst (tom IndexedDB): /shelter/1681 laster
/data/shelters.json (200 application/json), lista fylles og rommet velges.
Forgejo: #19
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FrDGDmN2WAXvNPS85rWJGK
25 lines
561 B
JSON
25 lines
561 B
JSON
{
|
|
"name": "Tilfluktsrom",
|
|
"short_name": "Tilfluktsrom",
|
|
"description": "Find the nearest public shelter in Norway",
|
|
"start_url": "/",
|
|
"scope": "/",
|
|
"display": "standalone",
|
|
"orientation": "portrait",
|
|
"theme_color": "#1A1A2E",
|
|
"background_color": "#1A1A2E",
|
|
"icons": [
|
|
{
|
|
"src": "/icons/icon-192.png",
|
|
"sizes": "192x192",
|
|
"type": "image/png",
|
|
"purpose": "any maskable"
|
|
},
|
|
{
|
|
"src": "/icons/icon-512.png",
|
|
"sizes": "512x512",
|
|
"type": "image/png",
|
|
"purpose": "any maskable"
|
|
}
|
|
]
|
|
}
|