Dark daily chart (#152)

* Updated daily chart to use the theme selector

* Added sleep after changing theme so the chart can update

* Added code for pink theme, made it easier to add more themes in the future

* Added blue chart for future blue theme

* Set chart background to none so it's transparent

* Added back background for dark mode.

* Change daily chart based on file based settings. Only support light/dark mode.

* Cleanup

* Added borders around the bars on the bar chart

* Updated background color for dark theme

* Merge from main

* Fixed some spacing

* Updating Python version for linting

* Cleanup

* Back leveled to Python 3.9

* Update scripts/daily_plot.py

Co-authored-by: Nachtzuster <Nachtzuster@users.noreply.github.com>

* Coding suggestions

---------

Co-authored-by: Nachtzuster <Nachtzuster@users.noreply.github.com>
This commit is contained in:
Emmo213
2024-08-05 15:38:33 -04:00
committed by GitHub
parent 2412deb02f
commit 73d2ba5b48
3 changed files with 33 additions and 7 deletions
+5 -1
View File
@@ -147,7 +147,6 @@ if(isset($_GET["latitude"])){
}
}
$contents = file_get_contents("/etc/birdnet/birdnet.conf");
$contents = preg_replace("/SITE_NAME=.*/", "SITE_NAME=\"$site_name\"", $contents);
$contents = preg_replace("/LATITUDE=.*/", "LATITUDE=$latitude", $contents);
@@ -176,6 +175,10 @@ if(isset($_GET["latitude"])){
function() {
window.parent.document.location.reload();
}, 1000);</script>";
shell_exec("sudo systemctl restart chart_viewer.service");
// the sleep allows for the service to restart and image to be generated
sleep(5);
}
$fh = fopen("/etc/birdnet/birdnet.conf", "w");
@@ -649,6 +652,7 @@ https://discordapp.com/api/webhooks/{WebhookID}/{WebhookToken}
<table class="settingstable"><tr><td>
<h2>Color scheme </h2>
Note: when changing themes the daily chart may need a page refresh before updating.<br><br>
<label for="color_scheme">Color scheme for the site : </label>
<select name="color_scheme" class="testbtn">
<?php