Menu: fix broken 'logs' link + add 'detections' shortcut
The 'logs' menu item pointed at /views.php?view=Log+Out which doesn't exist in BirdNET-Pi's view router - hitting that link returned a blank page. Renamed to 'log' and pointed at the correct view='View+Log'. Added a 'detections' item pointing at view='Todays+Detections' (the most useful BirdNET-Pi page for a casual user, faster to reach than clicking through /index.php). Valid view= values pulled from homepage/views.php:142-161. Also added .DS_Store to .gitignore.
This commit is contained in:
+8
-8
@@ -23,15 +23,15 @@ if (getenv('AV_REQUIRE_AUTH') === '1' && empty($_SERVER['HTTP_AUTHORIZATION']))
|
||||
exit;
|
||||
}
|
||||
|
||||
// All hrefs are the canonical paths BirdNET-Pi's views.php recognises
|
||||
// (lifted from homepage/views.php). AvianVisitors took over `/`, so
|
||||
// the stock home is at /index.php.
|
||||
echo json_encode([
|
||||
'items' => [
|
||||
// Stock BirdNET-Pi UI (AvianVisitors took over `/`, so the stock
|
||||
// UI is reachable at /index.php directly)
|
||||
['label' => 'birdnet-pi', 'href' => '/index.php', 'native' => false],
|
||||
// BirdNET-Pi log view (php served at /views.php)
|
||||
['label' => 'logs', 'href' => '/views.php?view=Log+Out', 'native' => false],
|
||||
['label' => 'system', 'href' => '/views.php?view=Services', 'native' => false],
|
||||
// AvianVisitors source
|
||||
['label' => 'github', 'href' => 'https://github.com/Twarner491/AvianVisitors', 'native' => false],
|
||||
['label' => 'birdnet-pi', 'href' => '/index.php', 'native' => false],
|
||||
['label' => 'detections', 'href' => '/views.php?view=Todays+Detections', 'native' => false],
|
||||
['label' => 'log', 'href' => '/views.php?view=View+Log', 'native' => false],
|
||||
['label' => 'system', 'href' => '/views.php?view=Services', 'native' => false],
|
||||
['label' => 'github', 'href' => 'https://github.com/Twarner491/AvianVisitors', 'native' => false],
|
||||
],
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user