freifunkmanager/webroot/js/gui.js

23 lines
615 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
gui.render = function render(){
var status = document.getElementsByClassName('status')[0];
2017-05-09 02:12:10 +02:00
if (status === undefined){
console.log("unable to render");
2017-05-09 02:12:10 +02:00
return;
}
status.classList.remove('connecting','offline');
2017-05-09 02:12:10 +02:00
if(socket.readyState !== 1){
status.classList.add(((socket.readyState===0 || socket.readyState===2)?'connecting':(socket.readyState===1)?'':'offline'));
2017-05-09 02:12:10 +02:00
}
2017-05-08 19:13:29 +02:00
notify.container = 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
};
gui.render();
2017-05-08 19:13:29 +02:00
})();