- Notifications
You must be signed in to change notification settings - Fork299
webrepl: Use HTML5 application cache and add favicon#1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
pfalcon commentedMay 14, 2016
Thanks for the patch and sorry for late reply! WebREPL client is intended to be used in 2 modes: 1) hosted onhttp://micropython.org/webrepl , there's own favicon and redirection logic there; 2) locally on user's machine or host; proper naming is important here, likewise the minimal size. HTML structure was at least partially fixed, it was inherited from upstream project's demo code and indeed, it's funny that it's broken. You may want to submit that patch upstream. html5 manifest may be interesting feature when the client becomes stable, and can be support hazard otherwise, e.g. we issued update, something somewhere glitched, user doesn't get the updates, noone knows what happens, and there's zero visibility into that stuff. WebREPL is already a webapp, user installs it with git clone, updates with git pull, and enjoys complete control.
That's true, I for example found that paste barely worked at all, and had to patch it in, learning another batch of creepy stuff about the modern browsers. And that's the area where help would be welcome (should be also shared with upstream project, alas, I didn't have a chance to post even the current changes so far). |
hoihu commentedMay 14, 2016
@pfalcon: the patch allows to use webrepl on mobile devices if the board is in AP mode. That would be nice to have if the board cannot be in station mode (because it is mounted somewhere remote). Using an offline mobile webapp to access the board might be an intuitive way to configure it. Maybe once the websocket client is stable this can be reevaluated? |
pfalcon commentedMay 14, 2016
@hoihu : Did you test it? Does it work? On which devices? With which OS versions? With which browsers? Will you be around to help if someone has issues? |
With these changes, one can load the page once with the browser, it will cache the application and later when connected to the e.g. ESP board, it is possible to use the page even if the original place is not reachable anymore.
You can also "add link to start page" on mobile devices and use it like an app (*).
For this to work you also need to publish the page, which github makes easy for you, just put a copy of the
masterbranch into thegh-pagesbranch and it will be accessible under http://organization.github.io/repositoryYou can see the result of
gh-pagesfor my fork here:https://zsquareplusc.github.io/webrepl/
(*) On my device (Chrome on Android) I had to ensure that only WIFI has a connection and no data connection was possible trough the mobile network, otherwise it would try to use the wrong network interface for the websocket. Also the
term.jsseems to have some quirks on small screens (e.g. rotating screen, show/hide keyboard) and input does not show up immediately. But it is working to execute commands. I'll leave fixing those to others...