mirror of
https://github.com/Doodle3D/doodle3d-connect.git
synced 2024-12-25 18:13:48 +01:00
disconnected and connecting state info
This commit is contained in:
parent
994d0e8ebb
commit
882057e300
@ -46,7 +46,8 @@
|
||||
$("#btnStop").hide();
|
||||
$("#btnNewPrint").hide();
|
||||
|
||||
|
||||
$("#infoDisconnected").hide();
|
||||
$("#infoConnecting").hide();
|
||||
|
||||
//$("#btnSend").on("click", function(data) {
|
||||
// // console.log("test",$("#gcode").val());
|
||||
@ -141,6 +142,7 @@
|
||||
d3d.util.showLoader();
|
||||
|
||||
_infoAPI.getStatus(function(successData) {
|
||||
|
||||
$("#grpStatusAndControl").show();
|
||||
|
||||
var state = successData.state;
|
||||
@ -152,7 +154,19 @@
|
||||
$("#infoState").show();
|
||||
$("#infoState").text("Printer " + state + "...");
|
||||
$("#grpStatusAndControl").hide();
|
||||
|
||||
if (state==="connecting") {
|
||||
$("#infoConnecting").show();
|
||||
$("#infoDisconnected").hide();
|
||||
} else if (state==="disconnected") {
|
||||
$("#infoConnecting").hide();
|
||||
$("#infoDisconnected").show();
|
||||
}
|
||||
|
||||
} else {
|
||||
$("#infoDisconnected").hide();
|
||||
$("#infoConnecting").hide();
|
||||
|
||||
$("#infoState").hide();
|
||||
$("#grpStatusAndControl").show();
|
||||
$("#infoNozzleTemperature").html(successData.hotend + " / " + successData.hotend_target + " °C");
|
||||
|
@ -69,6 +69,8 @@
|
||||
|
||||
}, function(failData) {
|
||||
console.log("_connectAPI.list failData",failData);
|
||||
$("#infoWiFiBox").html("<span class='error'>failed to retrieve list with local WiFi-Box'es</span>");
|
||||
|
||||
});
|
||||
|
||||
$("#lstBoxes").on("change", function(data) {
|
||||
@ -211,7 +213,6 @@
|
||||
_printerAPI.fetch(data,function(successData) {
|
||||
console.log("fetchPrint success",successData);
|
||||
|
||||
|
||||
setTimeout(function() {
|
||||
var url = d3d.util.replaceURLParameters("#control",_pageData);
|
||||
$.mobile.changePage(url);
|
||||
|
@ -108,7 +108,6 @@
|
||||
<h2>Material</h2>
|
||||
<p id="infoMaterial">...</p>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
Please select your Doodle3D WiFi-Box:
|
||||
@ -136,6 +135,17 @@
|
||||
<!-- <p class="intro">...</p> -->
|
||||
<div id="infoState">loading...</div>
|
||||
|
||||
<div id="infoDisconnected">
|
||||
<p>Please make sure the WiFi-Box is connected to your 3D-printer using a USB cable.</p>
|
||||
</div>
|
||||
|
||||
<div id="infoConnecting">
|
||||
<p>This can take a while, 20 seconds or so...</p>
|
||||
<!-- <p>Hmm... this takes longer than usual...</p> -->
|
||||
<p>If it takes too long please try to restart your WiFi-Box. Also make sure the WiFi-Box is running the latest firmware.</p>
|
||||
<p>If you think you're really stuck, please <a href="javascript:talkus('open')">chat</a> with us to see if we can help.</p>
|
||||
</div>
|
||||
|
||||
<div id="grpStatusAndControl">
|
||||
<ul data-role="listview" data-inset="true">
|
||||
<li id="liPrinterId" data-icon="false">
|
||||
|
Loading…
Reference in New Issue
Block a user