Frontend: verbatim apt.ts lift + restored menu drawer
Pulls the live rendered HTML/CSS/JS from the working repo:
- styles.css: 1449 lines, full live palette + chrome rules
- index.html: live <body> structure with stats sidebar, atlas with
svg sort icons, full detail-modal (pose toggle, recordings list,
wiki/ebird chips), about modal
- apt.js: 2760 lines of live JS verbatim, URLs rewired:
- /api/{recent,lifelist,firstseen,timeseries,stats,species}.json
→ ../api/birdnet-api.php?action=X
- /api/img and /api/sketch → ../api/cutout.php
- /api/recording and /api/spectrogram → ../api/{name}.php
- /api/menu → ../api/menu.php (new)
- /birdnet/stream → '' (live audio is admin-only, stripped)
- admin endpoints (/api/auth, /api/config, /api/status, /api/regen,
/api/wiki) left to 404 silently - the live .catch() handlers
already absorb them
Menu drawer restored. Defaults to <body class='av-local'> which CSS
toggles to show items directly without the lock screen. Forwarded
deploys switch to av-forwarded + set AV_REQUIRE_AUTH=1 in php-fpm
env + Caddy basic_auth on /avian/api/ - see avian/forwarding/.
avian/api/menu.php: returns AvianVisitors drawer items (BirdNET-Pi UI,
logs, system, github link). 401s in forwarded mode when no
Authorization header arrives.
This commit is contained in:
@@ -1447,3 +1447,16 @@
|
||||
transition: opacity 200ms ease;
|
||||
}
|
||||
.bird-card[data-playing="true"] .spectro-wrap::before { --playhead: 0.6; }
|
||||
|
||||
/* ============ AvianVisitors mode toggle ============
|
||||
* Default install (body.av-local): hide the lock-row, show drawer items
|
||||
* directly when the menu opens. The PHP shim at /avian/api/menu.php
|
||||
* returns items immediately with no auth, so the live JS skips the lock
|
||||
* flow entirely.
|
||||
*
|
||||
* Forwarded install (body.av-forwarded): show the lock row so users
|
||||
* type the basic-auth password before items unlock. Pair with
|
||||
* AV_REQUIRE_AUTH=1 in php-fpm env + Caddy basic_auth on /avian/api/.
|
||||
* See avian/forwarding/. */
|
||||
body.av-local #dd-locked { display: none; }
|
||||
body.av-local #dd-items { display: block; }
|
||||
|
||||
Reference in New Issue
Block a user