From 2df51e89039b9b160aafb52b700e874411eb0555 Mon Sep 17 00:00:00 2001 From: Johannes Hofmann Date: Tue, 27 Oct 2026 19:13:03 +0100 Subject: wipfel: PWA — manifest, service worker, Web Share Target MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - manifest.webmanifest: standalone, dark theme, mountain icons (regular + maskable) - sw.js: network-first with cache fallback -> full offline after first visit (wasm + hill DB included); versioned cache, stale caches pruned - share_target: images shared to the installed app are POSTed to __share; the SW stashes the bytes at __shared and redirects with ?shared=1; the app picks them up on startup and cleans the URL - index.html: manifest link, theme-color, icons, SW registration - build/serve scripts ship the new files; dist refreshed Note: sharing does not bypass AOSP GPS redaction when the share source passes a MediaStore URI (the browser is still the reader) — the .nomedia/rename trick remains the way to get GPS EXIF into a browser. --- crates/wipfel/serve-here.sh | 3 +++ 1 file changed, 3 insertions(+) (limited to 'crates/wipfel/serve-here.sh') diff --git a/crates/wipfel/serve-here.sh b/crates/wipfel/serve-here.sh index 2accdb9..9951829 100755 --- a/crates/wipfel/serve-here.sh +++ b/crates/wipfel/serve-here.sh @@ -8,5 +8,8 @@ DIST=/tmp/wipfel-dist mkdir -p "$DIST" wasm-bindgen --target web --out-dir "$DIST" target/wasm32-unknown-unknown/release/wipfel.wasm cp crates/wipfel/www/index.html crates/wipfel/www/style.css "$DIST/" +cp crates/wipfel/www/sw.js crates/wipfel/www/manifest.webmanifest "$DIST/" +mkdir -p "$DIST/icons" +cp crates/wipfel/www/icons/*.png "$DIST/icons/" gzip -9 -n -c gipfel.dat > "$DIST/gipfel.dat.gz" echo "dist refreshed: $(ls -la "$DIST" | awk '{s+=$5} END {print s" bytes"}')" -- cgit v1.2.3