mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-31 04:44:05 +02:00
Add dark mode option
This commit is contained in:
@@ -9,10 +9,16 @@ set -e
|
|||||||
echo " "
|
echo " "
|
||||||
bashio::log.info "Adding new features"
|
bashio::log.info "Adding new features"
|
||||||
|
|
||||||
# Add weekly report button
|
# Add dark mode
|
||||||
###############################
|
if [ ! -f "$HOME"/BirdNET-Pi/homepage/static/dark-style.css ]; then
|
||||||
if ! grep -q "Weekly Report" "$HOME"/BirdNET-Pi/homepage/views.php; then
|
echo "... enabling the dark mode option"
|
||||||
sed -i "67a\ <button type=\"submit\" name=\"view\" value=\"Weekly Report\" form=\"views\">Weekly Report</button>" "$HOME"/BirdNET-Pi/homepage/views.php
|
if [ -f /config/birdnet.conf ] && ! grep -q "COLOR_SCHEME" /config/birdnet.conf; then echo "COLOR_SCHEME=light" >> /config/birdnet.conf; fi
|
||||||
|
for file in /homepage/static/dark-style.css /homepage/index.php /homepage/views.php /scripts/common.php /scripts/config.php; do
|
||||||
|
if [ -f "$HOME"/BirdNET-Pi"$file" ]; then rm "$HOME"/BirdNET-Pi"$file"; fi
|
||||||
|
curl -o "$HOME"/BirdNET-Pi"$file" https://raw.githubusercontent.com/alexbelgium/BirdNET-Pi/patch-2_darkmode"$file"
|
||||||
|
chown "$USER:$USER" "$HOME"/BirdNET-Pi"$file"
|
||||||
|
chmod 777 "$HOME"/BirdNET-Pi"$file"
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Add species conversion system
|
# Add species conversion system
|
||||||
|
|||||||
Reference in New Issue
Block a user