freifunkmanager/webroot/js/gui.js

26 lines
660 B
JavaScript
Raw Normal View History

2017-05-08 19:13:29 +02:00
var gui = {};
(function(){
2017-05-09 02:12:10 +02:00
var notify;
2017-05-08 19:13:29 +02:00
2017-05-09 02:12:10 +02:00
gui.render = function render(){
var status = document.getElementsByClassName('menu')[0];
if (status === undefined){
return;
}
status.classList.remove('orange','red');
if(socket.readyState !== 1){
status.classList.add(((socket.readyState===0 || socket.readyState===2)?'orange':(socket.readyState===1)?'':'red'));
}
2017-05-08 19:13:29 +02:00
2017-05-09 02:12:10 +02:00
notify = new Notify(document.getElementsByClassName('notifications')[0]);
2017-05-08 19:13:29 +02:00
};
2017-05-09 02:12:10 +02:00
gui.update = function update(){
console.log(store.will());
2017-05-08 19:13:29 +02:00
};
2017-05-09 02:12:10 +02:00
gui.notify = function notifyWalker(type, text){
notify.notify(type, text);
2017-05-08 19:13:29 +02:00
};
2017-05-09 02:12:10 +02:00
// gui.render();
2017-05-08 19:13:29 +02:00
})();