Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix successful temperature notification #2537

Merged
merged 1 commit into from
Feb 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion scripts/pi-hole/js/footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Please see LICENSE file for your rights under this license. */

/* global utils:false */

//The following functions allow us to display time until pi-hole is enabled after disabling.
//Works between all pages

Expand Down Expand Up @@ -185,8 +186,9 @@ function initCPUtemp() {
var token = encodeURIComponent($("#token").text());
$.getJSON("api.php?setTempUnit=" + unit + "&token=" + token, function (data) {
if (showmsg === true) {
utils.showAlert("info", "", "Setting temperature unit...");
if ("result" in data && data.result === "success") {
utils.showAlert("success", "", "Temperature unit set to " + unit, "");
utils.showAlert("success", "far fa-check-circle", "Temperature unit set to " + unit, "");
} else {
utils.showAlert("error", "", "", "Temperature unit not set");
}
Expand Down