TRXTD/scripts
Tronax 31cb594cb0
feat(pwa): installable app + fix research tree pip overflow
Research tree UI:
- The level pips shared the header row with the upgrade name and fought
  for width; long names like "Festungsmauern" (5 pips) pushed the pips
  out of the upgrade card. Pips now sit in the bottom row next to the
  buy button (space-between), where width is plentiful, and carry a
  "level / max" tooltip
- Tighter modal padding on phones (max-width 560px), scrollable at 92vh

PWA (installable as app in mobile browsers):
- public/manifest.webmanifest: standalone display, any orientation,
  TRXTD theme colors, German lang, start_url "/"
- public/sw.js: network-first service worker with runtime caching.
  index.html is always fetched fresh so new deploys are picked up
  immediately; the cache only serves as offline fallback. API calls
  and cross-origin requests are never intercepted
- Icon set generated by scripts/generate-icons.mjs (pure Node PNG
  encoder, zero image dependencies): gold tower on the game-themed
  dark gradient in 192px, 512px, maskable 512px (motif inside the safe
  zone) and 180px apple-touch-icon
- index.html: manifest link, favicon, apple-touch-icon, theme-color,
  mobile-web-app-capable, apple-mobile-web-app meta tags
- src/main.ts: service worker registration in production builds only
  (dev HMR stays untouched)
- server.mjs: serve .webmanifest as application/manifest+json (Chrome
  requires the correct MIME type for installability)

Verified against the production server: manifest (application/
manifest+json), icons (image/png) and sw.js (text/javascript) respond
with 200, index.html references all PWA tags; npm test 48/48 green.
2026-08-17 14:53:58 +02:00
..
generate-icons.mjs feat(pwa): installable app + fix research tree pip overflow 2026-08-17 14:53:58 +02:00
security-test.mjs feat(server): add security hardening for public hosting 2026-08-16 13:16:20 +02:00
sim.mts feat: add 9-level tower evolution system with distinct tier abilities 2026-08-16 13:54:09 +02:00
test-auth.mjs feat: account system, OIDC, meta-progression research tree, and automated tests 2026-08-16 16:22:38 +02:00
test-db.mjs feat: account system, OIDC, meta-progression research tree, and automated tests 2026-08-16 16:22:38 +02:00
test-evolution.mts feat: add 9-level tower evolution system with distinct tier abilities 2026-08-16 13:54:09 +02:00
test-map-room.mjs feat: add multi-map system with 4 distinct biomes, layouts, and multiplayer sync 2026-08-16 15:03:34 +02:00
test-maps.mts feat: add multi-map system with 4 distinct biomes, layouts, and multiplayer sync 2026-08-16 15:03:34 +02:00
test-mp.mts feat: initialize TRXTD browser tower defense 2026-08-15 16:07:09 +02:00
test-obstacle.mts feat: initialize TRXTD browser tower defense 2026-08-15 16:07:09 +02:00