mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-10 21:47:04 +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 [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');
|
var [date, time] = release.created_at.split('T');
|
||||||
$("#releaseTable").append(
|
$("#releaseTable").append(
|
||||||
"<tr>"+
|
"<tr>"+
|
||||||
@@ -312,15 +315,15 @@ $(document).ready(function(){
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
function setURL(button) {
|
function setURL(button) {
|
||||||
var url = button.dataset.url;
|
var url = button.dataset.url;
|
||||||
$("#fwurl").val(url);
|
$("#fwurl").val(url);
|
||||||
|
|
||||||
$('[data-url^="http"]').addClass("btn-success").removeClass("btn-danger");
|
$('[data-url^="http"]').addClass("btn-success").removeClass("btn-danger");
|
||||||
$('[data-url="'+url+'"]').addClass("btn-danger").removeClass("btn-success");
|
$('[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
|
//stop the status refresh. This prevents a race condition where a status
|
||||||
//request would be refreshed with wrong ip info from a previous connection
|
//request would be refreshed with wrong ip info from a previous connection
|
||||||
//and the request would automatically shows as succesful.
|
//and the request would automatically shows as succesful.
|
||||||
@@ -348,7 +351,6 @@ $(document).ready(function(){
|
|||||||
$( "#connect_manual" ).slideUp( "fast", function() {});
|
$( "#connect_manual" ).slideUp( "fast", function() {});
|
||||||
$( "#connect-wait" ).slideDown( "fast", function() {});
|
$( "#connect-wait" ).slideDown( "fast", function() {});
|
||||||
|
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '/connect.json',
|
url: '/connect.json',
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
@@ -358,13 +360,12 @@ $(document).ready(function(){
|
|||||||
data: { 'timestamp': Date.now()}
|
data: { 'timestamp': Date.now()}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
//now we can re-set the intervals regardless of result
|
//now we can re-set the intervals regardless of result
|
||||||
startCheckStatusInterval();
|
startCheckStatusInterval();
|
||||||
startRefreshAPInterval();
|
startRefreshAPInterval();
|
||||||
}
|
}
|
||||||
|
|
||||||
function rssiToIcon(rssi){
|
function rssiToIcon(rssi){
|
||||||
if(rssi >= -60){
|
if(rssi >= -60){
|
||||||
return 'w0';
|
return 'w0';
|
||||||
}
|
}
|
||||||
@@ -377,9 +378,9 @@ $(document).ready(function(){
|
|||||||
else{
|
else{
|
||||||
return 'w3';
|
return 'w3';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function refreshAP(){
|
function refreshAP(){
|
||||||
if (!enableAPTimer) return;
|
if (!enableAPTimer) return;
|
||||||
$.getJSON( "/ap.json", function( data ) {
|
$.getJSON( "/ap.json", function( data ) {
|
||||||
if(data.length > 0){
|
if(data.length > 0){
|
||||||
@@ -392,9 +393,9 @@ $(document).ready(function(){
|
|||||||
refreshAPHTML(apList);
|
refreshAPHTML(apList);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function refreshAPHTML(data){
|
function refreshAPHTML(data){
|
||||||
var h = "";
|
var h = "";
|
||||||
data.forEach(function(e, idx, array) {
|
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);
|
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)
|
$( "#wifi-list" ).html(h)
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkStatus(){
|
function checkStatus(){
|
||||||
RepeatCheckStatusInterval();
|
RepeatCheckStatusInterval();
|
||||||
if (!enableStatusTimer) return;
|
if (!enableStatusTimer) return;
|
||||||
if (blockAjax) return;
|
if (blockAjax) return;
|
||||||
@@ -511,9 +512,9 @@ $(document).ready(function(){
|
|||||||
.fail(function() {
|
.fail(function() {
|
||||||
//don't do anything, the server might be down while esp32 recalibrates radio
|
//don't do anything, the server might be down while esp32 recalibrates radio
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function getConfig() {
|
function getConfig() {
|
||||||
$.getJSON("/config.json", function(data) {
|
$.getJSON("/config.json", function(data) {
|
||||||
if (data.hasOwnProperty('autoexec')) {
|
if (data.hasOwnProperty('autoexec')) {
|
||||||
if (data["autoexec"] === 1) {
|
if (data["autoexec"] === 1) {
|
||||||
@@ -538,4 +539,4 @@ $(document).ready(function(){
|
|||||||
.fail(function() {
|
.fail(function() {
|
||||||
console.log("failed to fetch config!");
|
console.log("failed to fetch config!");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user