mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-06 19:47:02 +03:00
tweak FW upload UI
This commit is contained in:
@@ -368,7 +368,6 @@ $(document).ready(function(){
|
||||
console.log('sent config JSON with data:', JSON.stringify(data));
|
||||
});
|
||||
$("#fwUpload").on("click", function() {
|
||||
|
||||
var upload_path = "/flash.json";
|
||||
var fileInput = document.getElementById("flashfilename").files;
|
||||
if (fileInput.length == 0) {
|
||||
|
||||
@@ -430,13 +430,13 @@ esp_err_t resource_filehandler(httpd_req_t *req){
|
||||
httpd_resp_set_hdr(req, "Content-Encoding", "gzip");
|
||||
const size_t file_size = (bootstrap_js_gz_end - bootstrap_js_gz_start);
|
||||
httpd_resp_send(req, (const char *)bootstrap_js_gz_start, file_size);
|
||||
}
|
||||
}
|
||||
else if(strstr(filename, "bootstrap.css")) {
|
||||
set_content_type_from_file(req, filename);
|
||||
httpd_resp_set_hdr(req, "Content-Encoding", "gzip");
|
||||
const size_t file_size = (bootstrap_css_gz_end - bootstrap_css_gz_start);
|
||||
httpd_resp_send(req, (const char *)bootstrap_css_gz_start, file_size);
|
||||
}
|
||||
}
|
||||
else {
|
||||
ESP_LOGE_LOC(TAG, "Unknown resource [%s] from path [%s] ", filename,filepath);
|
||||
/* Respond with 404 Not Found */
|
||||
|
||||
@@ -346,19 +346,16 @@
|
||||
<h2>Firmware URL:</h2>
|
||||
<textarea id="fwurl" maxlength="350"></textarea>
|
||||
<div class="buttons">
|
||||
<input type="button" id="flash" class="btn btn-danger" value="Flash!" /><span id="flash-status"></span>
|
||||
<input type="button" id="flash" class="btn btn-danger" value="Flash!" /><span id="flash-status"></span>
|
||||
</div>
|
||||
<br />OR<br />
|
||||
<div class="input-group mb-3" id="uploaddiv">
|
||||
<div class="custom-file">
|
||||
<input type="file" class="custom-file-input" id="flashfilename">
|
||||
<label class="custom-file-label" for="flashfilename"></label>
|
||||
</div>
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text" id="fwUpload">Upload</span>
|
||||
<p>OR</p>
|
||||
<div class="form-group">
|
||||
<input type="file" class="form-control-file" id="flashfilename" aria-describedby="fileHelp">
|
||||
<div class="buttons">
|
||||
<button type="button" class="btn btn-danger" id="fwUpload">Upload!</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="otadiv">
|
||||
<div class="progress" id="progress">
|
||||
<div class="progress-bar" role="progressbar" aria-valuemin="0" aria-valuemax="100" style="width:0%">
|
||||
|
||||
Reference in New Issue
Block a user