mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2026-01-27 21:00:57 +03:00
messaging subsystem wip
This commit is contained in:
@@ -646,12 +646,24 @@ function refreshAPHTML(data){
|
||||
|
||||
$( "#wifi-list" ).html(h)
|
||||
}
|
||||
|
||||
function getMessages() {
|
||||
$.getJSON("/messages.json", function(data) {
|
||||
data.forEach(function(msg) {
|
||||
});
|
||||
|
||||
})
|
||||
.fail(function(xhr, ajaxOptions, thrownError) {
|
||||
console.log(xhr.status);
|
||||
console.log(thrownError);
|
||||
if (thrownError != '') showMessage(thrownError, 'ERROR');
|
||||
});
|
||||
}
|
||||
function checkStatus(){
|
||||
RepeatCheckStatusInterval();
|
||||
if (!enableStatusTimer) return;
|
||||
if (blockAjax) return;
|
||||
blockAjax = true;
|
||||
getMessages();
|
||||
$.getJSON( "/status.json", function( data ) {
|
||||
if (data.hasOwnProperty('ssid') && data['ssid'] != ""){
|
||||
if (data["ssid"] === selectedSSID){
|
||||
@@ -881,6 +893,7 @@ function getConfig() {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function showMessage(message, severity) {
|
||||
if (severity == 'INFO') {
|
||||
$('#message').css('background', '#6af');
|
||||
|
||||
Reference in New Issue
Block a user