PWA: Update CODEMAP.md files #5274

Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
Michael Mayer
2025-10-19 08:44:36 +02:00
parent 89a9362fa8
commit 1ba41b6656
2 changed files with 2 additions and 1 deletions

View File

@@ -47,6 +47,7 @@ Templates & Static Assets
- The browser check logic resides in `assets/static/js/browser-check.js` and is included via `app.js.gohtml`; it performs capability checks (Promise, fetch, AbortController, `script.noModule`, etc.) before the main bundle runs. Update this file (and the partial) in lockstep with the templates in private repos (`pro/assets/templates/index.gohtml`, `plus/assets/templates/index.gohtml`) because they import the same partial, and keep the `<script>` order so the check is executed first. - The browser check logic resides in `assets/static/js/browser-check.js` and is included via `app.js.gohtml`; it performs capability checks (Promise, fetch, AbortController, `script.noModule`, etc.) before the main bundle runs. Update this file (and the partial) in lockstep with the templates in private repos (`pro/assets/templates/index.gohtml`, `plus/assets/templates/index.gohtml`) because they import the same partial, and keep the `<script>` order so the check is executed first.
- `splash.gohtml` renders the loading screen text while the bundle loads; styles are in `frontend/src/css/splash.css`. - `splash.gohtml` renders the loading screen text while the bundle loads; styles are in `frontend/src/css/splash.css`.
- When adjusting browser support messaging, update both the loader partial and splash styles so the warning message stays consistent across editions. - When adjusting browser support messaging, update both the loader partial and splash styles so the warning message stays consistent across editions.
- Service worker routes live in `internal/server/routes_webapp.go`. The helper that serves Workbox runtime files (`/workbox-:hash`) sits there as well so service workers run under both the site root and a base URI; remember Gins `:hash` parameter excludes the `.js` suffix, so the handler/test matches the full filename manually.
HTTP API HTTP API
- Handlers live in `internal/api/*.go` and are registered in `internal/server/routes.go`. - Handlers live in `internal/api/*.go` and are registered in `internal/server/routes.go`.

View File

@@ -40,7 +40,7 @@ Runtime & Plugins
- HTML sanitization: `vue-3-sanitize` + `vue-sanitize-directive` - HTML sanitization: `vue-3-sanitize` + `vue-sanitize-directive`
- Tooltips: `floating-vue` - Tooltips: `floating-vue`
- Video: HLS.js assigned to `window.Hls` - Video: HLS.js assigned to `window.Hls`
- PWA: Workbox registers a service worker after config load (see `src/app.js`); scope and registration URL derive from `$config.baseUri` so non-root deployments work. - PWA: Workbox registers a service worker after config load (see `src/app.js`); scope and registration URL derive from `$config.baseUri` so non-root deployments work. Workbox precache rules live in `frontend/webpack.config.js` (see the `GenerateSW` plugin); locale chunks and non-woff2 font variants are excluded there so we dont force every user to download those assets on first visit.
- WebSocket: `src/common/websocket.js` publishes `websocket.*` events, used by `$session` for client info - WebSocket: `src/common/websocket.js` publishes `websocket.*` events, used by `$session` for client info
HTTP Client HTTP Client