diff --git a/components/wifi-manager/code.js b/components/wifi-manager/code.js index e6864cc0..64d564a6 100644 --- a/components/wifi-manager/code.js +++ b/components/wifi-manager/code.js @@ -308,6 +308,7 @@ $(document).ready(function(){ $('#fwcheck').on("click", function(){ $("#releaseTable").html(""); $.getJSON(releaseURL, function(data) { + var i=0; data.forEach(function(release) { var url = ''; release.assets.forEach(function(asset) { @@ -321,17 +322,32 @@ $(document).ready(function(){ 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 trclass = (i++ > 6)?' hide':''; $("#releaseTable").append( - ""+ - ""+ver+""+ - ""+idf+""+ - ""+date+""+ - ""+cfg+""+ - ""+branch+""+ - ""+ + ""+ + ""+ver+""+ + ""+idf+""+ + ""+date+""+ + ""+cfg+""+ + ""+branch+""+ + ""+ "" ); }); + if (i > 7) { + $("#releaseTable").append( + ""+ + ""+ + ""+ + ""+ + "" + ); + $('#showallbutton').on("click", function(){ + console.log('show all'); + $("tr.hide").removeClass("hide"); + $("tr#showall").addClass("hide"); + }); + } }) .fail(function() { alert("failed to fetch release history!"); diff --git a/components/wifi-manager/style.css b/components/wifi-manager/style.css index 15ffc4ef..2e088f34 100644 --- a/components/wifi-manager/style.css +++ b/components/wifi-manager/style.css @@ -352,3 +352,7 @@ div#message { border-radius: 8px; box-shadow: 0px 5px 2px -5px rgba(255, 255, 255, 0.5) inset, 0px 10px 20px -5px rgba(255, 255, 255, 0.1) inset, 0 0px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 3px 1px rgba(0, 0, 0, 0.12), 0 1px 10px 0 rgba(0, 0, 0, 0.3); } + +tr.hide { + display: none; +}