You've already forked MicroPythonOS
mirror of
https://github.com/m5stack/MicroPythonOS.git
synced 2026-05-20 11:51:27 -07:00
519ceaae6f
Host everything on the device itself, rather than redirecting to https://micropython.org/webrepl/ because that doesn't work when there is not internet, including when the device is in Access Point mode. This was a bit slow, because of the many files and being pretty large, but the inline_minify_webrepl.py makes this much better and brings it down to around 1s to load the page, versus 20 seconds. The minification also reduces the size from around 160KB to 80KB.
47 lines
1.3 KiB
HTML
47 lines
1.3 KiB
HTML
<!doctype html>
|
|
<html>
|
|
<head>
|
|
<title>MicroPython WebREPL</title>
|
|
<link rel="stylesheet" href="webrepl.css">
|
|
<script src="term.js"></script>
|
|
<script src="FileSaver.js"></script>
|
|
</head>
|
|
<body>
|
|
|
|
<div style="display:inline-block; vertical-align:top;">
|
|
<form>
|
|
<input type="text" name="webrepl_url" id="url" value="" />
|
|
<input type="submit" id="button" value="Connect" onclick="button_click(); return false;" />
|
|
</form>
|
|
<div id="term">
|
|
</div>
|
|
</div>
|
|
|
|
<div id="file-boxes" style="display:inline-block; vertical-align:top; width:230px;">
|
|
|
|
<div class="file-box">
|
|
<strong>Send a file</strong>
|
|
<input type="file" id="put-file-select" />
|
|
<div id="put-file-list"></div>
|
|
<input type="button" value="Send to device" id="put-file-button" onclick="put_file(); return false;" />
|
|
</div>
|
|
|
|
<div class="file-box">
|
|
<strong>Get a file</strong>
|
|
<input type="text" name="get_filename" id="get_filename" value="" size="13" />
|
|
<input type="button" value="Get from device" onclick="get_file(); return false;" />
|
|
</div>
|
|
|
|
<div class="file-box" id="file-status"><span style="color:#707070">(file operation status)</span></div>
|
|
|
|
</div>
|
|
|
|
<br clear="both" />
|
|
<i>Terminal widget should be focused (text cursor visible) to accept input. Click on it if not.</i><br/>
|
|
<i>To paste, press Ctrl+A, then Ctrl+V</i>
|
|
</body>
|
|
|
|
<script src="webrepl.js"></script>
|
|
|
|
</html>
|