mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-10 05:27:01 +03:00
make changelog halfway readable
This commit is contained in:
@@ -279,7 +279,10 @@ $(document).ready(function(){
|
||||
}
|
||||
});
|
||||
var [ver, idf, cfg, branch] = release.name.split('#');
|
||||
var body = release.body.replace(/\\n/ig, "<br />").replace(/\'/ig, "\"");
|
||||
var body = release.body;
|
||||
body = body.replace(/\'/ig, "\"");
|
||||
body = body.replace(/[\s\S]+(### Revision Log[\s\S]+)### ESP-IDF Version Used[\s\S]+/, "$1");
|
||||
body = body.replace(/- \(.+?\) /g, "- ");
|
||||
var [date, time] = release.created_at.split('T');
|
||||
$("#releaseTable").append(
|
||||
"<tr>"+
|
||||
@@ -312,15 +315,15 @@ $(document).ready(function(){
|
||||
});
|
||||
});
|
||||
|
||||
function setURL(button) {
|
||||
function setURL(button) {
|
||||
var url = button.dataset.url;
|
||||
$("#fwurl").val(url);
|
||||
|
||||
$('[data-url^="http"]').addClass("btn-success").removeClass("btn-danger");
|
||||
$('[data-url="'+url+'"]').addClass("btn-danger").removeClass("btn-success");
|
||||
}
|
||||
}
|
||||
|
||||
function performConnect(conntype){
|
||||
function performConnect(conntype){
|
||||
//stop the status refresh. This prevents a race condition where a status
|
||||
//request would be refreshed with wrong ip info from a previous connection
|
||||
//and the request would automatically shows as succesful.
|
||||
@@ -348,7 +351,6 @@ $(document).ready(function(){
|
||||
$( "#connect_manual" ).slideUp( "fast", function() {});
|
||||
$( "#connect-wait" ).slideDown( "fast", function() {});
|
||||
|
||||
|
||||
$.ajax({
|
||||
url: '/connect.json',
|
||||
dataType: 'json',
|
||||
@@ -358,13 +360,12 @@ $(document).ready(function(){
|
||||
data: { 'timestamp': Date.now()}
|
||||
});
|
||||
|
||||
|
||||
//now we can re-set the intervals regardless of result
|
||||
startCheckStatusInterval();
|
||||
startRefreshAPInterval();
|
||||
}
|
||||
}
|
||||
|
||||
function rssiToIcon(rssi){
|
||||
function rssiToIcon(rssi){
|
||||
if(rssi >= -60){
|
||||
return 'w0';
|
||||
}
|
||||
@@ -377,9 +378,9 @@ $(document).ready(function(){
|
||||
else{
|
||||
return 'w3';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function refreshAP(){
|
||||
function refreshAP(){
|
||||
if (!enableAPTimer) return;
|
||||
$.getJSON( "/ap.json", function( data ) {
|
||||
if(data.length > 0){
|
||||
@@ -392,9 +393,9 @@ $(document).ready(function(){
|
||||
refreshAPHTML(apList);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function refreshAPHTML(data){
|
||||
function refreshAPHTML(data){
|
||||
var h = "";
|
||||
data.forEach(function(e, idx, array) {
|
||||
h += '<div class="ape{0}"><div class="{1}"><div class="{2}">{3}</div></div></div>'.format(idx === array.length - 1?'':' brdb', rssiToIcon(e.rssi), e.auth==0?'':'pw',e.ssid);
|
||||
@@ -402,9 +403,9 @@ $(document).ready(function(){
|
||||
});
|
||||
|
||||
$( "#wifi-list" ).html(h)
|
||||
}
|
||||
}
|
||||
|
||||
function checkStatus(){
|
||||
function checkStatus(){
|
||||
RepeatCheckStatusInterval();
|
||||
if (!enableStatusTimer) return;
|
||||
if (blockAjax) return;
|
||||
@@ -511,9 +512,9 @@ $(document).ready(function(){
|
||||
.fail(function() {
|
||||
//don't do anything, the server might be down while esp32 recalibrates radio
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function getConfig() {
|
||||
function getConfig() {
|
||||
$.getJSON("/config.json", function(data) {
|
||||
if (data.hasOwnProperty('autoexec')) {
|
||||
if (data["autoexec"] === 1) {
|
||||
@@ -538,4 +539,4 @@ $(document).ready(function(){
|
||||
.fail(function() {
|
||||
console.log("failed to fetch config!");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user