remove state notification code

This commit is contained in:
Lucas Pleß 2022-09-04 13:15:04 +02:00
parent ddadd0e4e6
commit b9f4eb5dd5
1 changed files with 0 additions and 24 deletions

View File

@ -21,7 +21,6 @@ angular.module('roomstateapp.controllers', []).
Socket.on('sdata', function(message) { Socket.on('sdata', function(message) {
console.log("received data from server: " + message.data.names); console.log("received data from server: " + message.data.names);
stateNotification(message.data.state);
$scope.simple = message.data; $scope.simple = message.data;
gpower.refresh(message.data.power); gpower.refresh(message.data.power);
}); });
@ -84,26 +83,3 @@ gpower = new JustGage({
}); });
}); });
function stateNotification(state) {
if (state == true && laststate != true && laststate != null) {
laststate = true;
showNotification("CTDO - Status", "Der Chaostreff ist nun offen.", "/img/green.png", 4);
} else if (state == false && laststate != false && laststate != null) {
laststate = false;
showNotification("CTDO - Staus", "Der Chaostreff ist nun geschlossen", "/img/red.png", 4);
} else {
laststate = state;
}
}
function toggle() {
toggleNotifications();
if (enabledNotifications === true) {
document.getElementById("notificationButton").innerHTML = "Statusbenachrichtigungen an";
document.getElementById("notificationButton").className = "btn btn-block btn-success";
} else {
document.getElementById("notificationButton").innerHTML = "Statusbenachrichtigungen aus";
document.getElementById("notificationButton").className = "btn btn-block btn-danger";
}
}