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:
@@ -47,3 +47,4 @@ HUMAN.txt
|
|||||||
include_species_list.txt
|
include_species_list.txt
|
||||||
whitelist_species_list.txt
|
whitelist_species_list.txt
|
||||||
/nbproject/private/
|
/nbproject/private/
|
||||||
|
.DS_Store
|
||||||
|
|||||||
+8
-8
@@ -23,15 +23,15 @@ if (getenv('AV_REQUIRE_AUTH') === '1' && empty($_SERVER['HTTP_AUTHORIZATION']))
|
|||||||
exit;
|
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([
|
echo json_encode([
|
||||||
'items' => [
|
'items' => [
|
||||||
// Stock BirdNET-Pi UI (AvianVisitors took over `/`, so the stock
|
['label' => 'birdnet-pi', 'href' => '/index.php', 'native' => false],
|
||||||
// UI is reachable at /index.php directly)
|
['label' => 'detections', 'href' => '/views.php?view=Todays+Detections', 'native' => false],
|
||||||
['label' => 'birdnet-pi', 'href' => '/index.php', 'native' => false],
|
['label' => 'log', 'href' => '/views.php?view=View+Log', 'native' => false],
|
||||||
// BirdNET-Pi log view (php served at /views.php)
|
['label' => 'system', 'href' => '/views.php?view=Services', 'native' => false],
|
||||||
['label' => 'logs', 'href' => '/views.php?view=Log+Out', 'native' => false],
|
['label' => 'github', 'href' => 'https://github.com/Twarner491/AvianVisitors', 'native' => false],
|
||||||
['label' => 'system', 'href' => '/views.php?view=Services', 'native' => false],
|
|
||||||
// AvianVisitors source
|
|
||||||
['label' => 'github', 'href' => 'https://github.com/Twarner491/AvianVisitors', 'native' => false],
|
|
||||||
],
|
],
|
||||||
]);
|
]);
|
||||||
|
|||||||
Reference in New Issue
Block a user