Closed sabeechen closed 1 year ago
Apologies there were some upstream changes I neglected to merge into this PR previously, this one should be good to review.
Hey @sabeechen, great improvements, I've been testing and it seems super stable... Thank you very much!
I just noticed that while the music is playing the web app progress is 99%, it was a simple fix (32c6777b2d946535ac10cd0f4a1ddee7f458fe8f).
PS: I guess my auto format just changed a lot of formatting underneath, but it is just line 225.
What are you using to auto-format? I'll make sure I use the same mechanism.
I'm using prettier for VS Code with the standard settings. What about you?
Wasn't using anything (just trying to match style), but I'll start using prettier. I just want to use the same thing you're expecting.
The main goal of this PR is to fix issue #12, which it accomplishes by making the webserver report its current state (busy, command, etc) through a simple JSON API, so the browser is no longer responsible for determining when the printer is working. This also allowed me to do some refactoring and simplification where it made sense in the context of my changes. In particular I've:
delay(500)
from state changes (on the esp32) since the web-ui no longer requires it to show a consistent state.To the best of my ability this makes no change to the appearance or effective styling of the web interface. One benefit of this PR is that if the page is refreshed while printing its printing status will still be reflected after the refresh, ie preventing you from submitting a label until the previous one finishes. In such a case it won't show the proper label text, but I intend to address that in follow-up PR's as it requires more substantial refactoring to be done cleanly.