mirror of
https://github.com/pi-hole/web.git
synced 2025-12-24 12:48:29 +00:00
Adjust enbaled checkboxes on advanced settings tab
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
@@ -142,7 +142,8 @@ function initCheckboxRadioStyle() {
|
||||
}
|
||||
|
||||
var boxsheet = $('<link href="' + getCheckboxURL(chkboxStyle) + '" rel="stylesheet" />');
|
||||
boxsheet.appendTo("head");
|
||||
// Only add the stylesheet if it's not already present
|
||||
if ($("link[href='" + boxsheet.attr("href") + "']").length === 0) boxsheet.appendTo("head");
|
||||
|
||||
iCheckStyle = chkboxStyle;
|
||||
applyCheckboxRadioStyle();
|
||||
@@ -303,8 +304,13 @@ function updateSensorsInfo() {
|
||||
.done(function (data) {
|
||||
if (data.sensors.cpu_temp !== null) {
|
||||
var temp = data.sensors.cpu_temp.toFixed(1) + " °C";
|
||||
var color = data.sensors.cpu_temp > data.sensors.hot_limit ? "text-red fa-temperature-high" : "text-green-light fa-temperature-low";
|
||||
$("#temperature").html('<i class="fa fa-fw fas ' + color + '"></i> Temp: ' + temp);
|
||||
var color =
|
||||
data.sensors.cpu_temp > data.sensors.hot_limit
|
||||
? "text-red fa-temperature-high"
|
||||
: "text-green-light fa-temperature-low";
|
||||
$("#temperature").html(
|
||||
'<i class="fa fa-fw fas ' + color + '"></i> Temp: ' + temp
|
||||
);
|
||||
} else $("#temperature").html('<i class="fa fa-fw fas fa-temperature-low"></i> Temp: N/A');
|
||||
// Update every 20 seconds
|
||||
clearTimeout(sensorsTimer);
|
||||
|
||||
Reference in New Issue
Block a user