From b9f4eb5dd5adf7b54f6f2f31e1d29985b56fab3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Ple=C3=9F?= Date: Sun, 4 Sep 2022 13:15:04 +0200 Subject: [PATCH] remove state notification code --- public/js/app.js | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/public/js/app.js b/public/js/app.js index 775a50e..ca8d419 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -21,7 +21,6 @@ angular.module('roomstateapp.controllers', []). Socket.on('sdata', function(message) { console.log("received data from server: " + message.data.names); - stateNotification(message.data.state); $scope.simple = message.data; 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"; - } -} \ No newline at end of file