mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-06 11:36:59 +03:00
Reposition audio config and other small fixes - release
This commit is contained in:
@@ -2,7 +2,7 @@ idf_component_register( SRC_DIRS .
|
||||
INCLUDE_DIRS . ${IDF_PATH}/components/esp_http_server/src ${IDF_PATH}/components/esp_http_server/src/port/esp32 ${IDF_PATH}/components/esp_http_server/src/util ${IDF_PATH}/components/esp_http_server/src/
|
||||
REQUIRES squeezelite-ota json mdns
|
||||
PRIV_REQUIRES tools services platform_config esp_common json newlib freertos spi_flash nvs_flash mdns pthread wpa_supplicant platform_console esp_http_server console
|
||||
EMBED_FILES res/style.css.gz res/code.js.gz index.html res/bootstrap.css.gz res/jquery.js.gz res/bootstrap.js.gz res/favicon.ico
|
||||
EMBED_FILES res/style.css.gz res/code.js.gz index.html res/bootstrap.css.gz res/yeti/bootstrap.css.gz res/jquery.js.gz res/bootstrap.js.gz res/favicon.ico
|
||||
|
||||
)
|
||||
|
||||
|
||||
@@ -201,7 +201,7 @@
|
||||
<div class="tab-pane fade mt-2" id="tab-configuration">
|
||||
<ul class="nav nav-tabs bg-info" name="secnav">
|
||||
<li class="nav-link" style="padding: inherit; border: none;">
|
||||
<a class="nav-link active" data-toggle="tab" href="#tab-audio">Audio + LMS</a>
|
||||
<a class="nav-link active" data-toggle="tab" href="#tab-cfg-audio">Audio</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-toggle="tab" href="#tab-cfg-syst">System</a>
|
||||
@@ -295,13 +295,13 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade active show" id="tab-audio">
|
||||
<div class="tab-pane fade active show" id="tab-cfg-audio">
|
||||
<div class="card text-white bg-primary mb-3">
|
||||
<div class="card-header">Command Line Templates</div>
|
||||
<div class="card-header">Usage Templates</div>
|
||||
<div class="card-body">
|
||||
<fieldset >
|
||||
<fieldset class="form-group" id="output-tmpl">
|
||||
<legend>Audio Output</legend>
|
||||
<legend>Output</legend>
|
||||
<div class="form-check">
|
||||
<label class="form-check-label">
|
||||
<input type="radio" class="form-check-input" name="output-tmpl" id="i2s" >
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -72,6 +72,16 @@ var escapeHTML = function(unsafe) {
|
||||
}
|
||||
});
|
||||
};
|
||||
function setNavColor(stylename){
|
||||
$('[name=secnav]').removeClass('bg-secondary bg-warning');
|
||||
$("footer.footer").removeClass('bg-secondary bg-warning');
|
||||
$("#mainnav").removeClass('bg-secondary bg-warning');
|
||||
if(stylename.length>0){
|
||||
$('[name=secnav]').addClass(stylename);
|
||||
$("footer.footer").addClass(stylename);
|
||||
$("#mainnav").addClass(stylename);
|
||||
}
|
||||
}
|
||||
function handleTemplateTypeRadio(outtype){
|
||||
if (outtype == 'bt') {
|
||||
$("#btsinkdiv").parent().show(200);
|
||||
@@ -103,6 +113,7 @@ function handleTemplateTypeRadio(outtype){
|
||||
function handleExceptionResponse(xhr, ajaxOptions, thrownError){
|
||||
console.log(xhr.status);
|
||||
console.log(thrownError);
|
||||
enableStatusTimer=true;
|
||||
if (thrownError != '') showLocalMessage(thrownError, 'MESSAGING_ERROR');
|
||||
}
|
||||
function HideCmdMessage(cmdname){
|
||||
@@ -278,6 +289,8 @@ function onChooseFile(event, onLoadFileHandler) {
|
||||
function delay_reboot(duration,cmdname, ota=false){
|
||||
url= (ota?'/reboot_ota.json':'/reboot.json');
|
||||
$("tbody#tasks").empty();
|
||||
setNavColor('bg-secondary');
|
||||
enableStatusTimer=false;
|
||||
$("#tasks_sect").css('visibility','collapse');
|
||||
Promise.resolve(cmdname).delay(duration).then(function(cmdname) {
|
||||
if(cmdname?.length >0){
|
||||
@@ -299,6 +312,7 @@ function delay_reboot(duration,cmdname, ota=false){
|
||||
error: handleExceptionResponse,
|
||||
complete: function(response) {
|
||||
console.log('reboot call completed');
|
||||
enableStatusTimer=true;
|
||||
Promise.resolve(cmdname).delay(6000).then(function(cmdname) {
|
||||
if(cmdname?.length >0) HideCmdMessage(cmdname);
|
||||
getCommands();
|
||||
@@ -547,6 +561,9 @@ $(document).ready(function() {
|
||||
});
|
||||
$("#fwUpload").on("click", function() {
|
||||
var upload_path = "/flash.json";
|
||||
|
||||
if(!recovery) $('#flash-status').text('Rebooting to OTA');
|
||||
|
||||
var fileInput = document.getElementById("flashfilename").files;
|
||||
if (fileInput.length == 0) {
|
||||
alert("No file selected!");
|
||||
@@ -919,9 +936,7 @@ function handleRecoveryMode(data){
|
||||
$("#otadiv").show();
|
||||
$('#uploaddiv').show();
|
||||
$("footer.footer").removeClass('sl');
|
||||
$("footer.footer").addClass('bg-warning');
|
||||
$("#mainnav").addClass('bg-warning');
|
||||
$('[name=secnav]').addClass('bg-warning');
|
||||
setNavColor('bg-warning');
|
||||
$("#boot-button").html('Reboot');
|
||||
$("#boot-form").attr('action', '/reboot_ota.json');
|
||||
} else {
|
||||
@@ -930,9 +945,7 @@ function handleRecoveryMode(data){
|
||||
$("#reboot_nav").show();
|
||||
$("#otadiv").hide();
|
||||
$('#uploaddiv').hide();
|
||||
$("footer.footer").removeClass('bg-warning');
|
||||
$('#mainnav').removeClass('bg-warning');
|
||||
$('[name=secnav]').removeClass('bg-warning');
|
||||
setNavColor('');
|
||||
$("footer.footer").addClass('sl');
|
||||
$("#boot-button").html('Recovery');
|
||||
$("#boot-form").attr('action', '/recovery.json');
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user