From 5e80d78f41b163c35169b61a48d7715d3dde4341 Mon Sep 17 00:00:00 2001 From: Eduard Wisch Date: Thu, 9 Apr 2026 01:21:59 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20Manifest-Installability-Kriterien=20f?= =?UTF-8?q?=C3=BCr=20Chrome=20Android?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Chrome Android zeigte nur 'Zum Startbildschirm hinzufügen' statt 'App installieren', weil: 1. 'any maskable' als kombinierter purpose reicht Chrome nicht — braucht mindestens ein reines 'any'-Icon für den Install-Prompt 2. start_url/scope waren relativ (./) — mit absoluten Pfaden zum custom/baustelle/-Root ist der Scope eindeutig Fixes: - icons: je 192/512 als 'any' UND zusätzlich als 'maskable' (4 Einträge) - id, start_url, scope auf '/custom/baustelle/' gesetzt (absolut) - categories, dir: ltr dazu für vollständiges Manifest Damit erfüllt die PWA die Chrome-Installability-Kriterien und der Menü-Eintrag wird zu 'App installieren'. Erst dann funktioniert auch Web Share Target. Cache v10. Co-Authored-By: Claude Opus 4.6 (1M context) [deploy] --- manifest.webmanifest | 13 +++++++++---- sw.js | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/manifest.webmanifest b/manifest.webmanifest index 1da8d42..2a01053 100644 --- a/manifest.webmanifest +++ b/manifest.webmanifest @@ -2,16 +2,21 @@ "name": "Baustelle — Bericht-Doku", "short_name": "Baustelle", "description": "Mobile Doku für Baustellen — Fotos, Sprachnotizen, Skizzen", - "start_url": "./", - "scope": "./", + "id": "/custom/baustelle/", + "start_url": "/custom/baustelle/", + "scope": "/custom/baustelle/", "display": "standalone", "orientation": "portrait", "background_color": "#1a1a1f", "theme_color": "#1a1a1f", "lang": "de", + "dir": "ltr", + "categories": ["productivity", "business", "utilities"], "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" } + { "src": "icons/icon-192.png", "sizes": "192x192", "type": "image/png", "purpose": "any" }, + { "src": "icons/icon-512.png", "sizes": "512x512", "type": "image/png", "purpose": "any" }, + { "src": "icons/icon-192.png", "sizes": "192x192", "type": "image/png", "purpose": "maskable" }, + { "src": "icons/icon-512.png", "sizes": "512x512", "type": "image/png", "purpose": "maskable" } ], "share_target": { "action": "https://awl.data-it-solution.de/custom/baustelle/share.html", diff --git a/sw.js b/sw.js index 227e1f3..8a7f97e 100644 --- a/sw.js +++ b/sw.js @@ -5,7 +5,7 @@ * - Web Share Target via POST → share.html */ -const CACHE = 'baustelle-v9'; +const CACHE = 'baustelle-v10'; const SHELL = [ './', './index.html',