- Manifest 'LAN-Clipboard' / 'Clipboard', standalone, eigene Icons (auch maskable) - iOS: apple-touch-icon, Web-App-Metadaten, Statusleiste black-translucent - Service Worker (vite-plugin-pwa) cacht nur die App-Hülle, nie /api - Hinweis 'Neue Version verfügbar' mit Neu laden - Offline-Seite, wenn beim Start kein Server erreichbar ist - Icons per scripts/render-icons.sh aus SVG gerendert Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
20 lines
794 B
Bash
20 lines
794 B
Bash
#!/bin/sh
|
|
# Renders the PWA icons from the SVG sources with headless Chromium (Playwright image).
|
|
# Usage (from frontend/): sh scripts/render-icons.sh
|
|
set -eu
|
|
|
|
IMAGE=mcr.microsoft.com/playwright:v1.63.0-noble
|
|
CHROME=/ms-playwright/chromium_headless_shell-1243/chrome-headless-shell-linux64/chrome-headless-shell
|
|
|
|
render() { # <svg> <size> <png>
|
|
docker run --rm -v "$PWD/public/icons:/icons" "$IMAGE" "$CHROME" \
|
|
--no-sandbox --hide-scrollbars --default-background-color=00000000 \
|
|
--window-size="$2,$2" --screenshot="/icons/$3" "file:///icons/$1" >/dev/null 2>&1
|
|
}
|
|
|
|
render icon.svg 192 icon-192.png
|
|
render icon.svg 512 icon-512.png
|
|
render icon-maskable.svg 512 icon-maskable-512.png
|
|
render icon-maskable.svg 180 apple-touch-icon.png
|
|
echo "Icons rendered into public/icons/"
|