Cabin Chat 4.0: accounts, https, PWA, mentions, notifications
- accounts with name + password (salted sha256), one account on several devices at once, profile menu: change password, profile picture, link another device (QR code + one-time link), logout, delete account - @mentions with picker and highlighting - https by default with the router web admin's certificate; --http, --cert/--key installer options - logo/favicon, app manifest, service worker (installable PWA) - browser notifications via the service worker, no internet needed - devserver: https option, ignore connections reset by the browser Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
863d30eeba
commit
1459b3228d
@@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
# Regenerate the PNG app icons in www/ from www/logo.svg (only needed when the
|
||||
# logo changes; the PNGs are committed). Needs inkscape, plus python3 with
|
||||
# Pillow to recompress the files.
|
||||
set -e
|
||||
cd "$(dirname "$0")/www"
|
||||
tmp=$(mktemp -d)
|
||||
trap 'rm -rf "$tmp"' EXIT
|
||||
|
||||
# full-bleed square with the artwork inside the 80% safe zone, for Android's
|
||||
# maskable icon and the iOS home screen (both round the corners themselves)
|
||||
sed -e 's|<rect width="512" height="512" rx="112" fill="url(#bg)"/>|<rect width="512" height="512" fill="url(#bg)"/><g transform="translate(51.2 51.2) scale(.8)">|' \
|
||||
-e 's|</svg>|</g></svg>|' logo.svg > "$tmp/full.svg"
|
||||
|
||||
inkscape logo.svg -w 192 -o icon-192.png
|
||||
inkscape "$tmp/full.svg" -w 512 -o icon-maskable-512.png
|
||||
inkscape "$tmp/full.svg" -w 180 -o apple-touch-icon.png
|
||||
|
||||
python3 - <<'EOF'
|
||||
from PIL import Image
|
||||
for f in ("icon-192.png", "icon-maskable-512.png", "apple-touch-icon.png"):
|
||||
Image.open(f).convert("RGBA").save(f, optimize=True)
|
||||
EOF
|
||||
ls -l icon-*.png apple-touch-icon.png
|
||||
Reference in New Issue
Block a user