mirror of
https://github.com/grocy/grocy.git
synced 2026-04-07 05:16:15 +02:00
Only allow night mode enabled manually or automatically, but not both at the same time (again fixes #71)
This commit is contained in:
parent
991706920f
commit
8f798a94d1
|
|
@ -4,6 +4,10 @@
|
||||||
if (value)
|
if (value)
|
||||||
{
|
{
|
||||||
$("body").addClass("night-mode");
|
$("body").addClass("night-mode");
|
||||||
|
|
||||||
|
// Force disable auto night mode when night mode is enabled
|
||||||
|
$("#auto-night-mode-enabled").prop("checked", false);
|
||||||
|
$("#auto-night-mode-enabled").trigger("change");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -21,6 +25,13 @@ $("#auto-night-mode-enabled").on("change", function()
|
||||||
{
|
{
|
||||||
$("body").removeClass("night-mode");
|
$("body").removeClass("night-mode");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Force disable night mode when auto night mode is enabled
|
||||||
|
if (value)
|
||||||
|
{
|
||||||
|
$("#night-mode-enabled").prop("checked", false);
|
||||||
|
$("#night-mode-enabled").trigger("change");
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).on("keyup", "#auto-night-mode-time-range-from, #auto-night-mode-time-range-to", function()
|
$(document).on("keyup", "#auto-night-mode-time-range-from, #auto-night-mode-time-range-to", function()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user