summaryrefslogtreecommitdiff
path: root/crates/wipfel/serve-here.sh
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2026-10-27 19:13:03 +0100
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2026-10-27 19:13:03 +0100
commit2df51e89039b9b160aafb52b700e874411eb0555 (patch)
treeffed8ff63fb39a422f7d14d1c6da3e8281997631 /crates/wipfel/serve-here.sh
parent2d3cba97ff6ffbfe094ed0045329d875c6d1960b (diff)
wipfel: PWA — manifest, service worker, Web Share Target
- 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.
Diffstat (limited to 'crates/wipfel/serve-here.sh')
-rwxr-xr-xcrates/wipfel/serve-here.sh3
1 files changed, 3 insertions, 0 deletions
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"}')"